As WordPress developers we have to always face a simple process frequently and that is moving a WordPress websites. Albeit this not new thing for most of us who are well experienced, but its certainly for those who are entering in this field right now. Therefore, moving a WordPress website is a daunting task for a novice WordPress programmer since there are plenty of chances to commit some minor mistakes and have to suffer.
There are myriad of cases that we have to move WordPress websites and some noteworthy common cases first of all include the shifting from local server to hosting serve at the end of our WordPress website development. Here is we usually keep our website in the local sub-directory on the hosting server as most of the hosting providers offer this facilities. Once WordPress development is finish and we need to test our WordPress website on the web we have to shift our website from sub-directory to root directory of the hosting.
In another scenario we have to move the website from local installation or from our computer to remote installation means on our hosting. Finally we have to doing moving of website from one hosting to another hosting that is better in quality and price than old one. That is okay for a experienced WordPress developer to do this task, but for a novice developer, she should keep following instruction under consideration always in such moving.
In any case of moving you should have the backup of your website before you start shifting because there are chances that you commit some mistakes and you may lost files or data from your original website directory. Now, when you take backup you need to take backup of theme files, you uploads, your plug-ins, extensions or components as they may be useful in any emergency and finally your database.
Generally database backup in not simple copy and paste thing, but you have to use some tools to do that. These tools are phpMyAdmin which is widely used in all hosting, Sequel Pro in case of OS X, terminal commands, A MySQL desktop client and a backup plug-in like WP-DB-Backup, which will email your database as backup. We generally need to do some changes while we are moving website so a as good WordPress developer you have copy your database and add a suffix-old on its copy then you have to start editing the original database.
Sub-directory To Root
As stated above WordPress programmers have to perform this act frequently so if they are using a parent and child theme structure this process becomes extremely simple as you don’t have to move anything as this method will work on a standard installation of WordPress and applicable for most of the frameworks. Of course, you can go straight forward in some cases like multi-site installations or the sites using Genesis as a framework. The best aspect of this method is that it finished within moments and its speed is depending on the setup, means your choice during installation.