Migrating WordPress site from one host to another may sound too complicated as you think of it. But with the present tools/plugins available, these tasks were made easy which can be done even in just a single click.
For the last 5 years, I have developed and worked on websites for several clients. One of the things I do was deploying a site from a staging or development server to the live or client’s own hosting server. Basically, it’s some sort of server administration.
Some hosting service allows you to do automatic migration by simply keying in an SFTP or SSH access within the hosting platform. That’s only possible though if you have access to the hosting account.
But if you’re only given a WordPress or SFTP access to do the tasks how will you be able to do it?
Some developers might choose to upload the files via FTP but additional tasks need to be done especially when dealing with the MySql database.
In this post, I will discuss the entire process I did when deploying or migrating a WordPress site to another hosting or client’s hosting account.
All-in-One WP Migration
If you’ve been working with WordPress for quite some time, you might be already be using the plugin developed by ServMask called All-in-One WP Migration. Or if you don’t, it is a migration tool for all your blog data that allows you to Import or Export your blog content with a single click. To do that, you can just follow the following:
First, You need to install the plugin on both the staging or development site and the live or client site.
Staging Domain
From the staging/development domain, click the “Export” option of the All-in-One WP Migration plugin to open its own settings page.
Find and Replace
Since you are working on different domains, you can use it’s Find and Replace function to find and replace all occurrence of strings you set in the database. In this case, we will be replacing the domain or site URL of the staging domain (http://staging.domain.com) to the live URL (https://www.clientdomain.com).
You can use the actual domain name or URL you site you are working with.
Advanced Options
Clicking the Advanced Options allows you to choose what type of data you want to include in the export process.
I would check those options that I don’t want to include such as the post revisions, and spam comments. You can choose whatever you want.
Export To
Clicking the Export To button will give you options on where you want the data to be exported. Like the ability to download the data as a .wpress file, upload to an FTP server, Dropbox, or Google Drive account.
While there are lots of other export options I choose to Export the data to a File. It also depends on your use case, but for me, it’s the easiest way as it requires NO other configurations.
You just need to wait a couple of minutes to complete the process while the plugin is exporting everything for you in just a single click.
Once ready, just click the “Download” button. And that’s the only thing you need to do from the staging or development domain side.
Live Domain
From the live domain, click “Import” options from the All-in-One WP Migration Plugin menu.
Remember to check the file size first, before we proceed to import the file we just downloaded. In our case, the total file size is 274MB while the maximum upload file size that our server is capable is only at 64MB.
You can update PHP configuration from the cPanel when working with a hosting provider that comes with a WHM (Web Host Manager).
Here’s is How to Increase PHP Max Upload Limit in DreamHost.
After updating the max upload limit for PHP, it should be also reflected in the All-in-One WP Migration plugin’s Import page, as you can see in the image below.
Now we can already import the file we exported from the staging or development server without limitation issues.
Just wait until the import process is done and remember to keep the browser where the import is taking place open or else it will fail.
After that, you will be given options to set/save the permalink structure of your site and reload the page.
Go ahead and refresh the page. Don’t worry, I have done this several times and it always worked.
That’s it! Let me know what you think in the comments section below.