Last weekend I nearly lost my entire blog and it was my own fault. I’ve been in a decluttering phase, so I went to my Bluehost account and decided to delete an old WordPress test install that I wasn’t using anymore. I didn’t think it would be a problem. I’d deleted WordPress installations in the past and the process had always left the database intact. This time it was different and I didn’t realise that till it was too late. When I deleted the test install, it took the database that my blog was currently using with it. Lesson learned: I will NEVER do that again!
Restoring The Blog With An Export File
My next problem was how to restore the blog. Luckily – or so I thought – I had exported all the posts and comments into a WordPress export file (go to Tools, Export in the WP dashboard). The first thing I tried was to create a new WordPress install in the root domain and import that file. For most people that is a good option and your blog should be back in no time. But it only works if the import file is less than 2MB – mine wasn’t, so the import failed.
Using An SQL Backup
Next, I trawled my email for that day’s backup file. I use WordPress Database Backup to email myself daily backups of the blog – and I had one that was only a few hours old. However, I wasn’t quite sure what to do with it. That’s when I remembered that I had had database issues when moving my blog to the current host and they had provided some instructions that just might help me get my blog back. Here’s what I did. If you need to do the same you will need to login to your domain hosting control panel. These steps also work if you set up a test blog and want to change it to your main blog.
Restoring Your Blog – Four Steps
Step 1 is to create a new WordPress installation, which automatically creates a new database. I’d already done that.
Step 2 is to import your backup SQL file into that database. I went into PHPMyAdmin, located the new database, clicked on ‘import’ in the navigation menu at the top, selected the file, hit ‘go’ and prayed. Luckily it worked.
Step 3 is to login to your site via FTP, remove your original WordPress files from your public_html folder and move everything from the test install directory into public_html. Before you do this, it’s worth moving your current theme and plugin files and any other customizations into the test install directory first. I took the chance to remove unused themes and plugins while I was doing this.
Step 4 (according to Bluehost) is to go back to your database and edit lines 1 and 39 of wp_options to point to your domain. I didn’t need to do this, since I had already installed the domain in the root folder.
The Blog Is Back!
If this has worked, you should then be able to login to your admin dashboard using your original credentials and check that everything is OK. It’s also worth taking a quick look at the site to make sure all the images are there. When I did that, I found some missing ones. Luckily, I was able to use an offline backup I’d made to restore the images.
Lessons Learned
What have I learned? That when you do a one click install with SimpleScripts, uninstalling will reverse the process completely, database and all. That it pays to backup by email. That it pays to backup offline. That you can restore your blog, even in those circumstances. Has this ever happened to you? What did you do?







Wow, you are really dumb, you know that! You shouldn't be giving advice to people.
I may sound rude, but ask yourself, isn't that the truth! After hundreds of horror stories on the web about how blogs have been lost due to back up related errors, here you go and commit a new one.
Gotto give it to you though. It takes courage to admit your stupidity on the internet that too on a well known blog like this one!
Evolve!
This was a new one to me, I'll admit. My mistake was in not realizing which database the blog was attached to, because the one that went was supposed to belong to a different installation.
Sorry, I didn't see the backup part when I first read the post.
You do sound pretty rude. Often times is takes making a mistake to realize one shouldn't do something. If you're not making mistakes, you're not trying very hard.
It's trivial to hose a site; the only mistake I saw was the no backup part. Even with backups, one must try them on a dev box or something to see if they'll work if needed.
Lesson learned for Mr Bloggingtips.com, and I'm sure bloggers will appreciate him heading off a db nightmare of their own.
Thanks, but I DID have backups, which was why I was able to restore the blog so it was better than new. However, I can't be the only person this has happened to, which is why I shared it even though it's not to my credit.
Not only in wordpress blog,but also all the data in computer or in website is always at risk. You may lose data from computer any time if computer is crashed for any reason. Similarly website data may be lost if it is hacked. So there is no substitute of data back up.
Thanks
Yakub
Whew! So glad you were able to get it back. I will take this post as a lesson to make a backup for my blogs.
Debbie
They really can save your life when something like this happens.
This was a innovative one to me, I’ll acknowledge. My fault was in not realize which file the blog was friendly to, for the reason that the single that went was made-up to be in the right place to a dissimilar setting up.