WordPress.org

Support

Support » How-To and Troubleshooting » Wipe out WordPress but retain posts and comments

Wipe out WordPress but retain posts and comments

  • Ok, so over time with upgrades and such the database has started acting up. I’d like to basically clear out the whole wordpress section of my database but keep the posts and the comments and that sort of stuff intact but get rid of everything else.

    Is there a way to do this without totally destroying my wordpress install?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Mark (podz)

    @podz

    Support Maven

    What do you mean by ‘acting up’ ?

    It’s a complex place in there and what you say isn’t quite as easily done as said.

    Tried repairing tables ?
    http://www.tamba2.org.uk/wordpress/repair/

    More explanation on the ‘acting up’ would be good though.

    Sorry for the late response.. but like, I can no longer apply or change themes (without physically modifing the database by hand), The RSS feeds are all screwed up and only work in a few of the RSS aggregators due to like.. a blank line at the head of the document.. (I think) and just stuff like that. I think repairing the tables might fix it. I will give it a try.

    Repairing the tables didnt help.

    Anyone have any ideas?

    You can do this…. but it ain’t easy….

    First, BACK UP EVERYTHING (files, database etc.) – TWICE. Reread that…. I’ve not done this myself, and if you lose what’s there now because you didn’t take that to heart, I’ll be sorry for you but I will NOT accept responsibility!

    Dump as “data only” (using phpMyAdmin) JUST the following tables from your current database: wp_categories, wp_comments, wp_post2cat, and wp_posts. Save these as text files on your hard drive.

    Delete everything in your current install folder. Reupload the whole damn shootin’ match and reinstall wp.

    Now. Access phpMyAdmin. Empty the tables you dumped (list above). Go to the SQL tab, and on that screen, using the browse function navigate to the text files for the table dumps you earlier created, one at a time. If you get clean insertions, you should be home free.

    There is the potential for errors: sometimes your phpMyAdmin dumps will have a different collation than the wp install does. If that happens, post back, I should be able to help you figure out how to edit so they work.

    I REITERATE: BACK UP EVERYTHING BEFORE YOU START. I also reiterate: I haven’t actually done this dance myself, though I have done similar things with other programs/databases. It should work. But that’s all the hope/help I can give you.

    *hugs vkaryl*

    Thank you so much. Posts are working, all the problems are fixed, and now my site is a step nearer for the css reboot. Thanks alot!

    You’re welcome. I’m glad it worked!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Wipe out WordPress but retain posts and comments’ is closed to new replies.