Skip to content

Setup a new WP Host on DigitalOcean Cloned From Master

Zayyana Khoir edited this page Sep 13, 2021 · 5 revisions

1. Change IP and Domain name in virtual host of lsws

*Try searching where to change the config using this

ag <old_domain_name> /usr/local/lsws
ag <old_ip> /usr/local/lsws

2. Change certificate path in virtual host /etc/letsencrypts/live/<old_domain_name> to new domain name certificate

*Try searching where to change the config using this

ag <old_domain_name> /usr/local/lsws

3. Create new ssl certificate using certbot

Resource: https://openlitespeed.org/kb/lets-encrypt-ssl-on-openlitespeed/ *Run this command

certbot certonly
(using webroot identification. Webroot: /var/www/html)

4. Change url data in the database

Resources: https://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-from-local-server-to-live-site/ *Look for the password and user using this command:

ag DB_PASS /var/www/
ag DB_USER /var/www/

Prereq. must installed silver-searcher

5. Edit wp-config.php

Add these line on top of file after WP_CACHE in /var/www/html/

define('WP_SITEURL','https://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME','https://' . $_SERVER['HTTP_HOST'] . '/');