How To Restore Your WordPress Database

Unfortuantely it is a fact of life that sometimes your blog may get hacked, or it’s database may get corrupted.  If you have taken regular backups then you should have a “.sql” or “.sql.gz” database dump on your computer which you have downloaded from your blog.  If so then it is a simple job to restore it.

Log into your webhost account cPanel and look for the Database Wizard icon:

cPanel

Doubleclick on this icon and the Database Wizard will appear:

Restore Backup

Click on the “Restore” Button and the Restoration page will appear:

Restore Databases

Click on “MySQL Databases” and a screen will appear asking you to select the backup you wish to restore:

Select Database file to restore

Click on the “Browse” button and navigate to the database backup file (should have the suffix “.sql” or “.sql.gz”) stored on your computer and then click on the “Upload” button.

There will be a delay of a few seconds while your database backup file is uploaded to your webspace and then you should get a message saying the restoration is complete.

4 Comments

  1. Moira says:

    thanks Ian for this … I did wonder if I could use the cpanel route – but was a bit nervous to do it until someone more experienced confirmed it.

    Thanks so much for posting this tutorial – you make it so clear and easy to understand.
    Moira recently posted..Organize Your Online Business Tips – How To Take Control Of Your Hard DriveMy Profile

    [Reply]

    Ian Douglas Reply:

    Hi Moira,

    Glad to hear the little Tutorial was some help. Don’t forget that you can use the cPanel Backup Wizard to backup all the Files and your email settings, as well as all the Databases, in your webspace (hint, hint if you haven’t done this already).

    Yes; there are several plugins you can install in WordPress to create and restore the database… but what happens if WordPress becomes so corrupted/hacked that it cannot run? It is always good to know how to use the cPanel tools as they will allow you to restore a database even if every file in your entire webspace has been deleted.

    [Reply]

    Moira Reply:

    Thanks Ian for the hint hint – I had not done that! – thought my back up plugins would save me … ha ha now I am learning more tech stuff and enjoying it too!

    What you say is such common sense too – did not realise how much you can do through cpanel! Thanks for the information – you know so much more than you let on!!!
    Moira recently posted..Organize Your Online Business Tips – How To Take Control Of Your Hard DriveMy Profile

    [Reply]

    Ian Douglas Reply:

    Hi again Moira,

    WordPress plugins will not backup your email settings.

    Also some WordPress backup plugins will only backup your WordPress files and WordPress database so, if you have other things hosted in your webspace, it is handy to use cPanel to back up ALL your webspace files and databases. BUT a word of warning… make sure you do individual PARTIAL backups (databases seperate to files seperate to email setting backups) using the wizard; NOT a FULL backup as it difficult to restore individual items from the combined full backup, which is really intended for moving your entire hosting account from one webhost to another.

Leave a Reply

CommentLuv badge