New! – BackWPup PRO with Restore function! Already over 10 Million Downloads!

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:

  1. Log in to your Google account.
  2. Visit https://console.developers.google.com/apis/library.
  3. Create a new project and select it.
    Create a new project and select it
    Create a new project

    Create project
    Create project
  4. Activate the Google Drive API for this project.
    Activate the Google Drive API for this project
    Activate the Google Drive API for this project

    Enable Google Drive API
    Enable Google Drive API
  5. In the sidebar, click on Credentials and then, if a consent screen configuration is requested because was never set before, like in the picture below, proceed clicking on CONFIGURE CONSENT SCREEN
    Click on CONFIGURE CONSENT SCREEN if no consent screen is set

    And in the next screen select the External option:

    Finally, in the next screen set an application name, your google account for email support and your own email address at the bottom for Developer contact.

    After that you can complete the process pressing the Save button in the next screens until you get back to the Dashboard.

  6. Now, if the consent screen is set, from the main dashboard click on the Credentials link, and then click in the link + CREATE CREDENTIALS and selectOAuth client ID.
    Click on the Credentials link, and then click in the link + CREATE CREDENTIALS and selectOAuth client ID

    Here you are redirected in a new page: select Web application under Application type and fill in a name for the web application. Leave the field Authorised JavaScript origins empty. For the field Authorised redirect URIs you need to go your WordPress Dashboard (see next Step).

    Set the Web Application
  7. In your WordPress admin area go to BackWPup → Settings → API Keys and there to the section Google API Keys.

    BackWPup → Settings → API Keys and there to the section Google API Keys
    BackWPup → Settings → API Keys and there to the section Google API Keys
  8. Copy the displayed URL under Redirect URIs and paste it into the Authorized redirect URI field in the Google Drive form.
  9. Now click on Create.

    Create the Redirect URI
  10. After that, the client is created and a form shows the Client ID and Client Secret.

    Client ID and Client Secret form
  11. Copy the Google Drive Client ID and Secret and paste them into the BackWPup backend in the field Client ID and Client Secret.
  12. Save the BackWPup settings.
  13. 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.

    BackWPup → Add new job → General, section Job Destination
    BackWPup → Add new job → General, section Job Destination
  14. Now you can see a new tab To: GDrive. Click on the tab.

    GDrive. Click on the tab
    GDrive. Click on the tab
  15. Click on Reauthenticate to authenticate BackWPup in Google Drive.
  16. You are redirected to Google and have to allow BackWPup access to Google Drive. Click on Allow.
    BackWPup access to Google Drive
    BackWPup access to Google Drive

    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.

  17. 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.
  18. 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.

    You should see your backup in Google Drive
    You should see your backup in Google Drive