For a couple years, VaultPress users have been able to restore their backups to a new site. This can come in handy if you want to experiment with making changes to your site, before making these changes visible on your main site. But did you know that you can use the same feature to move your site to a different hosting provider, while keeping the same domain name?
Whatever the reason, VaultPress can simplify the process of migrating your site to a new host. And by following a few steps, you can even ensure that your site remains available to your visitors while it’s being transferred to a new host.
Migrating your site is no small feat — it involves a lot of moving parts — but we’re committed to make it simpler!
Here’s how you do it:
- Sign up for a new hosting plan, providing your new host with the domain name where you want visitors to find your site. In most cases, this will be your existing domain name.
- Take note of the FTP or SSH credentials provided by your new hosting provider. These will let us transfer your site to the new server.
- Also take note of the temporary address (URL) from which you can access your new server. Your new hosting provider should provide this information in their documentation.
- Restore your latest backup to a new site, using the FTP/SSH credentials and the temporary address from above. These should be used to set up your “Alternate Site”.
- You’ll receive an email once your restore has finished. After it’s finished, update your DNS records to point your domain name to your new hosting provider. (The process is different for every provider, so you should refer to the documentation provided by your domain registrar and your new host.)
- At this point, you can update the database on your new site to ensure that links point to your permanent domain name, and not the temporary address. You can run the following SQL queries on your database, or reach out to us. We can help with this step! (Note: Please replace TemporaryDomain and PermanentDomain with your temporary and permanent domain names, respectively.)
UPDATE wp_options SET option_value = 'http://PermanentDomain' WHERE option_name = 'siteurl' LIMIT 1; UPDATE wp_options SET option_value = 'http://PermanentDomain' WHERE option_name = 'home' LIMIT 1; UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://TemporaryDomain', 'http://PermanentDomain'); UPDATE wp_comments SET comment_content = REPLACE(comment_content, 'http://TemporaryDomain', 'http://PermanentDomain'), comment_author_url = REPLACE(comment_author_url, 'http://TemporaryDomain', 'http://PermanentDomain'); UPDATE wp_posts SET guid = REPLACE( guid, 'TemporaryDomain', 'PermanentDomain');
- Your visitors may be directed to your old host while DNS changes propagate across the internet. These changes can take up to 72 hours, so you should wait a few days before you cancel your subscription with your old hosting provider.
- Take a deep breath! You’ve just migrated your site. 🙂
As always, don’t hesitate to contact us if you have any questions along the way. We’re happy to help you through the process of migrating your site — we know it can be challenging!