Suddenly Gigahost fuxed up my webserver and then all my files were gone. Then I cried for a while, in my mind, and then I set to work restoring my site.
Luckily, my database was still intact so I could recover all my posts and comments but it did take a bit of fiddling. I couldn’t copy over my user info or my options because then WordPress broke, but that isn’t that big of a deal because I only have one user anyway.
This is what I did to use my old database in my new WordPress install and you could probably too if you use phpMyAdmin:
- Install a fresh wordpress to a new database, run the install script and log in to the new database
- I added myself as a new user and deleted the admin, but I don’t think this is necessary.
- Go to phpMyAdmin and select your old data base.
You need to copy the following tables: wp_comments, wp_links, wp_posts, wp_postmeta, wp_terms, wp_term_relationships and wp_term_taxonomy. That were the tables I bothered copying, at least. You do that by doing the following:
- Select one of the tables in the list to the left and then click the operations tap on the right of the list
- In the “Copy table to (database.table)” select your new database and type in the name of the table (or copy it from the “Move table to” field right above your current field.
- click the “add DROP TABLE” option.
- click “Go”
- Hopefully you didn’t get any errors or you are now, officially, in Trouble.
You should now have a working wordpress with all your old posts and none of your old design. Take it as an opportunity to spice up your website a bit. Also, take this opportunity to backup your website. I know I will.