The process of setting up and operating a WordPress site can be quite complex. But the last thing you want to do is stop there and never back up your WordPress site.
Over time, as you develop content for your site and increase traffic, there is always the risk of a server problem or hacker attack that will crash and potentially destroy your site.
Backing up your WordPress site is an important piece of protection against losing all of your content and all the work you’ve put into it. In this article, you will learn how to perform a manual full backup of your WordPress site and how to use the best WordPress plugins for automatic backups.
WordPress Backup Components
To understand how a WordPress backup works, it is important to understand the components of a WordPress site that need to be backed up for recovery.
- MySQL database: This internal database contains the content and configuration of messages. data for your site. This is the bulk of your website’s content.
- Basic WordPress installation: These consist of most of the files and folders contained in the root directory where your website is stored on the web server.
- Website Content: The wp-content directory contains all your theme and plugin files that you used to customize your WordPress site.
- WordPress Configuration: To properly connect to your WordPress database, you need to save your database login details. in the wp-config.php file stored in your root directory.
As long as you have a copy of the version of the base WordPress installation that matches the version of WordPress currently running on your site, you don’t need to back up your core WordPress files.
In this scenario, you only need to back up your MySQL database, wp-content directory, and wp-config.php file.
– / pre>
How to manually backup your WordPress site
If you already have a Core WordPress installation ZIP file, you can perform the fastest type of backup for your WordPress site.
- To back up your WordPress MySQL database, login to cPanel and under Files, select Backups.
- Scroll down to the “Partial Backups” section and under “Upload MySQL Database Backup” select the link for the WordPress database you want to back up.
- 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 in cPanel. In the “Recover MySQL Database” section, simply click the “Download” button and select the previously downloaded * .gz file.
- To upload only the wp-contents directory and the wp-config.php file, connect to the hosting network using your favorite FTP tool Use the FTP login ID and password provided by your web host to connect.
- Use an FTP client to upload the entire wp-content folder and the wp-config.php file.
Note. If you really want to do a full backup of everything in your home directory, on the same cPanel backups page under Partial Backups, you can click the Download button under Download Home Directory Backup and this will download all the folders and files in your site home directory.
Make automatic WordPress backups using plugins
Manual backups are quick and convenient, but remember to do them at regular intervals. If you forgot to back up and 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 restoring the last backup.
A smarter solution is to install one of the many great WordPress plugins that are available to automate the backup process.
There are many great WordPress backup plugins to choose from (see the list at the bottom of this section). The example below uses the UpdraftPlus WordPress backup plugin
UpdraftPlus allows you to back up your WordPress site to any popular cloud services like Dropbox, Google Drive, Rackspace Cloud, or even FTP or email.
- To install UpdraftPlus, simply download the plugin files and copy them. (using an FTP client) to the plugins folder in your wp-content directory.
- Once you have copied the folder there, login to your WordPress admin panel, go to plugins and activate the UpdraftPlus plugin.
- Upon activation, you will see UpdraftPlus Backups listed in the settings menu. Select it to go to the UpdraftPlus dashboard.
- To adjust the frequency of your backups, select the Settings menu. Here you can choose how often to back up your WordPress files (wp-content) and how often to back up your WordPress database.
- This is also where you select the cloud service you want to use for storing your backups. After you select the cloud service you want to back up to, the authentication information you must enter will appear below on the same page.
- To view the three most recent backups, simply select the Existing Backups menu.
On this page, you can click the blue “Restore” button to restore your site from a backup made that day.
Note. Every time you back up your WordPress site, UpdraftPlus stores three backup files in your Google Drive account with the backup date in the name. This means that three new files are added to your account as often as you back up.
So keep an eye on your Google Drive backups folder and don’t forget to delete very old backups to save space on your account.
Apart from UpdraftPlus, there are a number of great WordPress automatic backup plugins to choose from.
- Vaultpress: This plugin is paid but available. In addition to performing automatic backups of your site (keeping backups up to 30 days), it also provides security scans to protect against hackers and malware.
- BackupBuddy: Buy BackupBuddy in one go and use it on your site (or sites) forever. It can make automatic backups and save them to any primary cloud storage account. It also backs up WordPress core files, so no WordPress reinstallation is required after a complete loss of a website.
- BoldGrid Backup: This WordPress backup plugin is similar to the others, except that it also has a very useful feature that automatically rolls back your site to a previous working backup if a WordPress update fails.
- BackWPup: If you’re all about free plugins, this is a good alternative to UpdraftPlus. This plugin will perform automatic backups using a WordPress scheduled 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 moment to find that your chosen WordPress backup solution is not working as you expected is after your site has crashed or has been hacked.
So, once you choose one of the above solutions, practice doing a full backup of your WordPress site using this solution. Then do a full restore and make sure your site is still working as expected.
Before testing any of the automated WordPress plugin solutions, always perform a full manual WordPress backup using the manual procedure outlined above. This way, if the plugin doesn’t work or somehow corrupts your site, you will have an alternative backup that you can use to manually restore the site.