Setting up your site to run regular WordPress Backups will take you a few minutes of work, but it can save you a ton of trouble.
Many WordPress users learnt this the hard way. One day their site goes down, and what seemed like a temporary glitch, turns out to be an all-out data loss situation.
Since it is now so easy to backup your website, there is no reason why you shouldn’t. But why are WordPress backups so important? Do not web hosting companies swear to take care of this?
Why Should You Run Regular WordPress Backups?
There is a long list of things that could bring down your website. Data loss in your webhost, a malware infection, your files getting hacked, etc. Sometimes, you may even install a plugin or theme that takes down your site.
Many web hosts promise data backups. But we (and many others) have found you cannot fully rely on these. Even when they do keep backups, it is jumbled up with the data of several other websites.
In many cases, when you do a restore from webhost backups, you still loose weeks or even months of work. And even then, you should be happy you were able to do some restore. There have been cases where a website gets lost and no one could do anything to get it back. Not the webhost, not the site owner.
Since it is now so easy to run regular WordPress backups, it makes sense to secure all the effort you put into creating your website by running regular WordPress backups and storing them away from your server.
What Method Should You Use For WordPress Backups
There are many who still prefer a manual backup process, where you download your site files and database into your computer from time to time.
At Fixrunner, we prefer automated backups. This way, you can use a plugin to run backups of your files and database according to a schedule you set.
In this guide, we will show you how to use the UpdraftPlus plugin (which we highly recommend) to run automated backups to a remote location.
We will also show how to perform manual WordPress backups to your computer, for those who prefer this option.
HOW TO BACKUP YOUR WORDPRESS WEBSITE
Your WordPress website is made up two major parts – your files, which include your themes, plugins, uploads, etc; and your database, which is used to store posts, pages, comments, users, etc.
A full backup of your site involves keeping a copy of both your files and your database in a remote location. In this guide, we will show you how to do this using two methods:
- Using the UpdraftPlus backup plugin.
- Manually backing up files and database to your computer.
Backing up your WordPress site with UpdraftPlus
Using UpdraftPlus, you can easily backup your site to remote locations such as Google Drive, Dropbox, Amazon S3, etc.
The free version comes with ample features to help you run WordPress backups. You would only need the paid version if you need special features like encryption.
UpdraftPlus creates backups of the files in your wp-content folder, which is the only folder you really need to backup. This folder contains your themes, plugins, uploads, and other files unique to your website. The other folders contain WordPress core files which you can always download from WordPress.org.
UpdraftPlus can be set to automatically backup your site according to a schedule, or you can directly run a backup using the interface.
Automatic Backups With UpdraftPlus
In this section, we will show you how to set UpdraftPlus to backup your Website to Google Drive once every week. Depending on how busy your site is, you may decide that backups should run more often. For example, if your site gets 20 new posts daily, you may choose to set the backup to run once every day.
For someone who adds two posts per month, setting the schedule to monthly might just be good enough.
Here’s how to set up scheduled WordPress backups:
First, you need to install the UpdraftPlus plugin.
To do this, login to your WordPress dashboard and go to Plugins > Add New.
Search for UpdraftPlus and click Install Now.
When the installation completes, click Activate.
Next, go to Settings > UpdraftPlus Backups.
Switch to the “Settings” tab.
Set the “Files” and “Database” backup schedule to weekly, and leave the number of backups retained set to 2.
Scroll down to the “Choose your remote storage” section and click on Google Drive. When it expands the Google Drive options, right-click on “Follow this link to your Google API console…” and select “Open in new tab”.
Next, click on the My Project dropdown and click the plus button to create a new project.
Name your project and click Create.
Click on the My Project dropdown and click the project you just created.
Click Enable API at the top of the screen. When the API library opens, click Drive API.
Next, click Enable.
To use the API you just enabled, you have to create credentials for it. These credentials are the actual information used to connect UpdraftPlus to Google drive.
To start this step, click on the Credentials tab on the left, click the Create Credential dropdown, and select “Help me choose”.
Next, enter a name you choose for your Oauth client. Under “Authorized Javasript origins”, enter the url of the site you want to backup with updraft.
To get your authorized redirect URI, switch to the tab where UpdraftPlus is open. You would find this in the Google Drive section. Copy this URI and paste it in your credential setup page.
After pasting the redirect URI, click Create client ID.
In the next step, enter a product name and click Continue.
Click Done to complete creation of your credential. You will be taken to a page listing your credentials.
Click on the credential you just created to reveal your “Client ID” and “Client Secret”.
Copy the Client ID into the “Google Drive Client ID” input box in your Updraft Settings, and copy the Client secret into the “Google Drive Client Secret” input box.
Scroll to the bottom of the page, check the box to enable email notifications, and click Save Changes.
You would be prompted to authenticate Google Drive. Click on the authentication link.
If you are taken to Google login page, select the account you set up your credential with. Next, click Allow to authenticate UpdraftPlus.
After authenticating, you would be taken back to the plugin page and an authentication success message will be seen at the top of the screen. Also, your first backup would begin automatically.
And that’s it. You’ve successfully set UpdraftPlus to backup your WordPress files and database once every week.
A note about authentication: In some cases, when you try to authenticate, you get an error message like the one below.
To resolve this, click the Learn More link. In the next page, scroll to the “Apps for testing or personal use only” section and click the “Risky Access Permission By Unreviewed Apps” link. Lastly, click Join Group.
You can now go on to authenticate UpdraftPlus to use Google Drive.
Running a One-Time Backup Using UpdraftPlus
Beyond setting up a backup schedule, you may sometimes need to run a one-time backup of your site. For example, this would be necessary if you are about to make changes to your site that can break it.
To run a one-time backup with UpdraftPlus, go to Settings > UpdraftPlus Backups
Click Backup Now.
Leave all items selected to backup everything in your wp-content folder and your database, and click Backup Now.
If you however decide to make changes to what is backed up, note that you can expand each section by clicking the dotted lines.
After, clicking Backup Now, you would see a backup progress report indicating the backup has started. Depending on the size of your website, this might take a while.
When the backup completes, you would see a message in the “Last log report” like the one below.
That’s it. Your backup is complete!
Manually Backing Up Your Files And Database To Your Computer
Another way to backup your WordPress files and database is by storing them locally either in your computer, or in other physical media like an external hard disk, or a DVD.
To use this method, you would need to download your WordPress files and export your database.
As we already mentioned above, the main folder you would need to download is your wp-content folder. All other folders can simply be re-downloaded from WordPress.org.
However, you may also choose to download your wp-config file, especially if you have made many custom changes to this file.
Downloading WordPress Files using FTP
To download and backup your files using this method, you would need to connect to your web server using FTP. Read this guide to learn how.
After connecting to your server using FileZilla as explained in the guide, your website files will be displayed on the bottom right, while your computer files will be displayed on the bottom left.
In the computer files area, double click Desktop to open the desktop folder. This is so you can easily find the folder we are going to download into your desktop.
In the website files area, search for the folder that contains your WordPress files (usually the “public_html” folder) and double click to open it.
Next, search for the “wp-content” folder, right-click on it, and click download.
Depending on the size of your website, the download may take a while. Wait for it to complete.
When the download it completes, look at the transfer count section in the bottom left.
If the download was successful, “Queued files” should be empty, “Failed transfers” should be empty, and “Successful transfers” should show a high number.
Also, on your desktop, you would see a “wp-content” folder.
Next, you may decide to also backup your wp-config file. To do this, scroll down to find this file, right-click on it, and click Download.
This download should only take a moment. When it completes, the wp-config file will also be seen in your Desktop.
Now, create a folder named WordPress Backup and move both the “wp-content” folder and the “wp-config” file into this folder.
Manually Backing Up Your Database
You can easily backup your database with PhpMyAdmin.
This guide will show you how to do this using cPanel as your web admin panel, but the process should be very similar in other admin panels.
First, login to your cPanel account. The login details are the same you used in accessing your server through Filezilla, but you may ask your webhost for the login link if you do not have that.
In cPanel, scroll to the “Databases” section and click on phpMyAdmin.
In phpMyAdmin, click on Databases to view all databases in your account.
If you do not know which one is your WordPress database, you can find it in the wp-config file we downloaded in the previous section.
Open this file and search for the line that looks like this:
The part “Database_Name” will contain the actual name of your database. Find this database in phpMyAdmin and click on it.
When this database opens, click Export.
Leave “Export Method” set to Quick, and “Format” set to SQL. Click Go to start the export.
Your database SQL file would begin to download shortly. When this download completes, you have backed up your database.
Move the downloaded SQL file to the WordPress Backup folder which already contains your WordPress files. You may now decide to burn this folder to a DVD, or store it in an external storage device.
If you are using this backup option, you have to repeat this process often. Depending on how busy your site is, you could do it daily, weekly, or monthly.
How Can You Use This Information?
We cannot stress enough how important it is to run regular WordPress backups. If this was not a practice for you, please use the steps covered in this guide to set up a reliable backup process.
We would recommend that you utilize the scheduled backup option using UpdraftPlus. This method is simple, works well, and is being used in millions of websites.
You may also add an extra layer of safety by performing manual backups every once in a while in addition.
If, on the other hand, you prefer only manual backups. Go ahead and use the steps covered, but remember to do it often.
As a reminder, do not store backups within your server. It should always be in a remote location, such as in cloud storage (Google Drive in our example), or in your local computer, or burnt to a DVD.
Also, another thing you need to address to improve your site safety is to secure it against hackers. Read this article to find out how best to do this.