Guide

How to Move WordPress to A WordOps Server

Pinterest LinkedIn Tumblr

This article shows you all required steps to move WordPress from shared hosting to a Cloud or a Virtual Private Server (VPS) powered with WordOps without downtime. This is beneficial for those who start migrating websites from a shared environment to dedicated hosting.

In the beginning section, you’ll learn how to add a new domain on WordOps server.

You can jump directly to the main section here if you have WordOps installed already.

Install WordOps

Deploy a Linux server powered with at least 512MB RAM. Choose either Debian 9/10 or Ubuntu 18.04/20.04 as its operating system.

Need a recommendation? Try Vultr and you’ll be amazed on its performance. We tested its 512MB plan to server millions visitors. Check our benchmark test here.

Log in to your server through ssh as root or as a user with sudo access.

Set up a valid hostname for your new server.

hostnamectl set-hostname host.speedy.monster

Change host.speedy.monster with your own hostname.

Install WordOps with this command:

wget -qO wo wops.cc && sudo bash wo

Please read our detailed steps on how to install WordOps.

Add New Websites to WordOps

Adding new websites to a WordOps server is easy. You can do this with a single command.

wo site create domain.tld --wp

Replace domain.tld with your own domain name. Example:

wo site create host.speedy.monster --wp

That if you want to completely install a new WordPress site.

We already did that. Read our previous guide on how to install WordPress on WordOps Nginx. We added a new domain speedy.monster which is a clean WordPress install.

How to add an addon domain to WordOps?

Addon domain is a common term found in cPanel web hosting control panel.

In a common Linux administration, it’s just another domain.

So, how to add a new domain to your WordOps host?

It’s similar to adding new domains for all your new websites:

wo site create example.com --wp

Similarly, if you want to add a subdomain and install WordPress there:

wo site create sub.example.com --wp 

Replace example.com and sub.example.com with yours.

Add A New Website for WordPress Migration to WordOps

Requirements:

WordOps does not install any DNS service on your server. Hence, you’ll need a third-party (free) DNS hosting. We recommend Cloudflare for its fast and reliable performance.

Hence, you must get a (free) DNS hosting to avoid downtime during the migration process.

Preparing Domain DNS

First, sign up for an account at Cloudflare or sign in if you already have one.

Add your site to Cloudflare.

Select the free plan and click Confirm Plan.

Cloudflare will scan all available DNS records from your old web host. Once done, keep all the records as it is.

You’ll get new Cloudflare Nameserves (NS). Use them for your domain.

Log in to your domain registrar and change the nameservers. Example from Porkbun:

Creating New WordPress Site on WordOps

Next, log in to your WordOps server and add a new website for the domain name of a WordPress site you are going to move.

wo site create example.com --wp --php74

Again, replace example.com with yours.

Here’s an example. We want to move our dummy blog named serverabc.xyz from Directadmin to WordOps.

Our destination server already has WordOps installed and one website (speedy.monster) hosted. We want to add serverabc.xyz to this server.

wo site create serverabc.xyz --wp --php74

Replace –php74 with –php73, –php73, or –php72 if you wish to use an older version.

Copy the newly created admin user and password generated by WordOps to Notepad and save it for later use.

Creating Backup

Log in to WordPress dashboard hosted on the old web hosting using your username and password; not the ones created by WordOps.

At this point your WordPress blog is still hosted on the old shared hosting.

Go to Plugins >> Add New >> then search “WPVivid” >> install and activate it.

Next, go to WPVivid Backup >> Backup & Restore.

Select Database + Files, and select Save backups to local. Click the Backup Now button to start.

Go to the Log tab and note down the backup filename.

Changing Local Hosts File

We also need to install WpVivid on the new WordPress installation by WordOps. For that, we need to also access WordPress Dashboard on the new server.

We can do that by manipulating Hosts file.

If your computer or laptop runs Linux, you can use Nano editor in Terminal:

nano /etc/hosts

Then add your server IP address.

If you are on Windows 8/8.1/10, you can use Hostsman tool. Alternatively, you can also follow these steps:

  1. Open Windows Explorer.
  2. Go to C:\Windows\System32\drivers\etc\
  3. Right-click HOSTS file then choose Open With
  4. Choose Notepad then click OK
  5. Add the IP address then your domain name (see example below)
  6. Press Control+S to save changes.

Preparing New WordPress

We have to access your new WordPress site hosted on the new server.

First, flush your dns cache. Windows users can follow these steps:

  1. Press Windows+R
  2. Type cmd then click OK
  3. Type ipconfig /flushdns then hit Enter

Next, open WordPress administration dashboard page on your browser. This time, you will log in to the freshly installed WordPress.

Use username and password generated by WordOps (see above section) that you noted it down.

Go to Plugins >> Add New >> look for “WPVivid” >> Install >> Activate.

That’s it for now. We’ll get back into it later.

Migrating WordPress Backup

Go back to Putty or Terminal to access your new server (WordOps).

Download the backup file to your new server using wget:

cd /var/www/example.com/htdocs/wp-content/wpvividbackups/
wget https://example.com/wp-content/wpvividbackups/backupfilename.zip

Example:

cd /var/www/serverabc.xyz/htdocs/wp-content/wpvividbackups/
wget https://serverabc.xyz/wp-content/wpvividbackups/serverabc.xyz_wpvivid-5f13b133619c4_2020-07-19-02-34_backup_content.zip

Restoring Backup

Go back to WordPress dashboard hosted on the new server.

Go to WPvivid Backup >> Backup & Restore >> click the Scan uploaded backup or received backup.

The backup file will appear right below it. Click the Restore button then click OK to confirm.

Once finished, you will be automatically logged out.

Log in again, this time you must use your original username and password; do not use username and password generated by WordOps.

Pointing Domain Name

Log in to your DNS Manager (e.g: Cloudflare) again. This time we will point the domain name to the new server since we already moved the WordPress site.

Edit A record to point to your WordOps server IP.

Make sure you have WWW CNAME record point to the root domain. Example:

Don’t forget to save the change.

At this point, when you access your domain, it will direct you to the new host (WordOps server).

Installing SSL

If your website uses SSL (https://), you may need to install it as well since the old SSL certificate is on the old host.

First, make sure your domain is pointing to the IP address of new host (WordOps server).

Open https://tools.keycdn.com/ping then ping your domain.

Make sure the IP address is the one your WordOps server has.

Now install Let’s Encrypt free SSL using this command:

wo site update example.com -le

You will see something like this:

Adjusting WordPress Settings

At this point, the WordPress migration process from Shared Hosting to WordOps server is complete.

There will be some configs to adjust though.

Check your caching plugin, do you want to or need to change it?

For instance, if you used LSCache (LiteSpeed) before, this time you have to uninstall it and change to another caching mechanism that WordOps support.

WordOps supports WP Super Cache, Cache Enabler, WP Rocket, and Redis Cache.

First, disable the previous caching plugin via Dashboard >> Installed Plugins >> >> look for the plugin name (e.g: LiteSpeed Cache) >> then Deactivate.

Next, issue one of these to install the caching plugin you want.

Cache Enabler:

wo site update example.com --wpce

WP Super Cache:

wo site update example.com --wpsc

WP Rocket:

wo site update example.com --wprocket

Redis Cache:

wo site update example.com --wpredis

Example:

You might be wondering of why installing the plugin from WordOps? Why don’t we use the Add New Plugin feature in WordPress?

That’s simply because WordOps will install not only the plugin itself but also the Nginx configuration needed by the plugin to work at its optimum performance.

Check the WWW url! All examples in this tutorial install WordPress at its root domain (eg: example.com).

Some users prefer to use www.example.com which in this case is pretty easy to change.

From Dashboard, go to Settings >> General >> change both “WordPress Address (URL)” and “Site Address (URL)” >> add www prefix.

Click Save Changes once done.

Conclusion

WordPress migration for shared hosting to WordOps server (cloud/VPS) is an easy task to do. It can be done without having to access the old hosting control panel (Directadmin, cPanel, VestaCP, etc).

Despite you can employ the same method ti migrate WordPress from cloud to cloud/vps to vps, this method is mostly more suitable for shared hosting to cloud/vps migration.

Website migration using this method and sequence will avoid any downtime and hence does not upset your visitors.

If you have root access of both old server and new server, cloud to cloud or vps to vps migration would be easier through WP-CLI.

Please do not hesitate to write comments below.

A blogger by hobby. He is an ordinary worker at day, a hybrid sys-admin at night. Sharing knowledge through blogs is his passion. He likes ice cream BTW.

Write A Comment