Skip to:

Backing up your Database and Files

Codex HomeGetting StartedBefore Installing → Backing up your Database and Files

Backing up your database and site files on a regular basis is essential to being able to recover from a tragic event as servers crashing,  site being hacked, or a human-made error. There are two important areas that you need to backup from your site, your database data and your WordPress files. There are different ways to create site backups, you can use plugins to create backups of your site that allow you backup automatically or you can manually create backups, we will discuss both ways in this guide.

It is recommended that you keep multiple backups of your site, just in case one of the backups is corrupted or lost. Also make sure the backups are regularly scheduled,  and are stored on different mediums, like a CD, thumb-drive, your email, and cloud storage like Dropbox, etc.

For more information about backing up your site , you can also follow the WordPress guide WordPress Backups.

Backing Up Your Site’s Files

Manually Backing Up Your Files With FTP
You can use an FTP/SFTP client like FileZilla and download all your site files to a folder on your computer. For example you can just download the files you created/last modified like custom bbPress templates or custom styles added to the bbPress stylesheet. There would be no need to copy the WordPress core files , as you can replace them from a fresh download of the WordPress zip file from One of the most important files to backup would be your wp-config.php file, as this file contains information about your database  configuration and other options about how your site is set up. The other important files are in the folder wp-content which contains all your installed themes, plugins , and all your uploading media.

In some situations you do not have to download all of your site’s files , unless you installed a new plugin or modified your theme. By default WordPress archives  your media files by months of the year, if you backed up your website last month you do not need to download the older media media files.

For more information about how to backup your files, you can also follow this WordPress guide Backing Up Your WordPress Files.

Automated Solutions to Backup Your Site’s Files and Database

There are a ton of pretty good free plugins that can backup your database and files in the WordPress plugin repository here. but if you are looking for an automated premium service look into using VaultPress by Automattic.

Backing Up Your WordPress Database

The database is an important piece of your site as it contains all your sites data in a bunch of tables usually prefixed with wp_ on a default WordPress install. When your users creates topics ,  replies,  or even just the information about the users , all of it is stored in the WordPress database tables.

Manually Backing Up Your Database with phpMyAdmin
The following is a step by step guide to manually backing up your database. For more detailed information about using phpMyAdmin to manually backup your database, contact your hosting provider or read the following WordPress guide Backing Up Your Database.

Automated Solutions to backup your database
These are just plugins that only backup your database

Also note that many of the top security plugins for WordPress also have an option to backup/restore your database.

Restoring Your Site

You need to learn how to back up your own site files and know how to restore them , so that if the day comes when you would need to restore a backup of your site that you are already prepared. So please try a test backup and restore it correctly so that you are familiarized with how the backup software works.

Please note to only restore as a last resort, if the issue is only from a simple , easy to fix  issue, then just fix that one issue. During a restoration of a site you will lose all the new data since the last backup was made.

For example if you made a backup on Monday and you have an error on your site on Wednesday  caused by a minor a PHP issue while editing template files, do not restore Monday’s backup or you will lose all of Tuesday and Wednesday’s data for just a minor issue that could easily be fixed.

Manually Restoring Your Files with FTP
As long as you just downloaded the wp-content folder and the wp-config.php file from your site for backup , then restoration would just be as easy as copying the files back into your WordPress site. Then, upload the rest of the files in your wp-content folder such as the plugins and themes, and your media files.

Manually Restoring Your Database with phpMyAdmin
Follow the WordPress Codex guide to restoring your database with phpMyAdmin, Restoring Your Database From Backup.

Other Ways to Backup Data

WordPress Back-end Export Tool
WordPress provides a way of exporting data by exporting your bbPress posts into an XML file.You will find this in the WordPress back-end in Tools > Export. This is just a quick way to backup your site , and not a replacement for a full backup process . It only backups content and no Database information on the site, it is best viewed as a quick way to restore a few posts that may have been lost and can’t be recovered from the posts revisions table.

Host’s provided backup software
Most WordPress hosting providers offer a limited backup services to backup your site. Make sure to contact your hosting provider to find out what backup services they provide.

Please remember that it is your responsibility to backup your website and do not rely solely on your hosting provider for backups.

Additional Resources

Skip to toolbar