It is important to backup your WordPress website regularly. There are many ways to do this, but I recommend that you store your backups in a remote location.
If you have a (free) Gmail account, Google will also give you 15 GB of Google Drive storage. This is the perfect solution for storing your WordPress backups. This way, even if you lose access to your web hosting environment, you’ll still be able to access all of your WordPress files.
Google Drive’s 15 GB of storage should be enough for most websites. You can also upgrade your Google Drive to 100 GB, 1 TB or even 100 TB. For this tutorial, we’re going to use the free UpdraftPlus plugin to set up automatic backups to Google Drive.
The free version of UpdraftPlus can backup directly to Dropbox, Google Drive, Amazon S3 or FTP. If you would upgrade to the paid version, they’ll also let you backup to Microsoft OneDrive, Azure, Google Cloud Storage and SFTP.
Rather than just creating backups, UpdraftPlus also lets you restore those backups. In an ideal world, you will never have to restore any backups. However, in my 10+ years of experience with WordPress I have had to restore many backups already.
I am assuming that you already have a Google account with Google Drive. If you don’t, please create a free account here.
Our first step is to install the free UpdraftPlus plugin. In WordPress, go to Plugins > Add new and search for “UpdraftPlus”. Click “Install Now” and then click “Activate” to activate the plugin.
Now, in WordPress, go to Settings > UpdraftPlus Backups. Go to the Settings tab to set up your backup preferences. You can set up a backup schedule for your WordPress files and WordPress database.
In this screen, you can also define how many backups should be saved. Example: if you backup every day – which is more than enough for most websites – you can choose to retain a maximum of 5 backups. This will save you a lot of space in your Google Drive.
When you scroll down, the plugin allows you to select which files should be included in your backups. I would recommend to select Plugins, Themes and Uploads. The uploads folder contains all the files in your WordPress media library.
Link UpdraftPlus to Google Drive
Click the Google Drive logo in the Settings tab of the UpdraftPlus plugin (as shown below).
A new menu will now expand underneath. Before you continue, click Save Changes in the bottom of the page. UpdraftPlus will now open a new window asking you to Authenticate with Google. Click the link they provide and you will be sent to Google to choose an account (if you have more than one). Google will then ask you whether you want to allow UpdraftPlus to “View and manage the files in your Google Drive“.
Click “Allow” and you will be sent to a new screen. All you need to do now is to click “Complete setup” and you will be sent back to your WordPress admin panel. In the top of the window, look for the Success notification:
When you have successfully linked your Google Drive to the UpdraftPlus plugin, the plugin will be able to backup your WordPress files and database to Google Drive. If you have selected automatic backups (e.g. “Daily”), the plugin will automatically create your first backup.
Managing and restoring backups
In the UpdraftPlus settings, go to the Existing backups tab. You will find all of your backups here:
For each backup, you’ll be able to download the database, plugins, themes, uploads and other files. With a single click you will also be able to Restore the backup. Please note that if you click “Restore”, all of the changes you have made after the Backup date will be lost. You can also find all of your backups in Google Drive in a folder called “UpdraftPlus”.
If you lose access to the WordPress admin
In a total disaster scenario, you may lose access to your WordPress admin. This means that the above method of managing and restoring backups is no longer an option. The way to fix this situation is to download the version of WordPress that you were using from the Release Archive on WordPress.org . You will need to download these because the WordPress Core files are not backed up by UpdraftPlus. Next, take the following steps:
- Install the appropriate version of WordPress
- Install and configure the UpdraftPlus plugin (see steps above)
- Restore your most recent backup
After following these steps, your WordPress website should be up and running again. If you don’t manage to fix the issue, you could reach out to your hosting provider. They may be able to assist you.