How to backup WordPress to Google Drive
Checkout the benefits of a WordPress Backup to Google Drive.
Before storing your WordPress backups in Google Drive, you need a Google account. You can find a guide how to set up it here. After this, you need to authenticate BackWPup in Google Drive. Follow these steps:
- Log in to your Google account.
- Visit https://console.developers.google.com/apis/library.
- Create a new project and select it.
- Activate the Google Drive API for this project.
- In the sidebar, click on Credentials, then click in the link Credentials in APIs & Services.
Here you are redirected in a new page: click on the blue Create credentials button in the middle and select OAuth client ID. In case a Consent screen was never created, follow the Google instruction in order to set up a Consent screen. Here you have also to specify your site domain.
Then go back to the Create credentials button and select OAuth client ID.
- In your WordPress admin area go to BackWPup → Settings → API Keys and there to the section Google API Keys.
- Copy the displayed URL under Redirect URIs and paste it into the Authorized redirect URI field in the Google Drive form. Hit enter to confirm.
- Now click on Create.
- Copy the Google Drive client ID and paste it into the BackWPup backend in the field Client ID.
- Copy the Google Drive client key and paste it into the BackWPup backend in the field Client Secret.
- Save the BackWPup settings.
- Edit the desired backup job and choose Google Drive as backup destination. Or create a new job: BackWPup → Add new job → General, section Job Destination.
- Now you can see a new tab To: GDrive. Click on the tab.
- Click on Reauthenticate to authenticate BackWPup in Google Drive.
- You are redirected to Google and have to allow BackWPup access to Google Drive. Click on Allow.
After this, you will be redirected to your WordPress admin area, where you should see the successful authentication.
Please note: If you want to set up multiple WordPress backup jobs to the same Google Drive account, you can run into trouble with the authentication. Instead of creating a new job, copy the job where you first set up Google Drive. Make the changes to the copied job to keep the same authentication details.
- On the settings page, there are some more options:
- Folder in Google Drive: Name of the folder, where all backups will be stored.
- File Deletion: The maximum number of backups to be stored. Older backups will be deleted.
- Checkbox below File Deletion: Pushes the old backups to the Google Drive trash instead of deleting immediately.
- Test the correct Google Drive authentication by starting a backup job with this destination. If the run was successful, you should see your backup in Google Drive.