How to Migrate WordPress from a Shared Hosting to VPS

So you have decided on moving your WordPress site to a Virtual Private Server, Great!! this tutorial is going to give you a step by step instruction on migrating to a economical but powerful solid state hard drives (SSD) VPS.

Im going to divide the process in sections as follows:

1. Create a free account on Cloudways.com

2. Export your current SQL database. To later import it to the VPS.

3. Export your current WP-Content file. To later upload it to the VPS.

4. Download and install WinSCP.

5. Direct the domain name to the newly created VPS.

Video Tutorial:

Faster WordPress Hosting

Create a Cloudways Account

Click here to create a free account on Cloudways.com

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-5

You’ll be prompted to create a login email and password.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-6

Once you click on Start free trial button you’ll get an email to activate your account, just click on the link to activate.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-4

That link will direct you to the create a server section on Cloudways.

Don’t be quick to tap. in order to get the $5 dollars a month VPS you would need to select the following:

a. Digital Ocean as your cloud.

b. WordPress as the APP. You can select the app that applies to you but this tutorial is on migrating WordPress.

c. Select I Know my server size tab and move the slider to the 512MB ignore the the red warning, a 512MB VPS is perfect for a website with over 30 to 70k visits a month.

d. Lastly from the drop down select a location near you. Then click on Start free trial or Launch orange button.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-27

When you click the orange button you’ll be redirected to the server section where the VPS is being created. The process of creating the VPS takes about 10 minutes.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-1

Now that the VPS is created we need to get a copy of the SQL database from your current website, by exporting it to your computer to later import it to the newly created VPS.

Exporting SQL Database

This process requires you to log into the c-panel of your web hosting company, then under database go to phpMyAdmin. The image underneath are images taken from Goddady, accessing the c-panel may be different depending on the hosting company.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-26

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-25

From the phpMyAdmin click on the Export tab, then click on the Go button to save a copy of your current WordPress website SQL database to your computer.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-24

Then we would need a copy of the WP-admin file from your current web host. This process requires you to access the web host via FTP.

If in case this process sounds too much for you, you can always contact your web hosting company and they are able to walk you through on creating an FTP user and accessing your web host via FTP.

From the root directory drag and drop the WP-content to the desktop , creating a copy of it on your desktop.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-23

Now that we have a copy of the SQL database and WP-content of your WordPress website, we need to import it to the VPS.

Import SQL Database

Importing the The SQL database is very simple, head over to the server section of Cloudways.com and click on Manage Server button.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-22

Then select Application Management tab, here disable Varnish, then click on the Launch Click&Go MySQL Manager green button.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-21

You’ll probably be prompted with this connection untrusted, Here click on I understand the risks, add Exeption… button and resend to direct you to the database section.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-27

In the database section click on Import and browse to select the SQL database, then click on execute button to import it to the new VPS.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-20

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-19

Once imported it should look something like this:

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-18

Now lets upload the WP-admin file to the VPS via SFTP not to be confused with FTP.

Upload the WP-content

To access the VPS via SFTP we would need to download and install a free software called WinSCP.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-7

Once installed use the information under SFTP in the application management section in cloudways.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-17

Now place it in WinSCP program and click on login button. If prompted to connect to an unknown server click yes.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-16

Now drag and drop the WP-content folder to the public_html directory. You’ll probably be prompted to overwrite the current one, click yes to overwrite, Replacing it with your WP-content.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-15

Now that the WP-content and SQL database has been imported, lets log in to the dashboard section of the WordPress installation in the VPS.

To do this we would need to go to the Application Management under Admin Area Access you’ll find the URL ending in WP-admin and underneath  you’ll find the username and password to log in.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-8

Once you Log in make sure to reactivate the theme, set the menus, reactivate plugins in case it needs it. Most of the times the transfer will create an exact copy of your website.

Point Domain Name to the VPS

Go to Domain Management in the Application Management section and click on Add Primary Domain button and enter the domain name ie. (www.yourwebsitename.com) of the website you transfer and click on save. Make sure to proof read the domain name before clicking on save.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-14

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-13

After you have changed the Primary domain name we would need to log into the web company who’s hosting your domain name ie. (www.yourdomain.com), usually is the same company hosting your website.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-12

There, go to DNS Zone File, under A (Host) locate the @ symbol to edit that record to point to the public IP address located under SFTP section on cloudways.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-11

Then locate www under CNAME, edit that record to point to the “wordpress-numbers-numbers-numbers.cloudwaysapps.com” this address is located under Domain Management next to “How to point your Domain to” in the Application Management section.

Migrate-WordPress-from-a-Shared-Hosting-to-a-VPS-10

Now you have fully migrated to a VPS this would take 24 to 48 Hrs. for the changes to take effect.

Note: If in case this process sounds too much for you, you can always contact your web hosting company and they are able to walk you through with this info.

Miguel

I started this tech blog back in 2011 as a place to write down processes I took to fix my client systems and network. Now I write some tips and tricks to help others with the tech issues that one might encounter.

You may also like...

2 Responses

  1. Rashedul islam says:

    Thanks a lot for this
    BTW is this digitalocean or cloudways ?
    and i have seen you have download database which is a localhost file from cpanel. as i have no cpanel and if i use wordpress-db-backup and download it as sql.gz and upload it will that be ok ??

    • Miguel says:

      Hi Rashedul, is digital ocean thorough cloudways. is easier to configure while using cloudways.yes using the sql.gz works fine.