How To Create A WordPress Automated Backup For Free!

by | Oct 21, 2017

INTRODUCTION

In some of our past articles we have touched upon the importance of backups. We first covered this topic in this article that specifically covered the topic of backups but this topic was also mentioned in our article concerning website security considerations. Many people store their backups on the same server that contains their website but this is a mistake.  What if the server is infected with a virus?  Worse yet, what if the data center is destroyed by some disaster such as a fire, flood, earthquake, or hurricane?  Can your business afford to be down for a week or more?  In this article we will tell you how you can setup a cloud-based WordPress automated backup for your website for free!

 

 

BACKUP STEPS

To accomplish this we will be using the free plug-in called “UpdraftPlus” and the Google Drive storage that is included with every Gmail account. If you do not have a Gmail account you can get one for free.  With each account you receive a free 15GB Google Drive in the cloud.  Here are the steps:

 

1. Click on add new plug-in

Add New Plug-in
 

2. Enter your search phrase (in this case “UpdraftPlus”) – be certain to check how many installs there have been, the quality rating, when it was last updated, and if it is compatible with your installation of WordPress

Install Plug-in
 

 

4. After it is installed click on settings

Plug-in Settings
 

5. Here you can choose how often you want the files and the database backed up and how many versions to store on your Google Drive – it is a good idea to perform the backup of the files and the database at the same time

Backup Schedule And Retention
 

6. Here we are choosing Google Drive but as you can see there are several other choices at your disposal. It will also ask you to authentic your access – if you are already logged into your Gmail account in this browser it will authorize your account based on that session.

Remote Backup Options
 

7. In this section I left everything set to the default settings except I did want an email sent to me when the site is backed up.

Other Settings
 

8. If you want to try a test backup, click on “current status” and then “backup now”

 Backup Now

 

 

RESTORE STEPS

To restore, select “Existing Backups” and then click on “Restore”

 If you look in your Google Drive in the UpdraftPlus folder you will discover the backup is only 5 files.

Actual Files

How is your entire site squeezed into only five files? In fact, this is not a full backup of your entire site. There is an interesting article located here explaining that if you only have the database and the contents of the wp-content folder you can restore an entire WordPress website and that is exactly what is happening here.

 

 

 

WHAT IF I CANNOT ACCESS MY WEBSITE TO PERFORM A RESTORE?

If your website is so badly damaged you cannot even access it, don’t worry. In order to test this backup/restore option with Google Drive these are the steps I took:

1. Created a test WordPress website with test data (blogs, pictures, pages, menus, etc.)
2. Installed UpdraftPlus and created a backup in Google Drive
3. Completely deleted the website (yes, I totally blew it away!)
4. Installed a brand new blank WordPress website on the same server and directory
5. Installed the UpdraftPlus plug-in and connected to my Google Drive
6. Performed a restore and…..the website was all there!

Now you may ask – in this scenario what about items such as .htaccess and wp-config.php? Don’t you need those?

I was somewhat confused about this as well. Let’s say that for your original site the database was named abcdefg_wp6 and when you create the new blank site your new database is named tuvwxyz_wp3. I thought when I restored the website it was going to re-create abcdefg_wp6 but I was wrong. It restored all the tables into tuvwxyz_wp3. This includes all your users, your pages, your settings, etc. Therefore, the new wp-config.php you created when you installed the new blank site works just fine.

The .htaccess file is another story. If you are using a security plug-in such as iThemes to secure your website you will need to re-apply all those settings as this new .htaccess file is completely generic and the previous version is not included in the backup/restore.

 

WRAPPING UP

In conclusion, since the topic of website backups is becoming more critical with increased hacking attempts this method of creating a WordPress automated backup should come in quite handy! Best of all, it is totally free!

UPDATE – After testing this we discovered one little issue.  If your website is brand new, is not crawled by search engines, and you have no regular visitors then WordPress will not be active on your website.  In this case the scheduler never runs and therefore the scheduled backups will never execute.  In this case the easiest solution is to keep the UpdraftPlus settings page open – it will make silent visits to the site’s front page in the background every few minutes.  There are more details regarding this topic on this page: http://updraftplus.com/faqs/why-am-i-getting-warnings-about-my-site-not-having-enough-visitors/