Moving a Live Site to a New Server Location

MODX Cloud enables you to host each of your websites in any one of our available public data centers. At some point, you may decide that you want to move a site that is live (with a domain pointed at it) to another one of our platforms to be closer to your customers or client. At this time, this process has a number of steps but they're all very simple.

The high-level steps for moving a cloud to another data center location are as follows: 

  1. Preparing to Move the Site
  2. Creating a New Cloud Using a Backup of the Site You are Moving
  3. Setting Up Custom Domain(s) on the New Cloud
  4. Migrate Your Web Rules
  5. Point DNS A Record at New Cloud IP
  6. Cleaning Up the Origin Site

Preparing to Move the Site

There are a couple things you need to do before moving a live MODX Cloud site: 

  1. First, visit your DNS Manager/Domain Registrar and lower the time to live (TTL) of the A Record for the domains of the Cloud you are moving, to 300 seconds. 
  2. Second, tell any site editors or staff know that they will not be able to edit the site until this process is complete, otherwise changes made will be lost.

Creating a New Cloud Using a Backup of the Site You are Moving

The next step in moving a site to a new MODX Cloud data center is to create a new Cloud from a Backup of the source Cloud.

  1. Login to the MODX Cloud Dashboard
  2. From the list of Clouds on the Clouds page, locate the Cloud you are moving to the new data center
  3. Click on the cog at the right of the Cloud name and select Backup Cloud  
  4. Once the Backup is complete, you'll receive an email notification
  5. While you're waiting for the notification, at the top of the Dashboard, click New Cloud
  6. From the New Cloud view, give the Cloud a name, select the data center you'd like this new Cloud to be located in and click Complete Cloud Creation 
  7. Upon notification of the Cloud completion, go to the Backups page by clicking Backups at the top of the Dashboard
  8. Find the Backup named for the source Cloud, click the cog at the right of the Cloud name and select Restore Cloud Into…
  9. From the window that opens, find and select the name of the Cloud you created in step 6 and click Save to complete.  
  10. You'll receive an email to let you know the Backup has been restored into the new Cloud and you can move on to setting up the domain(s).

Setting Up Custom Domain(s) on the New Cloud

The next step in this process is to set up custom domains on the new Cloud as follows: 

  1. From the list of Clouds on the Clouds page, locate the Cloud you'd like to copy the web rules from and double-click the name of the Cloud to go to the Cloud Edit view. 
  2. Select the Add-ons tab and click the toggle to the right of Add Custom Domains to your Cloud and Click to confirm
  3. Proceed through the checkout
  4. Once done, come back to the Cloud and find the Domains tab 
  5. Click Add Domain from the top left
  6. Add the domain name (and any others you have to add).
  7. Add any subdomains you had as well.

Migrate Your Web Rules

In order to make sure your site works as expected, you'll also want to move any or all the web rules over to the new site. This will ensure the site behaves as it did prior to the move and in addition, not cause issues with search engines. 

  1. From the list of Clouds on the Clouds page, locate the Cloud you'd like to copy the web rules from and double-click the name of the Cloud to go to the Cloud Edit view. 
  2. Select the Web Server Tab and scroll down a little to find the Web Rules pane
  3. Insert your cursor in the text area and use CTRL-A(PC)/CMD+A(Mac) to select all
  4. Click CTRL-C(PC)/CMD+C(Mac) top copy the contents of the text area to your clipboard. 
  5. Click on the Clouds link at the top of the MODX Cloud Dashboard to go back to your Clouds list and find the newly created Cloud and double-click the name of the Cloud to go to the Cloud Edit view.
  6. Select the Web Server Tab and scroll down a little to find the Web Rules pane
  7. Insert your cursor in the text area and use CTRL-A(PC)/CMD+A(Mac) to select all
  8. Click CTRL-V(PC)/CMD+V(Mac) top paste the contents of the clipboard to the text-area.
  9. Click on the Test & Save Web Rules button at the lower right of the Web Rules text-area. 

Point DNS A Record at New Cloud IP

The last step to make the site live is pointing the DNS A Record at the new Cloud IP. 

  1. From the list of Clouds on the Clouds page, locate the Cloud you'd like to copy the web rules from and double-click the name of the Cloud to go to the Cloud Edit view. 
  2. On the main tab, locate the IP address shown at the top right of the General Tab, select and copy it to your clipboard. 
  3. Go to your DNS provider (which may be your domain registrar) and update the DNS A record for each domain you added above in the Setting Up Custom Domain(s) section. 
  4. Wait for a bit to see if your new changes have been applied across the web. You can check here: https://www.whatsmydns.net/. You know it's done when all the test servers show that the domain is pointed to the new IP address. 

Cleaning Up the Origin Site

Once you're sure everything is working as expected on the new site in the new data center, you can safely remove the site or at least the custom domains. You can either Delete the Cloud and it will remove all addons, automated backups and custom domains.

If you'd like to keep the origin site around for a bit, you can also just go to the Addons tab of the Cloud edit view and turn off custom domains for this Cloud. You'll no longer be charged for the Custom domains but your original Cloud will be there in case you need it.

Have more questions? Submit a request

0 Comments

Article is closed for comments.