Introducing Google Drive as a FlyWP Backup Provider
At FlyWP, we prioritise the security and reliability of your WordPress site backups. That’s why we offer seamless integration with Google Drive as a backup storage provider. With this option, you can automatically store your site backups in your own Google Drive account, ensuring that your data remains safe, accessible, and under your control.
To Setup Google Drive as FlyWP Backup Provider, follow these steps
- Enable Google Drive Storage API
- Create a Google Cloud Project.
- Go to the Google Cloud Console and select API & Services.
- Enable the Drive API by searching for “Google Drive API” and clicking the Enable button.
- Create a Service Account
- Navigate to Credentials.
- Select CREATE CREDENTIALS > Service Account.
- Enter a Service Account Name and note the generated Service Account ID.
- Click Done to create the Service Account.
- Create a Key for the Service Account
- Click the Pen Icon on the created Service Account under the Credentials page.
- Go to the Keys option.
- Click Add Key > Create New Key, select JSON, and click Create.
- Download and securely store the JSON file containing the private key.
- Add Google Drive as a Backup Provider to FlyWP
- Locate and open the downloaded JSON file.
- Copy the contents for setting up Google Drive as a Backup Provider.
After doing these, you have to add Google Drive as our Backup Provider in FlyWP. For that,
- Create a Backup Provider
- Navigate to the backup provider settings in FlyWP.
- Select Google Drive as the backup provider.
- Add Credentials
- Use the email address from the Service Account you created.
- Use the JSON file from the Service Account you created.
- Enter the necessary credentials from the JSON file into FlyWP.
Finally, to enable a site Backup, grant permission to our newly created Service Account to the Google Drive Folder and set the Site Backup with the Google Drive Folder ID.
- Grant Service Account Permission to your Google Drive Folder
- Create a Folder in Google Drive
- Share that folder with the Service Account Email
- Grant Service Account Editor Access
- Copy Folder ID
- Add a new site Backup Setting
- Create a site backup
- Set the Root Folder ID from Google Drive
- Start taking backups
We are going to describe the step-by-step process below:
1. Enable Google Drive Storage API
First visit Google Cloud Console and select API & Service
- Enable the Drive API: From the API & Services Menu, click on ENABLE APIS AND SERVICES.
Search for “Google Drive API” and click on it
Click the Enable button.
- After Enabling Google Drive API, you will be taken back to API & Service menu. From there you will have to create a Service Account for Secure Access to your Google Drive Storage.
2. Create a Service Account
Navigate to Credentials,
You should get something like the image below. From there, select CREATE CREDENTIALS > Service Account.
From there, you will be prompted for a Service Account Name. Set this to an easily recognizable name. After which, a Service Account Email ID will be generated as you type the Service Account Name.
Important: Keep a note of that, as you will need that at a later step.
After setting a Service Account Name, click on Done.
This will create your Service Account and take you back to The Credentials page.
3. Create a Key for the Service Account
Generating a Key:
After the Service Account gets created, you would have to create a Secret Key for Secure Access by FlyWP. For that, click on the Pen Icon🖋️ on the Service Account that was just created under the Credentials page.
![](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='2048'%20height='1044'%20viewBox='0%200%202048%201044'%3E%3C/svg%3E)
It will take you to your Service Account Management page. From there, click on the Keys option.
Click Add Key > Create New Key. This will give you a pop-up for what type of Key you want. Select Json then click Create.
By clicking on Create, the JSON file containing the private key will be downloaded automatically.
Note: Store this file securely as it contains sensitive information.
4. Add Google Drive as a Backup Provider to FlyWP
After the file downloads, locate the file, open it, and copy the contents inside. This will be needed for setting up Google Drive as a Backup Provider in FlyWP.
Adding Google Drive as a Backup Provider to FlyWP
Create a Backup Provider:
Navigate to the backup provider settings in FlyWP and click Add New Provider.
Select Google Drive as the backup provider. After clicking on Google Drive, you will prompted for two options. Give the Backup Provider a helpful name.
After that, paste the contents of the downloaded service account that was copied earlier. When you are done, click on Add Provider.
If everything goes smoothly, you will be welcomed with something like this.
Configure Site Backup
First step, you just created a service account and added it to FlyWP; Now you need to grant that Service Account Permission to access your Google Drive storage.
To do that, first, you need to create a folder in Google Drive.
Open the folder and click on the folder name. You will see some options available to you. From there, click on Share > Share.
It will take you to a page like this; here you will add your previously created Service Account email.
You can find the Service Account email from Create a Key for the Service Account step. Copy this email and put it into the Google Drive Folder Share option.
Grant the Service Account “Editor” access to make sure your backup functions properly. After that, click on Share.
Finally, copy the Folder ID of your Google Drive Folder. You can find the Folder ID on your Google Drive Folders Page.
This is the Root Folder ID that will be used for site Backup Settings. Copy this. It will be required later.
![](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='2048'%20height='1216'%20viewBox='0%200%202048%201216'%3E%3C/svg%3E)
Now from your FlyWP site, Select Backup > Backup Settings
![](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='2048'%20height='887'%20viewBox='0%200%202048%20887'%3E%3C/svg%3E)
Select the recently added Backup Provider, then in the Root Folder ID, paste the Root Folder ID copied earlier from Google Drive. After you are done, click on Save Backup Options.
And that’s it! You have now setup Google Drive as your Backup Destination. You can try taking a Manual Backup as a test.
Cheers!