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
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.zipEmbeddronics 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-adminandwp-includescore 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
- embeddronics-backup.php Main plugin bootstrap, constants, activation defaults, and class loading.
- includes/class-ebp-admin.php Admin menus, asset loading, and page rendering.
- includes/class-ebp-backup-engine.php Backup creation, manifest generation, ZIP packaging, and retention pruning.
- includes/class-ebp-restore-engine.php ZIP extraction, conflict scan, database restore, and file restore flow.
- includes/class-ebp-google-drive.php Google OAuth, token refresh, Drive folder creation, upload, list, and download helpers.
- includes/class-ebp-ajax-handler.php AJAX endpoints and Google OAuth callback handling.
templates/Dashboard, restore, history, and settings admin views.assets/js/admin.jsAdmin-side interaction for backup, restore, Drive, and settings flows.
Installation
- Copy the plugin folder into
wp-content/plugins/. - Activate Embeddronics Backup Pro from the WordPress Plugins screen.
- 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/.htaccesswp-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
- Open
https://console.cloud.google.com/ - Create or select a project.
- Enable the Google Drive API.
- Go to APIs & Services > Credentials.
- Create an OAuth 2.0 Client ID.
- Choose Web application as the application type.
- 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
- Open
EBP Backup > Settings. - Paste the Google Client ID.
- Paste the Google Client Secret.
- Save credentials.
- Click Connect Google Drive.
- Approve the Google consent screen.
After a successful connection the plugin stores:
ebp_google_client_idebp_google_client_secretebp_google_access_tokenebp_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_typein 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.comhttps://oauth2.googleapis.comhttps://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:
- Search the codebase with
rg "gdrive|google|oauth". - Review the settings screen in templates/settings.php.
- Review the OAuth flow in includes/class-ebp-google-drive.php and includes/class-ebp-ajax-handler.php.
Version
Current plugin header version: 1.0.0