Importing Large WordPress Databases
Careful! This post is looking a little old and could be inaccurate in many, many ways
Last year I found that migrating a WordPress blog is a difficult task. In March I redesigned and rebuilt davidnaylor.co.uk with the intention to create a more business orientated website. The site was to become a fully functioning website with a blog attached rather than running everything through WordPress. Because of this the site was built from new on a development area, this was fine until it came time to move the WordPress database.
As the new site was more than just a WordPress theme the new site could not be simply integrated into the old website, the WordPress database would need to be moved. Simply importing the exported XML file from the old website was not possible due to the size of the file. The site had amassed 8MB of data while WordPress stated an upload limit of 2MB.
After failing in my attempt to do the same with the SQL export file, I was left with splitting the XML file into 2MB chunks. This is a long and boring process.
Now the problem has cropped up again, with an even larger XML file and I have tried once again to find a solution.
So is there a solution?
None that have worked for me. I did find a few solutions that try to increase the upload limit to 8MB through the php.ini or htaccess files but these failed. My problem is that the XML file is larger than 8MB and when trying to see if I can up the limit further than 8MB there is no way of testing if it’s worked. If you’re lucky some methods will alter the upload limit shown in the WordPress admin.
Next I found a WP Splitter program on GBMINI but as it’s coded in Visual Basic 6 I could not get it to run correctly on my PC. In my case it seems the only option to move the database is to split the XML file manually.
How about automating it?
In WordPress 2.7 the development team added a one click upgrade feature for the whole WordPress install that complements the previously added plugin upgrade function. It seems to me that a database migration option could also be added. Given you have all the correct details for the database you wish to migrate from it should be possible to access the database and copy all the data across. This creates a quick and easy way to get the information that is potentially unhampered by the amount of information being transferred. However this could also be the case of me talking about something that although sounds simple is rather complicated, or in fact completely impossible to do.
A Quick Note
In writing this I considered the option of simply pointing the new site to the old database and when the domain points to the new site it will simply work. This is of course the easiest option, but gives you no opportunity to test the website with the correct database until the site is live. This is of course a potentially dangerous method as many issues can arise including plugins and themes specific to the new site becoming deactivated.
If you’ve come across a method that works then add a comment below.