There are numerous articles that cover the process of transferring a WordPress blog from one server or host to another but I’ve found that most of them left me asking questions after reading them. I am a very visual person and hope the following article and images (Article with images available: Link is below this article) help you get your WordPress blog transferred successfully. The following article was compiled from firsthand experience of transferring two WordPress blogs from a Godaddy hosting account to my own dedicated linux server.
Step #1 -Backup Your WordPress Database:
Most hosting accounts include PhpMyAdmin which is what you will use to backup the WordPress database. The process really isn’t that difficult. The first thing you’ll need to do is find PhpMyAdmin within your hosts control panel. WordPress SQL Injection Test After you’ve logged into PhpMyAdmin you’ll need to do the following.
- Click on the database you need to back up. It will be located on the top left region of the screen.
- Click on “Export” on the top tool bar of PhpMyAdmin.
- Complete the following steps.
- In the Export box make sure all of the tables are highlighted and if they’re not click on “Select All”
- In the Options box make sure to select the following options in addition to the default settings. 1.) Add DROP TABLE/VIEW/PROCEDURE/FUNCTION 2.) Add AUTO_INCREMENT value 3.) Enclose table and field names with backquotes 4.) Complete inserts 5.) Use Hexadecimal for BLOB
- Lastly, towards the bottom of the screen make sure you select “Save as file” and then type a file name that correlates to your website and click “Go”. That’s it, your Database should now be backed up on your local drive.
Step #2 Transfer all of your WordPress files to the new server:
For the time being I’m not going to cover this step in extreme detail because there are so many different ways this can be done. I chose to use the FTP client FileZilla to complete this task which is free. If any of you would like me to add additional information on this step of the process please let me know and I’ll add it to this article.
Step #3 Create a new Database on your new server/host.
If you’re using Cpanel this task is extremely simple but should be a very similar process on other control panels.
- Click on “MySQL database wizard”
- Enter a Database name. This could be WordPress or anything else you’d like. Then click “next step”.
- Enter a Username and Password. Note: The Password must be entered twice and make sure it’s secure. (variation of numbers,letters, and cases) Then click “next step”.
- Select “All Privileges” and click “next step”. That’s It!
- Important Note: Make sure you write down the Database Name, Username, and Password or you’ll have to go back and find that information later.
Step #4 Edit the WPCONFIG.php
At this point you should have already copied all of your WordPress files to the new server and we now need to modify the WPCONFIG.php file with the new Database information. Once in Cpanel you need to complete the following steps.
- Click on “File Manager”.
- Select “Web Root” and make sure “show hidden files” is selected(May not be necessary but better safe than sorry).
- Find WPCONFIG.php within the file manager. Depending on where you copied the WordPress files on the server this file should be located in WordPress’s root directory. (Meaning it’s not located in wpcontent or wpadmin, it’s located in the same directory as all of the WordPress folders)
- Once you locate WPCONFIG you’ll need to click on the mouses right button and select “Edit”.
- You now need to alter three (possibly four) different items in the file.
- Database Name
- Database Password
- Database Host (If you’re hosting WordPress on your own server this should be localhost but may vary depending your hosting situation. If you’re unsure you’ll need to contact your administrator)
- Note on Charset Value: This value must match the value of your old Database. I left it at the default setting and everything worked correctly but I have read that having an incorrect charset can cause compatibility issues within the Database.
- Save Changes to the file and you’re done.
Step #5 Import your old Database tables into your newly added Database.
This is a step that caused some serious issues for me when I first tried transferring a WordPress blog. Whithout completing this step your new database will not function because it doesn’t contain any of the tables or information from your WordPress powered website. There are a couple of options to complete this task and your choice should very based on the size of your database backup. If you’re database is larger than 10mb in size you’ll likely need to use third party software to complete the task. If you’re Database backup is smaller than 10mb in size you can use PhpMyAdmin to complete the import.