At the time I wrote the “Back up wordpress using a plug-in” guide, I thought restoring the back up was just as easy as doing an import (Dashboard->Manage->Import->Wordpress) in wordpress. I was wrong. I did the import thing yesterday and I got nothing.
So I studied the back up file that was being sent to my email everyday. It has a file extension of sql which is different from the import file required by wordpress. WordPress needs a file extention of xml. So in a nutshell, file.sql is different from file.xml so it won’t work. However, I found a way to make it work and let me restore the back ups.
Should I share it with you? (*thinks about it–maybe not! mwahahaha* … *slaps self*)
So basically, I’m going to write a guide about this. I would be happy if you have some knowledge on SQL (Structured query language). If you are going to ask me what’s SQL, my answer would be, database. (as you can see, I can’t even define it..^_^)
- SQL file from the wordpress database back up
- Access to your blog database (I’ll be using phpMyAdmin for this guide)
- wordpress wp-config file
I will provide a brief summary of what this guide will do. This guide will teach you how to import the sql file you got from the wordpress database back up plug-in into your blog database.
Restoring the back up
Step 1: Know your blog database name
You can find this in your wp-config file.
Step 2: Add your database name into your sql file
I am not sure if the plugin author forgot this but if you don’t specify what database to use in SQL, it will return an SQL error. Just add this line on the top of the file.
Important: Use back quotes “ and not quotes ” .
Step 3: Import the sql into your database using phpmyadmin
Hopefully, it will import without any problems. After that, you can give yourself a pat in the back ^_^
If there’s something missing or you found some errors while doing the restoration of your database, please leave a comment and I’ll try my best to help you. Thank you.