How to Migrate your WordPress Site to Vultr with Jetpack

Updated on July 15, 2022
How to Migrate your WordPress Site to Vultr with Jetpack header image

Introduction

Jetpack Backup is a premium WordPress migration plugin that lets you back up, migrate, or recover your website to a specific date or time. This guide explains how you can migrate your WordPress Site to Vultr using the Jetpack Backup plugin.

Prerequisites

Before you begin, you need to:

  • Have an existing WordPress server you want to migrate.
  • Deploy a WordPress server from Vultr Marketplace. This will be the new server.
  • Have a basic understanding of the Linux terminal and a text editor such as Nano.

This guide uses example information:

  • The fully-qualified domain name of the website is www.example.com.
  • The IP address of the new Vultr server is 192.0.2.123.

You should replace these example values with your information.

1. Prepare the New Server

  1. Connect to the new Vultr Marketplace WordPress server with SSH and create a sudo user.

  2. Update the server.

  3. Change the web root directory permissions to 777, which allows Jetpack to write new files. You'll tighten the permissions later when you secure the site in section six.

     $ sudo chmod -R 777 /var/www/html/
  4. Grant the web server full permissions to all files in the web root directory.

     $ sudo chown -R www-data:www-data /var/www/html/

2. Install the Jetpack Plugin

  1. Using a web browser, log in to your old, existing WordPress site.

      https://www.example.com/wp-admin
  2. On the left navigation menu, navigate to Plugins.

  3. Click Add New

  4. Enter the keyword "Jetpack" in the search field.

  5. Click Install to add the plugin.

  6. Click Activate to enable it on your WordPress site.

  7. Locate and click the Jetpack plugin on the left navigation menu.

  8. Select your WordPress Site category, and finish setup of the Jetpack plugin.

  9. When ready, navigate to My Jetpack.

  10. Locate the Backup option and click Purchase.

    Add Jetpack Backup

  11. Click Add Jetpack Backup to redirect to the WordPress.com checkout page.

  12. Enter your credit card or PayPal credentials, and confirm payment for your Jetpack Backup plan.

  13. Your Jetpack Backup plan is now active, and backing up your website in the background.

3. Migrate your WordPress Site to the Vultr Server

  1. Using a web browser, log in to your WordPress.com account.

  2. Navigate to My Sites.

  3. Click Switch Site.

  4. Choose your WordPress site from the list.

  5. On the left navigation bar, navigate to Settings and click General.

  6. Scroll down to the Site tools section, and click Clone.

  7. Verify your WordPress site information, and click Continue.

  8. Enter your site title in the Destination site title field.

  9. Enter your full domain URL, such as https://www.example.com, in the Destination site URL field.

  10. Click Continue.

  11. Keep the Credential Type as SSH/SFTP.

  12. Enter your Vultr Marketplace WordPress server's IP address in the Server Address field.

  13. Keep 22 as the Port Number.

  14. Enter the sudo user you created earlier in the Server username field and its associated password in the Server password field, and click Save.

    Jetpack Backup SSH/SFTP Setup

  15. Enter /var/www/html/ in the Destination WordPress Path field.

  16. Select Clone current state to use the latest Jetpack backup of your WordPress site.

  17. Click Begin Cloning to start the migration process.

  18. The migration process takes a few minutes to complete depending on your site's size. You can follow the progress from the cloud.jetpack.com Activity Log.

  19. When you receive a Your site has been successfully cloned alert, the data migration is complete.

4. Update DNS

Log in to your DNS provider and change your fully-qualified domain name to point to the IP address of the new Vultr Marketplace WordPress server. The exact steps depend on your DNS host. Use this guide if you use Vultr DNS.

Make sure your DNS has fully propagated to the new address before proceeding with the next steps. You can use a tool like dnschecker.org to check the status.

5. Install SSL/TLS Certificate

By default, the Vultr Marketplace WordPress server uses a self-signed SSL/TLS certificate. In this step you'll use the Certbot Let's Encrypt application to create a new SSL/TLS certificate and configure the site for HTTPS.

  1. Back up the original wordpress_https.conf Nginx configuration file.

     $ sudo mv /etc/nginx/conf.d/wordpress_https.conf /etc/nginx/conf.d/wordpress_https.ORIG
  2. Using a text editor, edit the wordpress_http.conf file.

     $ sudo nano /etc/nginx/conf.d/wordpress_http.conf
  3. Find the following section.

     server {
     listen 80 default_server;
     listen [::]:80 default_server;
     server_name _;
  4. As you can see in line 4 above, the server_name directive is using _ as a wildcard. Change that value to your server's fully-qualified domain name, as shown in the example below.

     server_name www.example.com;
  5. Save and close the file.

  6. Request a new Let’s Encrypt SSL certificate. Replace www.example.com with your actual domain name.

     $ sudo certbot -d www.example.com --agree-tos
  7. Enter your email address, and allow automatic redirects when prompted.

  8. Test that Certbot auto-renews your SSL Certificates upon expiry.

      $ sudo certbot renew --dry-run

    If the above command runs without errors, Certbot will renew your SSL certificates every 90 days before it expires.

  9. Restart Nginx to save changes.

     $ sudo systemctl restart nginx
  10. Using a web browser, test HTTPS access on your WordPress site.

     https://www.example.com

    You should find a Connection is secure padlock sign in the web browser URL bar.

6. Secure WordPress

  1. To secure your WordPress site from direct IP visits, edit the main Nginx configuration file.

     $ sudo nano /etc/nginx/nginx.conf 
  2. Add the following configuration lines within the http { section.

     server {
         listen 80 default_server;
         listen [::]:80 default_server;
         server_name "";
         return 301 https://www.example.com;
     }

    All requests to your IP are now redirected to your configured domain name.

  3. To avoid random installation risks, delete the WordPress installation script.

     $ sudo rm /var/www/html/wp-admin/install.php
  4. To limit write access to your web root directory, set the file permissions to 755 for directories, and 644 for files.

     $ sudo find /var/www/html/ -type d -exec chmod 755 {} \;
    
     $ sudo find /var/www/html/ -type f -exec chmod 644 {} \;

7. Test the Target WordPress Server

Now, you should be able to access your new WordPress site.

  1. Using a web browser, visit your WordPress site, and confirm that it loads well.

     https://www.example.com
  2. Log in to your WordPress administrator dashboard.

     https://www.example.com/wp-admin
  3. On the left navigation bar, navigate to Tools and select Site Health.

  4. Next to Status, click Info.

  5. Scroll through the list of options, and toggle Server to verify that the WordPress system information corresponds with your Vultr WordPress server packages.

    WordPress System Information

Next Steps

To fine-tune and maximize the full potential of your WordPress server, please visit the following guides.