Can I do a Partial Database Restore?

Avatar
  • Answered
I would like to do a clean install of Wordpress because I have so many duplicate pages from various themes "dummy" content. I would then like to upload only my database of posts. I have exported and downloaded wp-posts.sql to my computer. My question is, can I just upload that file (the posts data) to a fresh install of Wordpress? Thank you. Simon
Avatar
christopherm
Hello Simon,

In phpMyAdmin, the "Drop" option is available on the same line as the table itself. You will see the following options: Browse, Structure, Search, Insert, Empty, Drop. Yes, you can do the new WordPress install first (which is what I did in my test) then go in and edit the table and import your wp-posts.sql data.
Avatar
christopherm
Hello Simon, Thank you for contacting us about a partial database restore. I ran a few tests to find a workaround for you in phpMyAdmin, but I'm sure you can use whichever SQL client you prefer. The issue is that the wp-posts.sql is of course not a full database, just a table. So you would need to "drop" that table from the database. I was able to make it work by "dropping" the wp-posts table in a new WordPress installation and then re-creating it and importing the wp-posts.sql file. Best, Christopher M