In this web development tutorial I will be talking about how to move a WordPress installation from one server to another one. Moving a WordPress Website has two parts but before I explain to you how you can do this I need to explain to you (and I’m sure you already know this.) that WordPress has two parts,
Part 1 can be all the files in your website if you have a very customised WordPress installation that uses some files outside of the WordPress platform or just “wp-content” folder if you just made some changes to the theme and added some plugins and you are not using any external files.
Part 2 of the WordPress is it’s database, everything that you do from posting content, creating categories or registering a user to all the settings for WordPress and most of the WordPress plugins are stored inside the WordPress database.
For moving a WordPress installation you need to move both of these and make changes to some of them as necessary and here are the step by step on How to move a WordPress Powered Website(I will be sharing two different methods that you can use):
- Moving without Changing the Settings manually~You will use this if you haven’t change the WordPress itself, all the files as they are and you are not using any external files basically you only changes the WordPress Theme and added some plugins.
- Backup your database~ for this you can use this video:
- Backup “wp-content” folder~ you can just use a FTP program to do it or if it is not a large file size just use this trick it will make it faster for transfer; use a file manager on your cpanel and make a zip file out of the “wp-content” folder and download it, this way you don’t have to wait after each file and will cut down on the time you have to spend transferring the files(only useful if you are going to transfer a lot of files with a small sizes like themes, plugins,etc.)
- install on the target server~ just use an Automated installation script like Fantastico, SimpleScript or Quickinstall to install a new wordPress installation on the target hosting account, this way you don’t have to make the “wp-config.php” manually or just manually install it here is a video to help:
the way to do this is to make a sub-domain install in the sub-domain then use the cpanel’s file manager and copy everything to a temporary folder that you make then delete the sub-domain so you have all the files and database made and then add your domain as an addon-domain to the account which will give you a folder now move all the files back to that folder. - using MySQL manager like phpMyAdmin drop everything in the database and put all the data from the source database, if you need help look at the first video again.
- upload “wp-content” to the target website~ again you can do it the same way as step two but if you are using the zip method after uploading to the root folder of the webhosting account just “extract” it and overwrite everything
- Backup your database~ for this you can use this video:
- Moving with changing the settings manually~You can always use this method, so use it if the first method failed for some reason.
- Download all the files using FTP client program~ in this method you need to backup ALL files in the WordPress installation so it will take some time, you can use the zip method mentioned above if the size of the files is small(50MB or so)
- Backup database~ the same way as mentioned above just backup every thing
- create a database on the target hosting account~ usually you can do this using MySQL Databases section of your cpanel, what you do is to give your database a name, create a username and password, and associate the username/password to the database and give it ALL Privileges and store Database name, username and password inside a notepad or anything like that because you will be using it soon.
- make changes to “wp-config.php”~ you need to put in the information from your notepad or wherever you put the details into, into the “wp-config.php” file.
- upload all files to new web hosting account~ just like step 5 of the last moving method just use FTP or upload and extract (there is nothing on server yet so no need to overwrite anything)
- update the database~ just update the database itself use the method on step 4 mentioned above (moving without changing the settings) to put all the data back in the new database.
in Both cases you need to do the following for the move to be complete:
- if you have any direct, hard links to images or videos(http://domain.com/image.jpg) you don’t need to change as the address will change
- change the name servers to target the new Hosting account
- after the change make sure no new information has been added to your old site like if you are using mailing list or email system inside WordPress or if you are selling anything on your website, if there is added to your new site.
What I would suggest you to do is to move it to a sub-domain first, test it to make sure it does everything that you wanted to do for example some hostings won’t allow you to send emails using PHP so you need to talk to them first so do this before you change the name servers so you won’t have to have a lot of problems after you are done and you are happy with the way it works you use cpanel’s file manager and create a new folder copy everything from your sub-domain into it, delete the sub-domain, add the new domain which will give you a new folder then move everything into this one. it will take between 24-72 hours for the records to be updated(well that’s what the hosting company says but I had it in 2 hours as well!) and after the domain has changed then you can delete the old installation.
The easiest way to find if your domain is pointed to the new hosting account is to whois it on google and I would wait for 72 hours to be in a safe side.