WordPress.org

Ready to get started?Download WordPress

Forums

Wipe out WordPress but retain posts and comments (8 posts)

  1. patrickw
    Member
    Posted 8 years ago #

    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?

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    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.

  3. patrickw
    Member
    Posted 8 years ago #

    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.

  4. patrickw
    Member
    Posted 8 years ago #

    Repairing the tables didnt help.

  5. patrickw
    Member
    Posted 8 years ago #

    Anyone have any ideas?

  6. vkaryl
    Member
    Posted 8 years ago #

    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.

  7. patrickw
    Member
    Posted 8 years ago #

    *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!

  8. vkaryl
    Member
    Posted 8 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.