WP Manifestindependent plugin directory
manifest / updates / embeddronics-backup-pro

Embeddronics Backup Pro

One-click full WordPress backup & restore — database, files, plugins, themes, uploads — with local download and Google Drive cloud sync, real-time progress, and smart conflict resolution.

by Embeddronics · github.com/embeddronics-ltd/embeddronics-backup-pro · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/embeddronics-ltd/embeddronics-backup-pro/archive/refs/heads/main.zip

Embeddronics Backup Pro is a WordPress admin plugin for creating full-site backups, downloading them locally, restoring them later, and syncing backup ZIP files to Google Drive.

The plugin is implemented without external SDKs. Backups are created directly on the server, stored under wp-content/ebp-backups/, and optionally uploaded to Google Drive through the Drive v3 REST API.

What It Does

  • Creates on-demand backup ZIP archives from the WordPress admin.
  • Backs up the database as SQL.
  • Backs up plugins, mu-plugins, themes, and uploads.
  • Optionally includes wp-admin and wp-includes core directories.
  • Stores backup history in WordPress options.
  • Lets admins download backup ZIP files locally.
  • Restores from locally stored ZIPs, uploaded ZIPs, or Google Drive files.
  • Detects restore conflicts for plugins, themes, and uploads before overwriting.
  • Uploads backup archives to a site-specific folder in Google Drive.

Plugin Structure

Installation

  1. Copy the plugin folder into wp-content/plugins/.
  2. Activate Embeddronics Backup Pro from the WordPress Plugins screen.
  3. Confirm wp-content/ebp-backups/ was created and is writable by PHP.

On activation the plugin creates:

  • wp-content/ebp-backups/
  • wp-content/ebp-backups/.htaccess
  • wp-content/ebp-backups/index.php

How Backups Work

When a backup starts, the plugin creates a temporary working directory inside wp-content/ebp-backups/, exports the database to database.sql, copies selected directories, writes manifest.json, then compresses everything into a ZIP.

Each archive is tracked in the ebp_backup_history option with:

  • backup ID
  • local ZIP path
  • file size
  • creation timestamp
  • whether the file was uploaded to Drive

Retention is controlled by the ebp_max_backups option. Older local ZIPs are removed when the history exceeds that limit.

How Restore Works

Restore supports three sources:

  • a backup already stored in local history
  • a ZIP uploaded manually in the Restore screen
  • a ZIP downloaded from Google Drive

Before restore, the plugin extracts the ZIP to a temporary directory and scans for conflicts:

  • plugins already present in wp-content/plugins
  • themes already present in the active themes directory
  • top-level upload folders that already exist

During restore, admins can choose whether to keep the current copy or use the backup copy when a conflict is detected.

Google Drive Setup

The plugin uses OAuth 2.0 for a Google Drive connection per WordPress site.

Required Google Cloud Setup

  1. Open https://console.cloud.google.com/
  2. Create or select a project.
  3. Enable the Google Drive API.
  4. Go to APIs & Services > Credentials.
  5. Create an OAuth 2.0 Client ID.
  6. Choose Web application as the application type.
  7. Add the plugin callback URL as an Authorized redirect URI:
https://your-site.example/wp-admin/admin.php?page=ebp-gdrive-cb

Use the exact value shown in the plugin Settings screen for your site. The protocol, domain, path, and query string must match exactly.

In-Plugin Steps

  1. Open EBP Backup > Settings.
  2. Paste the Google Client ID.
  3. Paste the Google Client Secret.
  4. Save credentials.
  5. Click Connect Google Drive.
  6. Approve the Google consent screen.

After a successful connection the plugin stores:

  • ebp_google_client_id
  • ebp_google_client_secret
  • ebp_google_access_token
  • ebp_google_drive_folder

The Drive folder is created automatically the first time the plugin uploads a backup. Its name follows this pattern:

Embeddronics Backups - your-domain.example

Google Drive Issue Found And Fixed

The Google Drive configuration flow had a real reliability issue in the repo.

Root Cause

The settings screen rendered two separate forms with the same DOM id: ebp-settings-form.

That caused the admin JavaScript to bind the settings save handler ambiguously. In practice, this made Google Drive credential saves unreliable because the script could serialize the wrong form, depending on which matching element jQuery operated on in that context.

There were two related issues as well:

  • the Connect button could appear with only a Client ID saved, even if the Client Secret was missing
  • changing Google credentials did not reset the existing stored OAuth session, which could leave the plugin looking connected against stale credentials

Fix Applied

The repo now:

  • uses separate settings forms for general settings and Google Drive credentials
  • includes an explicit form_type in each request so the backend updates the correct settings only
  • requires both Google Client ID and Client Secret before generating a Connect URL
  • resets the saved Drive connection when credentials change
  • surfaces a more specific OAuth token exchange error when Google rejects the callback

Troubleshooting Google Drive

If the connection still fails, check these first:

  • The redirect URI in Google Cloud exactly matches the URI shown in the plugin settings page.
  • The Google Drive API is enabled in the selected project.
  • The OAuth client type is Web application.
  • Both Client ID and Client Secret are saved.
  • The site URL in WordPress matches the URL you used when creating the redirect URI.
  • The logged-in admin is completing the OAuth callback in the same browser session.
  • Your server can make outbound HTTPS requests to:
    • https://accounts.google.com
    • https://oauth2.googleapis.com
    • https://www.googleapis.com

Current Limitations

  • Backups run synchronously in the request; large sites may hit PHP execution or memory limits.
  • There is no scheduler implementation yet, even though a schedule option key exists.
  • Database restore executes raw SQL statements from the backup archive and should be used carefully on production sites.
  • The plugin stores Google credentials and tokens in WordPress options; hardening or secret management may be desirable for production use.
  • Google Drive uploads are manual from the current UI; backups are not auto-uploaded immediately after creation.

Development Notes

Useful repo checks:

Version

Current plugin header version: 1.0.0