I screwed something up and had to delete my site and reinstall WP. I backed up the old database, but now WP is using a new database that it just created.
How do I get it back to using the old one that is still on my server? Is it a setting in WordPress dashboard somewhere or is it in cPanel or something?
edit – I changed the database name, user, and password in wp-config.php. Good thing I saved the original installation email with the old password. After doing this, the site just loaded a blank page, and then when I tried to log into domain/wp-admin/ it told me to click this button to update the database (I assume this was to the current version of WP since the old database was backed up on 3.4 and it currently has 3.4.1). Then once I logged in and changed the theme, it worked.
So I have all my old posts back but it seems I’ve lost the images. Oops. I guess images aren’t saved in the database, huh. It was still trying to load the old images they just weren’t there so I had to reupload them.
While all my posts were correctly showing on the homepage, I also had to re-save the Permalinks structure before the posts would show up when I clicked on them. Even though the default was /%postname%/, which is what I was using before, it’s still weird that I had to re-save it like that. Shouldn’t that be something that was saved in the database?
I’m sure guys all knew this already, I’m just leaving it here for future reference when I screw something up again.
Should I delete the unused database then so it’s not taking up space? Can I do that in myphpadmin?
to be honest it doesn’t matter. If it’s a new database it isn’t really taking up much space. You can delete it from cpanel if you’d like.