When you are working on a revamp for your website and/or move to another host, one major concern is how you will be able to migrate all of the posts and information from the current website to the new one. Depending on the size of the data that you are moving, this could be a long process or a short one, but in both cases, it is rather straight-forward.
- The first step is to do a fresh install for the latest WordPress on the new server, you can follow my step-by-step guide to getting your WordPress blog up and running. You might be tempted into moving everything as is and just updating the database credentials, etc. but a fresh installation clears your blog from many potential problems. Ideally there would be a temporary URL that you could use while testing, after which you can update the DNS for your domain and go live
- If on a testing server, you should consider using the WP Dummy Content plugin which generates as much fake content as you want to act as placeholders and give you a clear idea of how everything will look on the final website
- Once the look and feel is as you’d like it to be, it’s time to install the plugins that you will be using for your website. One option could be as simple as downloading the folders in the “plugins” directory on the old server, but that’s definitely not the kind of attitude you want to take with you in 2010. The best practice would be to re-install the plugins one by one from within the new admin control panel. This will give you to option of researching better alternatives to any plugins you weren’t entirely comfortable with, and also assures that you have the latest of each one
- Your temporary testing website is now ready with all of the features and functionality, displayed via fake content. It is now time to import the content from the old website
- From the admin control panel of the old website, go to Tools > Export to create the XML file that you are going to be carrying to the new blog. If the content is large in size (over 1,000 posts), you might want to use the Advanced Export for WP & WPMU plugin, which facilities the filtering and segmentation of the different sections of the website
- In many cases, the XML file is too big to be uploaded directly into the new installation. Therefore, you can compress the file using the .gz compression, which is understood by the huge majority of servers nowadays. You can use an open-source application like gzip to compress the XML file to about a sixth of the original size. When you upload the file, your server will automatically uncompress it, meaning you will spend far less time waiting for the file to be uploaded
- Besides that size of the XML file itself, you could face the problem of reaching your PHP memory limit while uploading. This basically means that your server is only allowed to use a limited amount of memory before it stops whatever it’s doing. There’s a good guide at lost-in-code that shows you how you can increase that limit
- If the importing process goes smoothly and then suddenly stops at one point, there’s no need to panic. You can simply refresh the page, hence resending the script to be parsed and imported, and WordPress will automatically skip all of the posts that already exist. Meaning that even if it stops every couple of thousand posts, refreshing will make it pick up where it had left off
- NOTE: Although I haven’t tried this myself, there’s an alternative method for moving the content to the new location using a desktop application such as Navicat. In which case you would enter the database information of the two servers, and the program migrates the entries from server to server
- Final testing is necessary before you update the DNS on your domain name to make it point to the new server. It is generally good practice to work on a ToDo list with everything that needs to be done for the website to be final. Those that are urgent should be completed before updating the DNS, while the rest can be done while you are waiting for the DNS to be updated everywhere (could take up to 12 hours)
The best part of it all, is that it’s free. With the power of the open-source tools, you will always find the help that you need all over our beautiful web.