If you’re a regular user of Google services, then Google Drive may be the most convenient way for you to back up your WordPess site. It only takes a few minutes to set up with the help of the new Google Drive for WordPress plugin. We’ll walk you through the backup process step by step so that you can start scheduling your site for automatic backups.

Step 1: Install Google Drive for WordPress
Google Drive for WordPress is free from the WordPress plugin repository. Install and activate the plugin and you’ll be ready to start configuring your app.
Step 2: Configure your Google account to give API access to the plugin
Once activated, the plugin gives you a new “Configure Google” menu item. Navigate there within your WordPress dashboard and then click on the link to the ‘Google API Console’ to create an OAuth 2.0 client ID.

Give the project a name, ie. “Site Backups”, and upload a logo for it (*optional).
Go to ‘API Access’ tab and click on ‘Create an OAuth 2.0 client ID’.

Step 3: Create a Client ID

Select “Web Application”. You’ll also want to click on “More Options” where you’ll be able to paste in the Authorization Redirect URI, as specified by the plugin in your WordPress dashboard. The ‘Authorized JavaScript Origins’ should be your site’s URL.

Create the Client ID and then scroll down to get your Client ID and Client Secret.
Step 4: Authorize access
Paste the Client ID and Client Secret into the plugin settings page in your WordPress dashboard. Now click “Allow Access”.

Step 5: Customize your backup settings
Now that you’ve authorized Google to receive your backups, you’re ready to customize the plugin’s backup settings. Check the boxes for directories you want to exclude from the backup. You can also choose to include a backup of your site’s database and set the frequency for the backup schedule.

Click Save and your backups will be scheduled. You can also perform a one-time backup by going directly to Configure Google >> Backup in the plugin’s settings.
Step 6: Check backups on Google Drive
The last step is to go to Google Drive and check to ensure that your backups are being performed on schedule. Click on “My Drive” to see your recent backups, which will appear as zip files in your list.

If for any reason your blog is ever compromised or you experience data loss on your server, your files and database will be safely waiting for you on Google Drive. You’ll have access to your backups from any computer or mobile device, as well as the ability to quickly share the backup through Google Drive to another user. Get your site set up for automatic WordPress backups with Google Drive if you don’t yet have a system already in place. You just may thank yourself for it in the near future!
I will readily confess to having tried bunches of different solutions to taking consistent backups of WordPress sites. Found a winner here. Perhaps biased because I run way too much of my digital life around Google services, but this one set up flawlessly, worked perfectly and well, is a solution I think I can stay with.
Thanks for the post, backing up is sooo critical. In addition to a paid solution, http://rocksolidtools.com/WPTwin, I use another free plugin – BackWPup – that allows storing backups to Folder, FTP Server, Amazon S3, Google Storage, Microsoft Azure (Blob), RackSpaceCloud, Dropbox, SugarSync and Send Log/Backup by Email.
Could’ve used this a few weeks ago. We got hit hard by hackers (FTP hack) and all of our sites were WP. This would’ve saved hours and hours of work. Doing this tomorrow – thanks!
wow, now that was a lame setup then… if you own a dedicated server contact me and i will give you a few tricks to secure your server…
I second BackWPUp; even more so I recommend to my students to use a paid service such as VaultPress either in tandem with a self-backup or by itself so that when the worst happens, you have actual support people helping you to restore things AND clear out any malicious junk that got in there….
Thanks for sharing the steps.It is really goood
Since you could list multiple URIs and JavaScript origins, it seems you could control backups of multiple sites with one setting. I tried two sites; the first one went OK, but the second generated an error that the token had not been received.
So I deleted the second URI and JavaScript origin. When I tried to reconfigure the first site, I got the missing token message with that site! I created new Client IDs for both sites, and both were configured OK.
So I guess I’ll create separate Client IDs for each website, but I still wonder why you could enter multiple URIs and JavaScript origins if you could only have one website per Client ID.
Uh, oh. I tried a manual backup and got this error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 8534958 bytes) in /home/lane/public_html/wp-content/plugins/wp-google-drive/class/zip-class.php on line 26
I guess this means I’ve got to mess with php.ini. Ugh.
Yep, changing 32M to 64M in php.ini fixed it… or at least it backed up this time.
The backups have filenames like 1234567890.zip, which gives no clue about which website it is. I’ve prepended the domain names to the two I tried, and it will be nice if future backups have the same number.
This is a really useful plugin and thank you for the very thorough setup instructions.
The plugin could be greatly improved by adding the simple option of selecting where in your Drive to save the backups. Also, I’m not quite sure it’s Multisite compatible… it doesn’t seem to be visible from the Network Admin, even if Network Activated. I’ve Activated it for my main site and so I’m hoping it backs up the full database and full network files.
Thanks for the rundown on a great plugin for such a critical service.
Getting a fatal error on the ‘On time backup’ after set up
Fatal error: Class ‘ZipArchive’ not found in /home/*****/wp-content/plugins/wp-google-drive/class/zip-class.php on line 10
For the ZipArchive class to be present, PHP needs to have the zip extension installed.
check the below installation instructions
http://www.php.net/manual/en/zip.installation.php
I’m stuck in a loop that states:
Please wait.. Process Loading…
Any idea how long this takes? It’s been going a couple of hours…
check the url for configure with more details
I get this error after giving the authorization:
Not respons
http://awesomescreenshot.com/0c5axsh86
The data are all correct, what’s the problem?
Thanks
BR
I think you are not enabled https on “Registered PHP Streams”
Please check phpinfo & enable https in “Registered PHP Streams”
Registered PHP Streams : compress.zlib, php, file, glob, data, http, ftp, phar
It should like this
Registered PHP Streams : compress.zlib, php, file, glob, data, http, https,ftp, phar
I think you are not enabled https on “Registered PHP Streams” , So we can’t able to connect url (https://accounts.google.com/o/oauth2/token“)
Please check phpinfo & enable https in “Registered PHP Streams” section
Registered PHP Streams : compress.zlib, php, file, glob, data, http, ftp, phar
It should like this
Registered PHP Streams : compress.zlib, php, file, glob, data, http, https,ftp, phar
Are you certain this is safe? It seems to ask to access to any and all files on your Google Drive and access to spreadsheets. I can’t think why that’s be needed, can you?
Surely i can say it is safe , because files move to google drive with well configure user account , anyother user can’t able access from out site
it is portable, we can access from anywhere and 5GB free for each account
I read all your help comments, went to my plugin folder and deleted this Google plugin. Why? Because it should not be so complicated.
Every plugin I installed (and I installed and uninstalled dozens of them) worked without a problem. Except Google plugins. This one and the track plugin are just dumb and complicated.
In my humble opinion, Google complicate things to a level of ridiculousness. The tracking script was a winner, I am clicking and moving from window to window and after five minutes of trying to Figueroa out what the hell is going on I deleted it.
This one is, unfortunately, no different. Installing it is a joke. Go here click that, copy this, do that. Seriously? And I know CSS, HTML some PHP and overall Internet stuff much better than average user.
No thank you, I will use the simple back up plugin. I get an email every 12 hours or so and that’s it.
Thank you, Sarah! This is really helpful.
Thanks for the tutorial, It’s very important to backup and automating this helps protect your site from failures. In addition to GDrive another solution is, http://wppilot.com managed backup service.
Hi!
I managed to install and configure this plugin. Everything seems ok but when I made a “one time backup” I get this error:
“Warning: file_get_contents(/homepages/13/d423835297/htdocs/logs/traffic.html/.md5sums) [function.file-get-contents]: failed to open stream: Permission denied in /homepages/13/d423835297/htdocs/wp-content/plugins/wp-google-drive/class/zip-class.php on line 28
Backup Successfully Updated to Google drive .”
I see in line 28 of “zip-class.php” and says:
$zip->addFromString( str_replace( $source . ‘/’, ”, $file ), file_get_contents( $file ));
I change permission for zip-class.php on server, but the error appears agin. Any clue of what´s is going on? And also.. Do I am doing the backup correctly??
Funny thing, is that in Google Drive a Got a New Folder with the backup! :O
i got this error.. pls help me
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 52641613 bytes) in /home/amaankha/public_html/blog/wp-content/plugins/wp-google-drive/class/zip-class.php on line 28
The most common fix to this is updating a few settings in php.ini .. look for the directive:
memory_limit
And bump it up .. one site that is running this successfully everyday has a setting of 256 Mb for that directive.
Thanks Sarah..It works.At first i got a problem with ”Error: redirect_uri_mismatch The redirect URI in the request”.But when i set the Redirect URIs as the settings page it works fine. :) Thanks again.
I have also made an article about Backing Up your WordPress blog :
http://www.squidoo.com/automatic-wordpress-backups-with-dropbox-free
And I also talk in that article about how to backup a free WordPress.com blog .
Hope that helps someone !
Cheers.