How to Migrate WordPress From Shared Hosting to VPS With Zero Downtime


Shared hosting is a hosting which allows multiple users to share the same servers to host their websites. This makes your website prone to attack, when there is an attack on the other users websites. For e.g. if there is a malware attack in others site, then probably your site will also be targeted next.

Moving to the Virtual private cloud servers will give a server which hosts your websites alone. It gives the space which is exclusively for hosting your websites. This has lot of advantages including the security of your website.

In this tutorial, you’ll migrate WordPress to DigitalOcean cloud hosting or any other private cloud hosting provider.

If you find it difficult to migrate to Digitalocean cloud by yourself, try DigitalOcean with Cloudways for Free.


Create an account with Digital Ocean and create one droplet to host your wordpress site.

Step 1 – Creating Backup of Existing WordPress Sites

In this step, you’ll create a backup of your existing wordpress site.

This backup file can be used to import into your new server and it might also help you restore your site when there is any problem during migration.

To create a backup of your wordpress site, you need to install a plugin called All in one WP Migration.

When you install and activate this plugin, you’ll be able to see the option All-in-One WP migration option in the WordPress Menu.

Click on that menu, and select Export option.

Now, you’ll see the of options where you can export the file. Select file option and export the file to your local location.

Your backup is created. Now let’s move to the next step.

Step 2 – Installing Wordops in New Server

In this step, you’ll install Wordops in your new VPS server.

Wordops is a tool which eases the WordPress site Installation and server administration.

When using this, it automatically takes care of installing the necessary software stack(WordPress, MySQL, PhP, NGINX) installation for running wordpress sites in the server.

You can install the WordOps using the command below.

 wget -qO wo && sudo bash wo  site.tld   --wpfc  

WordOps and the full stack required for installing WordPress is installed.

Now let’s create sites on WordPress.

Step 3 – Creating Sites

In this step, you’ll install the wordpress for each site that you want to configure in the new VPS server.

For each site, you need to follow the below step once.

Run the below command to create wordpress site your domain.

By default, we are creating wordpress site with Nginx fast cache.

If you would like to use any other type of cache in the wordpress installation, refer the link in the Wordops official page.

  wo site create  site.tld   --wpfc  

site.tld should be replaced with your domain name. For e.g. where askvikram is site and tld is .com extension.

The fresh wordpress site is created with the basic settings.

Now let’s move on to next step to migrate the contents from the backup to this new server.

Step 4 – Importing the Backup to New Server

To migrate the content from the backup to the newly installed wordpress installation, login to the newly installed wordpress installation using the IP address of your server and wp-admin.php url.

You’ll see the default wordpress dashboard.

Go to Add new plugins page, Install the same All-In-WP-Migration plugin which can be used to import.

When you install and activate this plugin, you’ll be able to see the option All-in-One WP migration option in the WordPress Menu.

Click on that menu, and select Import option.

Now, you’ll see the of option to import the file.

Select file option and import the file. Click Finish.

This operation will completely import the content of your site from the shared hosting including your usernames and passwords.

You will also need to update the desired URL Type in the option that is shown.

WordPress import is complete and now your site is available in the new VPS server.

Now lets see how to encrypt it using the lets encrypt ssl certificates.

Step 5 – Updating the SSL for New Site

Use the below command to fetch the ssl certificate for your server from the site.

wo site create site.tld --wp --letsencrypt
 wo site create  site.tld   --wp --letsencrypt  

This will update the lets encrypt certificate for your website.

Step 6 – Updating DNS Settings in DigitalOcean

Go to the digital ocean server and click Networks → domains.

Add a record for your root domain and update the IP address of the digitial ocean droplet.

Step 7 – Updating Nameservers in Domain Registrar

Finally, update the name servers in the domain registrar.

Update the name servers as So this is the server which will be looked upon by the browsers to check the content of the websites.


In this article, you have migrated wordpress from shared hosting to VPS hosting by DigitalOcean. Here are some of the questions you may get in mind and answers to them.

How to move wordpress site from godaddy to digitalocean?

This guide walks you through the steps to migrate from any hosting provider to digitalocean hosting provider. Follow this guide and comment if you have any questions.

Is DigitalOcean good for WordPress?

Yes, it is good and the are famous for high performance VPS. They also provide one click installation options for hosting wordpress in their cloud with one click.

How do I install WordPress on cloud hosting?

You can follow step-2 and step-3 of this tutorial to install WordPress on cloud hosting.

What is the best hosting for WordPress?

The world is moving towards cloud. Hence its better to host wordpress in any of the cloud service provider to be more secure and safe.

Is DigitalOcean good for website hosting?

Yes, DigitalOcean is changing the hosting space by high quality cloud servers at an affordable cost.

Is DigitalOcean reliable?

Yes, It is reliable. With more that 5,50,000 developers already in DigitalOcean, they are one of the most reliable cloud hosting providers.

Does Cloudways have cPanel?

No, Cloudways doesn not have cPanel. However, it has better and simplified dashboard than cPanel to maintain your websites.

Leave a Comment

Share via
Copy link
Powered by Social Snap