In a moment of sheer stupidity, I deleted the wordpress database for a site of mine. Fortunately, it was a young site with only a few pages.

Now, I understand that everything that was stored in that database is gone - including posts etc. I was able to recover most of them using Google Webcache.

My question is, rather than re-installing Wordpress on my server, can I recreate just the database?

If not, what would be the easiest way to restore Wordpress to working order without losing all the little changes I had made which included plugins, modifications to the theme I was using etc? I feel this should be possible considering I still have all the files on my filesystem, just the database is missing.

  • 3
    The database saves all the options you had set, so those are gone, but you can use the plugins and theme files you already have. Just create a new database and edit the existing wp-config.php file to use it. You might also talk to your host and see if they have a full backup they could restore for you. – mrwweb Apr 23 '12 at 4:26
  • Hmm...it might be worth a shot to talk to them. Thanks. – xbonez Apr 23 '12 at 4:38

If the database is gone, your posts, pages, widget settings and other such data is gone. There's no way to "recreate" the old database. You need to reinstall WP and start with a site with no content.

If you have a copy of the theme and actual code modifications, that's good. There is a difference between what can be called the "static" content and the "dynamic" content. Dynamic is the actual page/post text content and is in the database. Static content are the theme and plugin files, uploaded images and other such files.

Ask your web host if they have a backup. And once you're up again, install a backup plugin and keep daily database and theme backups.

  • Yeah, learnt my lesson about backups the hard way. Any recommendations. My host is GoDaddy. I'll give them a call and see. – xbonez Apr 23 '12 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.