WPCloudDeploy Documentation

Change Domain on Control Plane Server

This guide helps you to change the domain on your Primary WPCD Server.

Note that if you’re looking to change domain for a site you see in the WPCD site list, then you’re likely looking for the Changing the Domain for an Existing Site documentation instead.

If the server on which WPCD is installed was setup using our scripts, then you can use this document to guide you through the process of changing the domain for the primary WPCD server and site.

Please note that you will need to be logged in as as the root or sudo user using ssh since everything you do will need to be done on the command line.

1. Upload Files

From your WPCloudDeploy .zip file, please extract the following files from the includes/core/apps/wordpress-app/scripts/v1/raw folder and upload it to the server.

  • 05-change_domain.txt
  • 04-manage_https.txt
  • 10-misc.txt
  • 9999-common-functions.txt

2. Fix Line Endings

Navigate to the folder where you uploaded the files and run the following command to make sure that they both have the correct line-endings/line-breaks.

sudo dos2unix *.txt

3. Change Domain on Existing Site

Remain in the folder where you uploaded the files and run the following command:

sudo bash ./05-change_domain.txt

Select option 3 and follow the instructions.

Once that has been completed, make sure you point the DNS for the new domain to the server IP address.  Wait for the DNS change to be propagated and run the following to get SSL certificates for the new domain:

sudo bash ./04-manage_https.txt

Follow the instructions to enable SSL.

4. Update CRON

Run the following command:

sudo bash ./10-misc.txt

Choose option 13 from the large list of menu options. The WP-CRON will be configured to fire every 60 seconds and you should be back at the command line.

If you’re using the WPCD BETTER CRON configuration, update the Linux CRON table to point to the new domain.

5. Update NGINX Configuration Files

Follow the instructions in the SERVER CONFIGURATION TWEAKS section of the BOOTSTRAPPING A WORDPRESS SERVER WITH OUR SCRIPTS document.

6. Update Existing Server Records

At this point you should be able to log into WPCD using the new domain.  Once you’re able to do that, you need to perform the following actions for each server you see in your server list:

  • Disable CALLBACKS
  • Enable CALLBACKS
  • Disable BACKUPS
  • Enable BACKUPS

If you have backups defined on your site records you’ll need to DISABLE and RENABLE those as well.

These tasks are required because the scripts running on the server will attempt to call home to the old domain.

Wrapup

You might have other optional software or features running that references the old domain and needs to be updated.  But the above steps should take care of the most critical components of the domain change operation.


 

Share: