Webmasters may need to move their WordPress sites to a new server because of a variety of issues, such as the frequent downtimes, slow speed, long loading time, hacks, attacks or other security issues, and many more. Some people to this just because they find the web hosts alluring them with low price at first, but actually coming with terrible services and poor support. Even some people just don’t like the existing web hosts.
We have also received some questions from readers which ask about how to how to move their WordPress sites to a new server. While there are many tutorials available online, some seem to lack clear procedures on how to move customers their own sites. In this tutorial, we will show the detailed steps and instruct with pictures, to make it very clear to readers, even the beginners.
Before moving to a new server to support your WordPress site, the first thing you need to do is to find a reliable web hosting company. Otherwise, the problems you go through with your previous server may happen one more time.
No matter how, you cannot transfer to a scam company. You should move to a better hosting, with affordable price, excellent services, solid performance, and professional support. To choose a really trust worthy WordPress hosting provider, you can learn about some effective tips, or you can read some justice reviews from professional editors and customers.
Based on our real experience, we personally recommend BlueHost – one of the most reliable WordPress hosting providers with more than 15 years development. It provides the best WordPress hosting service starting at $2.95/mo affordably, coming with free features as free domain name, Google AdWords credits and more. At present, it is proudly serving more than 3 million customers with over 99.5% customer satisfaction rate.
Here, you have to bear in mind that the process to transfer website, restore important databases, and get every software installations and configurations may take several hours before your site is fully functioning again. Therefore, we suggest you don’t cancel your existing WordPress hosting account before the move is complete. If you inform the old web host before transferring, your site may encounter downtimes as well as complete loss of files and databases.
Backup WordPress Databases
Before starting to move, you need to backup your WordPress databases and files. There are 2 ways to back up the database, one way is using phpMyAdmin in the control panel, and the other is using the export option in the WordPress dashboard. In this guide, we use phpMyAdmin to move our WordPress site.
Log into your control panel, go to phpMyAdmin, click and open it. Select the database which includes your WordPress site data on the drop-down list, and click the Export tab in the top of the page, and save it as a .sql format file.
Using a decent text editor like DreamWeaver, Coda, Textmate, etc to open up the SQL copy, do a mass find and replace the site’s URL with the new server’s URL.
Download WordPress Files and Upload Them to New Server
In the next, you need to download the files of the old host and transfer them into the new host. You can do this via your WordPress dashboard.
To do this, simply log into your WordPress admin panel, and go to Tools -> Export.
You will be linked to the Export Page on which you are able to choose something that you need to export. Select the “All Content” option which contains all of your website content. Thebn, click the “Download Export File” button and store the file on your local computer.
Also, you can download vis FTP. Open up your FTP client and go to the root, and we use the Filezilla to make it. Copy or transfer to backup the whole wp-content folder.
Now, you have done with the old server, and it’s time to upload the files to the new server. If you want your client can upload images and files via the WordPress admin panel, make sure your upload directory is writeable.
Create a Database on the New Server
Before upload the files, you need to have an empty database in the new server at first. Log into the new server control panel, scroll down to Databases, click on MySQL Databases. Under the Create a New Database, enter a name for your new WordPress database, then click the Create Database button.
As the new database has been created, you need to add a new user for the database. Under the Add New User, enter an username and password for the WordPress database, and then click Create User button.
Now, you need to add the new user to the database. Under the Add User To Database, select the database and user you created before, then click the Add button.
At last, you should grant permission to the user. Under the Manage User Privileges, check All Privileges to give the user total access to the database, and then click Make Changes button to complete.
Now, the database has been created, and you can import the database of the old server into it.
Edit the WP-Config.PHP File
When the new database is created, you then have to edit the WordPress configuration file wp-config.php. Back to the control panel, click the File Manage icon.
Go into the document root and find the file named wp-config.php. The file is always in the bottom of the list. Click and open it, and add the following lines of codes. Modify the configuration with the new database information.
Import WordPress to the New Database
At present, you can import the old WordPress files into the new database. You can also use phpMyAdmin to make it. Log into phpMyAdmin and click the database which you hope to import. Click the Import tab that is located at the top of the page, and click the Browse button to select the .sql file, then click the Go button.
After importing the entire WordPress database, you will get a confirmation showing that the tables have been successfully imported. Note that you can keep the old one as an extra backup.
Save Permialinks Setting Changes
At present, the WordPress has been moved, but you may notice that none of your pages are showing up. Because your WordPress database is configured with correct permalink structure, how ever the needed .htaccess file isn’t right. To fix it, login into your WordPress admin panel and go to Settings, then to Permalinks. In this way, WordPress can build a .htaccess file on your new server.
At present, you WordPress site has been moved, and your visitors can visit your site on the new server. Everything has been done perfectly.