Moving a WordPress Blog Using CPanel
17If you have noticed that I have not been posting for a few days, the reason is I have been moving my WordPress blogs from one host server to another. You would think this should be pretty straight forward and to be honest, once you establish the steps you need to take, moving a WordPress blog using CPanel is relatively easy. This is the method I used successfully for 5 blogs, so if you need the detailed version you can now click on the eBook image for a .pdf version of the instructions.
[ad name=”Adsense1″]Or if you are already familiar with CPanel the summary sequence is below.
- Using CPanel for the existing account, make a compressed file of the domain directory in file manager
- Download the zip file to a suitable location on your PC
- Go back into CPanel and using the back up Icon create a back up of the database for the domain being moved, and store it on your own PC
- For the new server, create the domain name either as a separate account using WHM or as an add on domain using CPanel
- Using CPanel for the new domain, go to ‘backup’ and restore the database downloaded earlier
- Go to file manager via CPanel and upload the zip file created earlier from your PC (note if the file is too big you may need to break it up into smaller files). Then extract all the directories and files making sure the directory structure is exactly the same as it was on the original host’s server
- With all the files reinstated on the new server, including .htaccess you will now need to re-establish a connection to your database,
- In Cpanel go to ‘MySQL databases’ and create a new user, the name and password can be anything you like as it is a temporary name and password you will only use once
- In the same panel add the user to the database, and assign all roles to the user
- Now you need to configure the database using the new users details
- Go to file manager for the new domain server via CPanel and look for the ‘wp_config.php’ file in the main directory. Select it and use ‘code editor’ to edit the file. You need to change the server name to the new name on the new server, change the user name to the temporary name you just created (including the automatically assigned prefix) and change the password to the password you created for the temporary name, then save the changes.
- Your website should now load using the temporary URL that allows you to view the files e.g http://123.456.789.10/~username But there will be an Error-404 page not found. The reason for this is that the ‘wp_options’ calls up the actual URL not the temporary one. So to view the website you need to go into wp_options find the 2 instances where the URL is defined and change it to the temporary URL. These are ‘site URL’ on the first page and ‘home’ on the 2nd page. The ‘wp_options’ tables can be accessed via ‘phpMyAdmin’ in Cpanel.
- Check the site loads properly using the temporary URL, and if it does you can then go back into ‘wp_options’ and put the site URL’s back to the permanent format. You will also need to update the file ‘upload directory path’ while you are in there to reflect the new server directory structure
- Now all you need to do is go to your domain supplier and change the named server to the new server and wait for it to propagate
- The end
Obviously there is a lot of detail involved in doing all this. So for the next site I move I am going to take screen shots to show each individual step in detail. As this is likely to be quite a lengthy document the best way to do this will be an eBook. I will attach the eBook to this post as a free download when it is completed. In the meanwhile those that know how to do all these steps should be able to manage without further instructions.
Moving a WordPress blog using CPanel sounds a little daunting but once you have done it you will realise that all of these steps are relatively easy to implement. Of course it can all go horribly wrong if you don’t pay attention to detail, so before starting make sure you do a back up of your blog using an .xml export in wp-admin and leave your blog intact on the original server until you are absolutely sure everything has been transferred successfully to the new server. Also do not change the named server to the new host until you have used the temporary URL to at least verify the site loads correctly showing the posts with no errors.
eBook as Promised
For those that need it, I have now attached a free ‘Moving a WordPress Blog Using CPanel’ eBook that documents the process for moving a WordPress blog in much finer detail. Hopefully you will be able to follow the instructions and will be able to move your blog without any problems. Just click on the Free eBook image to download a .pdf with the instructions.
Bear in mind that the procedure was written off the back of moving the blogs from one HostGator server to another and although the instructions will be fairly generic for using any CPanel module, if you do hit problems you will need to discuss those issues with your hosting sites technical support. They will be the most familiar with their arrangement and should be able to help you resolve any issues.
Take care and have fun!!!
Thanks for the mention 🙂
.-= Nina´s last blog ..Let There Be Exposure =-.
It is also easy to backup and transfer all your websites from one server to another server if you have cPanel installed:*:
Very nice tutorial. For those of you moving from your shared servers, to a VPS, I have a very quick way to move your site(s).
1. Create a full site backup in your cPanel and move it to your public_html dir.
2. Log into root shell in your VPS/Dedi and run ‘wget yourdomain.com/backupsname.tar.gz’ in your server’s /home dir.
3. Rename the backup file to yourusername.tar.gz
4. Run /scripts/restoreacct username
5. ???
6. Profit (you’re done once you change over your nameservers)
I have not tried this method out and have no idea if it is a good or not. But if it helps someone out leave us a comment and let us know.
I was looking for information on how to move a WordPress Blog using CPanel. You have given very nice details and information. This will really help me. Thanks for sharing and keep up the good work.
You are very welcome, I think quite a few people have found this useful. It is relatively straight forward to move a WordPress blog using cpanel once you know everything that you need to do, it is finding all the different stages that is the tricky part.
Thanks for sharing , I was looking for this for a long time…Regards,
Hey there.
I just read this and moved over my site ChristianTalentCommunity.com This is the best tutorial on this that I have ever read & put to use. Very detailed & very easy to perform the tasks. Thank You Very Much. God Bless You…
Glad it helped you out, I found there were a lot of gaps in the information available for performing this task and decided to fill in the missing pieces as best I could. Sounds like I may have at least got it partly right. 🙂
Could you clarify something in this process? At what point should you install wordpress on the new host site? I’ve only ever done this using Fantastico, which creates its own database. Should I move the old database over first? Or replace the Fantastico database with my old database?
Thanks in advance…
Hi Simon, I have to be honest it is quite a while since I wrote this procedure and I have not had to move any blogs since. So my memory of the exact steps is a little bit hazy. I am pretty sure however that by copying the zipped files onto your new server i.e. all the blog structure and files that were on the original server, that you should not have to install WordPress separately, you effectively do that when you upload all the files and unzip them, then restore the database. The main thing to remember is to test everything is working properly before changing the named servers from your old server to the new one in case there is a problem, how to do that is detailed in the eBook..
Thanks for the tips.
I am struggling to move wordpress site using cpanel details.
Normal sites are much easier to be moved across servers and wordpress site moving is causing me headache.
Hi Mike,
It can also be done using ftp, you basically have to download the whole site to your local PC and then upload it again to your new server. Of course back everything up before starting to make sure you can recover everything should something go wrong.
Thanks for the tips. I knew how to do it but couldn’t remember if I was hitting all points, and your list summed it up quickly for me.
Hi Frank, you are welcome, there is quite a lot to remember but when you have a list to refer to it makes things much easier.
Thank you for this tutorial which helped out this morning. Very clear and easy to follow.
Thanks again.
DesW
Hi Des, you are very welcome. Glad you found it useful.