In this series of tutorials, we will review the best practices for making your WordPress site is managed, maintained and secured.
We will feature selected free plugins to help secure your WordPress site, and make backing up and restoring your site easier. This series of tutorials will show you how, back up your site’s databases, move your site from one hosting provider to another and make sure everything is buttoned-down and secure.
This Best Practices for Administering WordPress Tutorial Series will address:
- Backup & database management tools
- Moving and restoring site
- Making your WordPress site secure
Backing Up Your Database Using phpMyAdmin
phpMyAdmin is the name of the program used to manipulate your database. Information below has been tried and tested using phpMyAdmin versions 2.5.3, 2.5.7-pl1, and 2.6.1-pl3 running on Unix.
Detailed options are listed below, though in most cases you will be fine with the default export options.
1. Log into phpMyAdmin on your server
2. From the main login screen, select ‘Databases’ (You may not need to do this step)
3. Now click the name of your database – or your WordPress database if you have several databases. (Your screen may look slightly different, depending on the version.)
4. The next screen will show you all the tables inside your WordPress database. Ignore those, and click the ‘Export’ tab on the top set of tabs.
6. Look at the left box at the top of the Export section. All the tables in the database you selected are in that box.
7. If you have other programs that use the database, then choose only those tables that correspond to your wordpress install. They will be the ones with that start with “wp_” or whatever ‘table_prefix’ you specified in your ‘wp-config.php’ file. If you only have your WordPress blog installed, leave it as is (or click ‘Select All’ if you changed the selection)
8. Ensure that the SQL radio button is selected.
9. In the SQL section tick the following boxes:
- ‘Add DROP TABLE / VIEW / PROCEDURE / FUNCTION’
- ‘Add IF NOT EXISTS’
- ‘Add AUTO_INCREMENT’ and
- ‘Enclose table and field names with backquotes’
10. In the DATA section it doesn’t matter too much what you check here, so long as you check the DATA box itself, the Complete inserts and Extended Inserts are mostly cosmetic changes to the output style, though Extended Inserts can help if you are having issues with the file size.
11. Tick the ‘Save as file’ option, and leave the template name as is.
12. Now click ‘Go’ and you should be prompted for a file to download. Save the file to your computer. Depending on the database size, this may take a few moments.
You have now backed up your database.
13. If you wanted, you could download a backup in each of the compression formats. Your choice. For example: None and “zipped”:
14. Remember – you have NOT backed up the files and folders – such as images – but all your posts and comments are now safe.
There are a number of plugins that can help with automated backup. As a whole, there turns out to be quite a number of issues with plugins:
- Backups can cause a spike in database and server load that may cause your hosting company to disable your site.
- Plugins are not always supported across version changes, so one that works perfectly now, may completely stop working with a new version, and you may not know it until you try to restore.
A couple of backup plugins that we do generally recommend are:
Finally, I recommend regular database optimization as part of a backup schedule. This can be done manually through phpMyAdmin or with one of several plugins:
Update 2014: We use to recommend Optimize DB but the plugin author has stopped supporting it.
Leave a Reply