Tutorial on How to Backup WordPress

Posted in Tutorials

Tweet This Share on Facebook Bookmark on Delicious Digg this Submit to Reddit

There are many ways to backup a WordPress site and I have tried several.  In this tutorial, I will show you how to backup WordPress using the BackUpWordPress plugin.  I like this method because this plugin backups both the database and the file system all through the WordPress dashboard.  And it has the ability to exclude directories.   No FTP or webhost access required.

1.  First install and activate the “BackUpWordPress” plugin by Human Made Limited.  At the time of this tutorial writing, the version is 2.4.3.  There are many wordpress backup plugins out there.  So confirm the name and version to ensure that you are installing the correct plugin.

The tutorial linked here will provided detailed steps on how to install and activate this plugin.

2. Once activated, this plugin will automatically backup your database on a daily basis.  If you prefer to perform your own manual backups and do not want automatic backups, you can adjust its settings by going to “Tools -> Backup” and clicking the settings link …

plugin settings

3. If you get something like this …

bad settings page

when you click the settings link, that means the page did not load properly for some reason.  Navigate back to WordPress dashboard home by pointing your browser address to /wp-admin …

wordpress dashboard home

Now go back to “Tools -> Backups” and click the “Settings” link again.  This time it should give you something like …

correct plugin settings page

I like to change the backup schedule to Manual Only and to backup both the database and files as shown in the settings above.

For a full backup for the WordPress website, you need to backup both the database and the file system (not just the database).  The database stores important information such as the content of your blog post.  But the file system is also important too.  It stores any uploaded images as well as your theme customizations.

Because I have set the schedule to “Manual”, it will no longer perform automatic backup.  I have to explicitly invoke the backup.   You can always tell it to perform a backup by clicking the “Run now” link in the “Tools -> Backup” page.

wordpress backup completed

wordpress backup completed

Here in the above screen shot, you see that one backup has been completed.   You can download the backup file (which is in zip format) to your local computer for safe keeping by clicking the Download link.  When you have accumulated too many backups, you can delete some old backups with the “Delete” link.

Note also that the plugin will automatically delete old backups after a certain number as specified in the Settings page.   By default the number of backups it keeps on the server is 14.  There is also a maximum total megabytes of backup that will be stored.

Okay, so you have downloaded the backup zip file to your computer. Note that it is important to keep the zip file in a safe place.  It is not something you want anyone to get their hands on because it contain config files with database access password in plain text and it contains all the information in your database.   Therefore, it might be delete the backups off of the server if you have downloaded them.  Although the BackupWordpress plugin does have protection against direct URL access to the backup files (using this technique here) as well as obfuscating the directory and filenames.

If you open the zip file up, you will see the WordPress file structure …

backup wordpress files

backup wordpress files

The file with the .sql file extension is the backup of your database.  And the rest of the files is your WordPress file system including your wp-content folder.

Now how to you use this backup to restore your site should something go wrong with the site?  Good question.  There is no easy restore utility.  You need to have a web developer familiar with WordPress and database restore to put the site back to the way it was.