WordPress Blog Fix

By | 2007/10/24

Ok, some of you might notice a small hiccup in the blog-time continuum.  This is because I reverted to a backup earlier in the day after rebuilding the database from a fresh installation.  What a pain, let me tell you.  If you notice anything weird about the blog please let me know.  From my testing I wasn’t able to find anything.  This *should* be a good, working, fresh copy of the blog now.. I hope.

How Did I Fix It?

  1. I installed a new blog from scratch at a separate location using the latest version of WordPress.
  2. I used the Manage > Export feature within the original WordPress to export the posts, comments and categories.
  3. I used the Import > WordPress feature within the new blog to pull in the posts, comments and categories.
  4. I verified functionality, manually updated the blog name and URL, etc (mainly a few things on the options menu)
  5. Exported the new database via phpmyadmin and saved it to disk.
  6. Opened the .sql file with vim and did a find/replace to update the new blog url for the original (ie; :%s/zelut.org/ubuntu-tutorials.com/g)
  7. Verified the ‘siteurl’ value and ‘home’ value both matched the original site URL address.
  8. Threw out the original blog via phpmyadmin by selecting the database, ‘check all’ on the tables and selecting ‘drop’.
  9. Imported the newly exported and updated database to overwrite what was just dropped.
  10. Log back into the original site and the blog should be functional.

MAKE SURE YOU HAVE RECENT BACKUPS IF YOU ARE GOING TO FOLLOW THESE STEPS.  STEP 7 WILL WIPE OUT ALL DATA FROM YOUR CURRENT BLOG. PLEASE UNDERSTAND WHAT YOU ARE DOING. I TAKE NO RESPONSIBILITY FOR YOUR LOST DATA.  THIS IS MERELY THE STEPS THAT I TOOK AFTER NOT BEING ABLE TO FIND A SOLUTION ELSEWHERE.  ALWAYS KEEP REGULAR BACKUPS OF YOUR BLOG!

One thought on “WordPress Blog Fix

  1. Andrew Wells

    Glad it worked for you. The only negative outcome of this was that my feed reader downloaded all the entries as new again. No big deal though.

Comments are closed.