The process of setting up and operating a WordPress site can be pretty involved. But the last thing you want to do is stop there and never backup your WordPress site.
Over time, as you develop content for your site and build traffic, there’s always a risk of a server issue or a hacking attack taking down your website and potentially wiping out your site.
Taking a backup of your WordPress site is a critical piece of insurance against losing all of your content and all of the work you put into it. In this article, you’ll learn how to perform a full backup of your WordPress site manually, and how to use the best WordPress plugins for automatic backups.
Components Of a WordPress Website Backup
To understand how a WordPress backup works, it’s important to understand the components of a WordPress site that need to be backed up in order to recover.
- MySQL Database: This backend database contains post content and configuration data for your site. This is the bulk of your website content.Core WordPress Installation: These consist of most of the files and folders contained inside the root directory where your website is stored on the web server.Website Contents: The wp-content directory contains all of your theme and plugin files that you used to customize your WordPress site.WordPress Configuration: To properly connect with your database, WordPress needs the database login details stored in the wp-config.php file stored in your root directory.
So long as you have a copy of the version of the core WordPress installation that matches the version of WordPress you’re currently running on your site, you don’t need to backup the core WordPress files.
In this scenario, you only need to backup your MySQL Database, the wp-content directory, and the wp-config.php file.
How to Manually Backup Your WordPress Site
If you have your Core WordPress installation ZIP file already, then you can perform the fastest type of backup for your WordPress site.
To backup your WordPress MySQL Database, log into cPanel and under the Files section, select Backups.Scroll down to Partial Backups, and under Download a MySQL Database Backup, select the link for the WordPress database you want to backup.
You can save the *.gz file anywhere on your computer. Later, if you ever need to restore this database, you can return to the same page on cPanel. Under Restore a MySQL Database, just select the Upload button and select the *.gz file you previously downloaded.To download only the wp-contents directory and the wp-config.php file, connect to your web hosting account using your favorite FTP tool. Use the FTP login ID and password provided by your web host to connect.
Use the FTP client to download the entire wp-content folder and the wp-config.php file.
Note: If you do want to perform a full backup of everything in your home directory, on the same cPanel Backups page under Partial Backups, you can select the Download button under Download a Home Directory Backup and this will download all folders and files in your site’s home directory.
Perform Automatic WordPress Backups With Plugins
Manual backups are fast and convenient, but you need to remember to do them on a regular interval. If you forget to take a backup and you’ve created a lot of new content before your website crashes or gets infected with a virus, you could potentially lose all of that new content when you recover your last backup.
A smarter solution is to install one of the many excellent WordPress plugins that are available to automate the backup process.
There are a lot of great WordPress backup plugins to choose from (see the list at the bottom of this section). The example shown below uses the UpdraftPlus WordPress backup plugin.
UpdraftPlus lets you backup your WordPress site to any popular cloud services like Dropbox, Google Drive, Rackspace Cloud, or even FTP or email.
To install UpdraftPlus, just download the plugin files, and copy it (using the FTP client) to the plugins folder in your wp-content directory.
Once you’ve copied the folder there, log into your WordPress admin dashboard, navigate to Plugins, and activate the UpdraftPlus plugin.Once activated, you’ll see UpdraftPlus Backups listed in the Settings menu. Select it to visit the UpdraftPlus dashboard.To set up the frequency of your backups, select the Settings menu. Here you can select how frequently to backup the WordPress Files (wp-content), and how frequently to backup the WordPress database.
This is also where you select the cloud service you want to use to store your backups. Once you select the cloud service you want to backup to, the authentication information you need to enter will appear below in the same page.To see the last three most recent backups, just select the Existing Backups menu.
On this page, you can select the blue Restore button to restore your site using the backup that was taken on that day.
Note: Every time you backup your WordPress site, UpdraftPlus stores the three backup files in your Google Drive account with the date of the backup in the name. This means three new files are added to your account as frequently as you perform backups.
So monitor your Google Drive backup folder and make sure to delete very old backups to conserve account space.
In addition to UpdraftPlus, there are a number of excellent automatic WordPress backup plugins to choose from.
Vaultpress: This plug isn’t free, but it is affordable. On top of performing automatic backups of your site (storing up to 30 days of backups), it also provides security scanning to protect against hackers or malware.
BackupBuddy: Buy BackupBuddy with a one time purchase, and use it on your site (or sites) forever. It can take automatic backups and save them in any major cloud storage account. It also backups up the core WordPress files so reinstalling WordPress isn’t required after a full website loss.BoldGrid Backup: This WordPress backup plugin is similar to others, except that it also has a very useful feature that automatically rolls back your site to the previous working backup if a WordPress update fails.BackWPup: If you’re all about free plugins, this one is a good alternative to UpdraftPlus. This plugin will perform automated backups using scheduled WordPress job to one of your preferred cloud accounts. It will also check, optimize, or repair your WordPress database.
Practice Your WordPress Backup Solution
The worst time to discover that your chosen WordPress backup solution doesn’t actually work the way you expected it to is after your site has crashed or is hacked.
So, once you choose one of the solutions above, practice taking a full backup of your WordPress site using that solution. Then, perform a full recovery and ensure your site still works as required.
Before you test any of the automated WordPress plugin solutions, always do a full manual WordPress backup using the manual procedure described above. This way if the plugin doesn’t work or somehow corrupts your site, you’ll have an alternative backup that you can use to manually recover your site.