You work hard to create amazing content. You also work hard revising and updating your site with new plugins, themes, and more. If it hasn’t happened to you yet, it will: a new plugin that was not designed to work with your version of WordPress breaks everything. You can’t get into the Dashboard and deleting the files via FTP doesn’t work either.
What do you do??? Luckily, you have a recent database backup. Here is a step by step guide for creating a database backup and restoring your site. Please note: you must have the backup file BEFORE you can restore your site.
Using phpMySQL or a similar SQL database interface to create a backup file.
a) Select “Databases
b) Select the database of your WordPress install
c) Click the Export tab
d) Choose all tables (or just those that apply to your WordPress install)
e) Make sure the following options are ticked: “Structure, Add DROP TABLE / VIEW / PROCEDURE / FUNCTION, Add IF NOT EXISTS, Add AUTO_INCREMENT, Enclose table and field names with backquotes”
f) Leave all other options as default.
g) Click “Go” which will generate a downloadable file.
PhpMySQL cannot handle very large files, so if the process doesn’t complete successfully, you may need to use direct SQL commands to restore. If that’s the case, check out the official WordPress documentation on the subject.
In order to restore a database backup, follow these steps:
a) In the same (or a new) MySQL database in which you would like the new database to be located, click the “Import” tab.
b) Browse to the file generate in your last backup and click “Go”. This may take a while, but eventually you should see a success screen.
Check out the official WordPress documentation on the subject.
Bonus: How to export all WordPress posts easily
If you need to move your WordPress from one installation to another, here is one super-easy way to transfer all content between sites.
a) In your WordPress dashboard, on the left under the TOOLS menu, click “Export”.
b) You will be select which authors’ posts to export and whether or not to include all resources (images) attached to each post.
c) Click “Ok” and you will download an XML file which can be uploaded through the Export area of any 2.x + release of WordPress.
d) That’s it! Easy huh?