Lost WordPress Posts During Export to Rackspace Cloud Database or any new Database Server? Vanished Posts? All MySQL knowledge Failing? If you followed some standard way, like we described in guides like Setup Separate Database Server on Rackspace Cloud and Export WordPress MySQL Database on Rackspace Deployment; it can happen (actually happens to many users), you will find posts of certain date range has been vanished. We suddenly found that the post on XMPP Protocol has been vanished and other plugin is redirecting to Protocols related to Internet of Things. After mini investigation, it became obvious, posts from the 19th July 2014 to 25th July 2014 has been vanished.
Restore Lost WordPress Posts During Export : What to Do
WordPress, unfortunately is one of the worst web software written in PHP and makes MySQL to appear as a bad Database technology. You can try to follow the guide to run SQL Commands to Clean WordPress Database, but possibly your export size of database will be lesser than the total size – indicating a for sure loss of data. Frankly, it is impossible to restore the Posts from MySQL database. There many tables, rows are associated with one Post.
We did lot of workaround and found an easy way – exporting the Posts of the date range as XML file. It is quite abnormal that XML files are rightly generated. By the way, if you have some PUSH message Plugin installed on WordPress website, deactivate it. When we will export, the posts will ping the subscribers.
Restore Lost WordPress Posts During Export : Steps
SSH to your main server, first cd to where the
wp-config.php file is present. Open with
vi – if you abnormally love
nano) and change the database to the older one. So, your WordPress will run with those old lost posts.
Now, go to
your-domain.com/wp-admin/export.php – simply it is the default Export feature available under Tools inside WordPress Admin Panel. Select a Date range and export them as
xml file. Again, open
nanoand change the database to the newer one. Now, you need to use the default Import feature available under Tools inside WordPress Admin Panel. Import the
xml file and do what WordPress will ask to do on GUI. All posts will be restored.
As you already have the
images and other media inside
wp-content folder, you need not to do any other step. Next time, you should not depend on database export but that default Export. Also consider to create a new installation of WordPress as Sub Directory for the newer posts, it is a bit about planning. WordPress possibly can not handle Posts more than 5K+ rightly.
Follow the Author of this article :