It’s always good to have current backups of your WordPress database archived at your home computer or on an external medium (USB drive, CD, DVD). Should your site be attacked or should your hosting server’s hard drive crash, you can be up and running with your site again in no time.
There are two approaches to database backups in WordPress. You can backup your database manually or automatically. I prefer the auto-backup approach simply because I tend to be forgetful.
Anyway, I’ll show you both approaches and you can decide for yourself which one to use.
Via Control Panel
To create a manual backup of your database, log in to your hosting company’s control panel.
Navigate to your
Once you click on
If your hosting company doesn’t offer a backup solution as explained above, there is another way to backup your database.
Log in to your phpMyAdmin control panel.
In the left pane of the window, select the
Your database will then download to your local hard drive.
To make the download much faster, you can select the
A compressed SQL database file takes up about 10-15 times less space (and download bandwidth) than an uncompressed one.
All good hosting companies create automatic daily database backups for their clients. Some keep the backups for one day, some for a week, some even for a month.
But in case that your hosting company doesn’t auto-create backups, here’s how you can create them on your own.
Install and activate the WP-DBManager plugin by Lester Chan.
Enter the settings that will work in most cases are:
Path To mysqldump: /usr/bin/mysqldump
Path To mysql: /usr/bin/mysql
…and click on the
If these settings are not working for you, contact your hosting company to give you the correct locations.
Backup Database with WP-DBManager
After the database options are all set, go to
You should see no errors (listed in red), only correct settings (listed in green):
But if you encounter an error such as this:
I’m sorry, your server administrator has disabled passthru(), system() and exec(), thus you cannot use this backup script.
…contact your hosting company or server administrator to make the necessary changes.
Or make the changes yourself. In my case, all I had to do was log in to my hosting company’s control panel and enable the three functions mentioned in the error.
Now you can check
To create a current backup of your WordPress database, scroll down and click on the
You can also select whether the backup file should be compressed with gzip or not. Sometimes the compression won’t work. In that case disable it and start the backup process again.
The backup file will be created on your server. To download it to your local hard drive, go to
Select the backup file you wish to download and click on the
WP-DBManager allows you to schedule automatic backups, too.
To set this feature up, go back to
You can then make WP-DBManager send each newly created database backup file to an email address.
When you are done with the options, click on the
Now you don’t have to remember to back up your database. You can have it delivered automatically to your email inbox once a day, once a week, or once a month — depending on the amount of changes you make to the database (e.g. the number of posts you publish, the amount of comments you receive, etc.).
Other Uses of WP-DBManager
You can use the WP-DBManager plugin in other ways, too. It lets you optimize or repair your WordPress database, empty or drop tables, or run SQL queries.
However, it’s probably wiser to make changes to the database directly via phpMyAdmin and not through your WordPress Dashboard.
Liked this post?
Subscribe to our newsletter to receive early notification of new posts and deals: