Migrating a WordPress Blog from Shared Hosting to a VPS or VDS

Migrating a WordPress Blog from Shared Hosting to a VPS or VDS
Page content

Has Your Blog Outgrown Its Hosting?

After running a WordPress blog for several months or even years, you might discover that it has outgrown its original hosting package and is ready for a new home.

There may be various reasons for this, but ultimately you should be thinking about the long-term success of your blog. If you believe that it will benefit from being moved to faster hosting, your blog will need to be backed up and migrated to a new server.

If you are lucky enough to be migrating to another server with the same host, the process should be quite straightforward, and your host might even assist.

Otherwise, get ready for a long, drawn-out project…

Preparation for Migrating WordPress

The first thing that you will need to do when migrating your WordPress blog is to prepare backups. You will need a backup of the theme, and additional folders you have in the root of your WordPress blog, the wp-content/uploads folder and the wp-content/plugins folder.

In addition, you will need a copy of your WordPress database. This will typically be in MySQL format and available via your hosting package control panel. If you don’t have access to this, contact your web host to arrange access or for them to provide you with a backup that you can download to your computer. Note that many hosts only backup once a week, so the most recent backup may not have all of your posts and comments on it.

For the best results, you should use the WordPress Database Backup plugin, which makes backing up a WordPress database effortless. This is particularly useful on shared hosting websites where there might not be enough resources to process a large backup.

Choosing a VPS or VDS

Once you have taken steps to make backups of your MySQL database and WordPress theme, the next step is to find and choose a suitable VPS (virtual private server) or VDS (virtual dedicated server).

These come in many shapes and sizes, scaled to your requirements and the projected use and bandwidth of your website. Recent blog stats should give you a good idea of how popular your blog has become, and this should be enough for you to judge how much disk space and bandwidth you need for your new package.

See How to Choose a WordPress VDS Host for further details on choosing a VPS/VDS solution.

Moving Your WordPress Blog

The main element of migrating a WordPress blog is straightforward. With your new hosting setup and your FTP account details received from the host, follow the standard WordPress installation process (using the version of the blog software that you were using on your previous website) and then upload the theme to wp-content/themes, and overwrite the wp-content/uploads folder and the wp-content/plugins folder with your own versions.

As with the notes above, if you had any other folders that are needed for serving additional media, upload these too.

Restoring the Database

Finding a VPS Hosting for Wordpress

As things stand your new website doesn’t have the old database. Begin by uploading the backup using FTP to the WordPress root directory; as this takes place, visit www.ozerov.de/bigdump.php and download the latest version of the BigDump script. Once the database has uploaded, upload bigdump.php to the same directory.

Browse to the bigdump.php script in your browser (for instance www.myblog.com/bigdump.php) and follow the instructions to upload your database to the MySQL database server. Once the process is complete (you will see progress bar indicating completion) your website is successfully migrated!

However no one can find it right now. What you should have is a webhosting account accessed via an IP address only. You should be able to view your WordPress dashboard with a URL such as https://123.456.45.123/~accountname/wp-admin (if you’re using Linux hosting) which might be a good idea for checking everything is where it should be. Note however that most functions depend on the domain name that is in the WordPress database, so don’t expect to be able to accurately preview changes.

Image credit: https://www.w2servers.com/hosting-deals.html

Updating Your “A” Record

The last thing that you will need to do is update the A record. This record associates your domain name with your website server IP, so that when someone enters the URL of your website into their browser, the correct webpage opens.

To do this, visit the webpage for the company that manages your domain name, login and find the DNS record entry. Here you should find the A record listed. If you cannot find the A record, don’t make any changes to anything – instead contact the domain name host for assistance.

Unnecessary or incorrect changes will affect your website, so for the most seamless switch between the two versions of your website, make sure the new A record IP address is entered correctly.

When the A record is updated, the new hosting for your website will become live – for some people. DNS propagation across the World Wide Web can take a while, so use viewdns.info/propagation to find out how far from completion the change is. Usually this will take no more than 24 hours, and often it is much quicker than this.

References

Author’s own experience.

WordPress Database Backup Plugin: https://austinmatzko.com/wordpress-plugins/wp-db-backup/