by Steve, March 31st, 2008

Some time over the last few days, the software that runs this blog, or the database on the back end, decided to mess with me. All of my WordPress “Pages” were converted to “Posts,” which is why the links above to “About,” “FAQ,” and “Links” don’t work.

In real life, I’m employed as a software engineer. I fix buggy software daily. But I’ve been on a short vacation, and couldn’t be bothered to turn it into a busman’s holiday.

I’ll fix it one of these days. Meanwhile, if any readers are WordPress hackers and have seen this happen, I’d be happy to know how to fix it without having to restore from a backup (which is what I’ll be doing as a last resort).

5 Responses to “Oops…”

  1. Comment from Jon Tillman:

    Did your plugins magically disable themselves as well? Did you recently update to 2.3 or2.3.3 without disabling plugins? That can cause problems with plugins that use the wp_terms table. Find out what plugin is causing this and disable it.

    To turn them back into pages, change the posts table column “post_status” from “publish” to “static” and make sure there’s an apache rewrite rule to reflect the slug of the page.

  2. Comment from Jon Tillman:

    per above, the rewrite rule may not be necessary since they were pages first…test and see

  3. Comment from Steve:

    Thanks Jon, but no dice. The plugins magically disabled themselves, probably about the same time the pages converted to posts, and I hadn’t upgraded or changed anything. Honest!

    Anyway, I just upgraded to 2.5, and the old page permalinks now redirect auto-magically to the pages-as-posts. But I don’t see any way to change the post-status field (without dorking with the database in SQL). I’ll live with it as it is for now.

    Big improvements in 2.5, by the way. Thanks WP community!

  4. Comment from TriMetiquette:

    Hey Steve,

    Man, that’s a doozy. I would probably just get your theme files, write down your plugins you’re using, anything else… then just exporting your file, uninstall, and reinstall everything and import your stuff. Maybe that will switch everything around?

    Toughie. Good luck…

  5. Comment from Steve:

    Well, mystery solved. If you’re running WordPress, update to 2.5 ASAP.

    Also, make sure to lock down file and directory permissions, and check /tmp on your machine for files written by the account that your Web server runs as, e.g. wwwrun.

    I think I’ve fixed things here, but we’ll just have to wait and see if other exploits are discovered in WP, or if there will be lingering damage.