RVS Database Doctor
RVS Database Doctor
Description
RVS Database Doctor is a professional database administration tool. It gives you insight into the current state, safely cleans and optimizes, and shows exactly how much you saved – with full support for large databases.
Key features
- Dashboard with health score and one-click Optimize Now.
- Time-based job runner (default batch 1000, auto-adapts to
max_execution_time) – works smoothly on databases with 100k+ rows. - Background queue (WP-Cron drain every minute, Action Scheduler when available) – you can close the tab and the job continues.
- Before / After snapshots with SVG charts and per-table delta (no external dependencies).
- Guided Safe Cleanup Wizard with recommended selections, CARE confirmations, before/after snapshots, and cleanup result deltas.
- Smart Advisor v2 – health score (0-100, grade A-F), actionable tips, and EXPLAIN query-plan hints for slow queries.
- Bulk actions for Table Sizes, Autoload Options, Index Analysis, and Cleanup tabs.
- Manual full database backup with a user-selectable table list and manifest.json metadata. Choose PHP chunked dump (works anywhere) or native mysqldump (fast).
- Full-site backup stored as one archive that contains both the database dump and the wp-content ZIP, with a signed manifest and selective table/file restore. WordPress core and wp-config.php are excluded from this backup. Uses native mysqldump and an uncompressed ZIP by default when the host supports them, with PHP chunked dump and directory-copy fallbacks.
- Migrate any full-site backup into one portable package plus a standalone
rvsmigrate.phpinstaller. The package contains the database dump, wp-content, WordPress core and wp-config.php (all checksum-verified), so an empty hosting account is enough. Upload both by FTP, open the installer, and it extracts the files, imports the database into the new database and rewrites the old URL to the new one – including serialized widget, menu and theme data. - Full database restore from plugin-created backups – automatic pre-restore backup, streaming SQL import, progress tracking, and mandatory confirmation (type RESTORE).
- Micro-backup of affected tables before destructive operations (gzip when available, retention by days and count).
- Scheduled optimizations – hourly / daily / weekly / monthly.
- Scheduled health digest emails – daily, weekly, or monthly summaries sent to the configured notification email.
- MyISAM InnoDB conversion (batched with progress bar).
- Autoload analysis with severity levels, segmentation, search, filter, pagination, and bulk update – no longer limited to 50 options.
- Index analysis – missing expected, composite suggestions, sys redundant / unused.
- WooCommerce / HPOS detection and specific suggestions.
- Cleanup: expired transients, revisions, auto-drafts, old trash, spam / trash comments, orphan postmeta / commentmeta / term_relationships, expired WC sessions, Action Scheduler old actions / logs, duplicate postmeta, stale session tokens,
_edit_lock/_edit_last. - Actions log – every attempt is recorded (success / error / dry-run).
- WP-CLI commands for every action including
backup create --all,backup validate <uid>, andbackup restore <uid> --confirm=RESTORE(wp rvs-database-doctor …;wp rvs-db-doctor …is also supported).
Safety rules
- All destructive actions require the
manage_optionscapability + nonce + explicit confirmation checkbox. - Table names are validated against
information_schemabefore anyALTER / ANALYZE / OPTIMIZE / DELETE. - Auto-backup of affected tables before destructive operations (enabled by default).
- The plugin never deletes anything automatically; Optimize Now runs safe categories only by default.
Installation
- Upload the
rvs-database-doctorfolder towp-content/plugins/. - Activate the plugin from the Plugins screen.
- Open Tools RVS Database Doctor and start on the Dashboard.
- (Optional) Visit the Settings tab to configure batch size, time budget, and retention.
Faq
No. Every action requires an explicit click and confirmation. Schedules (if you create any) only run the job type you selected.
No. WooCommerce is optional. The plugin auto-detects it and surfaces WC-specific options (HPOS, sessions, Action Scheduler) when available.
The plugin uses a time-based runner: each AJAX request processes batches until the time budget (~25s by default) is exhausted, then the browser (or WP-Cron in background mode) triggers the next tick. You can raise the batch size in Settings (up to 50000) or run the job in the background and close the tab.
Partly. RVS Database Doctor provides database backups and full-site backups of the database plus wp-content (plugins, themes, uploads and mu-plugins). WordPress core and wp-config.php are excluded. Keep an independent backup for complete disaster recovery. Full restores including authentication/options tables require trusted WP-CLI and a period without other writes.
Yes, if your host allows shell_exec() and provides the mysqldump binary. The Backups tab detects availability and lets you pick the method per backup.
Operations are scoped to the current site, with guards for shared and other-site tables. Analyzer caches are site-scoped, and uninstall handles per-site data. Live multisite deployment was not part of the 2.7.0 local audit; multisite behavior was checked with isolated tests.
Reviews
Great
By ramirezgulit on July 5, 2026
Finally something all in one, great job to the devs
Changelog
2.8.7
- Fixed: native mysqldump backups override the autocommit wrappers enabled by default in MariaDB 11.8, preventing Unsupported SET syntax failures. Unsupported SET errors now identify the variable without logging its value.
2.8.6
- Fixed: missing Action Scheduler purge-button text and other new control labels caused by invalid character encoding in admin templates.
- Added: exact, source-backed table signatures for 14 common plugins, including Elementor Pro submissions/notes, Forminator, Wordfence, Smart Slider 3 and wpDataTables. Exact matches distinguish wpDiscuz wc_* tables from WooCommerce; Elementor Free does not hide leftover Pro tables.
- Fixed: Advisor only offers WooCommerce Tools when WooCommerce is loaded and the current user has permission; otherwise it directs users to Cleanup.
- Added: batched emptying of all Action Scheduler actions and logs with PURGE confirmation. Requires inactive Action Scheduler providers and cannot be scheduled.
- Fixed: retention cleanup handles old actions without a last-attempt date consistently with candidate counts and previews.
- Fixed: known table signatures no longer hide leftover WooCommerce and other plugin tables as if their owners were active.
- Changed: expanded plugin identification for potential leftover tables while preserving protection for active owners and the Action Scheduler runtime.
- Added: selection of wp-content directories for site backups, with the selected scope stored in the signed manifest. Partial backups cannot be used as full migration packages.
- Added: hourly, daily, weekly and monthly automatic backups from the Backups tab, preserving selected directories and export methods, with pause, resume and delete controls.
2.8.5
- Changed: the standalone migration installer imports the database dump in batched multi-statement transactions (up to 2000 statements or 512 KB per round trip, one commit per work slice) instead of one query per statement. Import slices are 5-15 seconds depending on the host limit and the wizard resumes 100 ms after each slice.
- Changed: database restores verify the dump checksum once per job and reuse the signed journal’s verified size/mtime on later ticks, instead of re-hashing the whole dump every second. Restore journal checkpoints are batched and each work slice is longer, making large restores many times faster while keeping the fail-closed no-replay policy.
- Added: full-site backups are stored as one archive containing both the database dump and the wp-content ZIP. Restore extracts the needed parts on demand, so the backup folder holds a single artifact.
- Added: full-site backup method selection. Automatic mode uses native
mysqldump(single transaction, quick, extended inserts) whenexec()and the client are available, and falls back to the PHP chunked dumper otherwise. The file archive can use an uncompressed ZIP (fastest), a compressed ZIP, or a directory copy when ZipArchive is missing. - Added: Migrate panel on the Backups tab. A full-site backup is packaged into one portable archive that also includes WordPress core and wp-config.php, so no fresh WordPress installation is required on the destination host.
- Added: standalone
rvsmigrate.phpwizard. It detects the package, extracts the files, imports the database into a new database, optionally adopts a new table prefix, and rewrites the old URL to the new one with serialization-safe replacement. - Added: migration packages are served through the existing authenticated download handler; the installer is downloadable from the same panel.
2.7.2
- Fixed: stranded running/pausing jobs can be canceled without another browser or cron tick. Database locking preserves active-worker safety, and completed jobs remain unchanged.
- Fixed: Cancel immediately finalizes preparing jobs, including abandoned preparation records.
- Fixed: late preparation completion cannot requeue a canceled job or overwrite its canceled status with a failure.
- Fixed: failed or rejected Cancel requests now show an error in the admin.
2.7.1
- Fixed: native mysqldump backup validation accepts MariaDB NOTE_VERBOSITY bookkeeping without executing it during restore. MySQL dumps omit GTID/replication state for selected-table backups.
- Added: backup directory controls to apply Apache protection, recheck public access immediately, and show Nginx configuration and terminal instructions.
- Added: explicit, revocable administrator consent for backups in publicly readable storage, bound to the current directory and URL, covering manual, background and automatic backups.
- Fixed: admin-bar spinner counts only preparing, queued and running jobs, excludes the cron drain hook, and refreshes on all plugin tabs and pages without the jobs table.
- Fixed: Apache protection compatibility, storage-scoped exposure caching, and symlink guards during backup-directory setup.
- Changed: en/em dashes, including HTML entities, use the ordinary hyphen-minus throughout the current plugin.
2.7.0
- Added: table ownership registry for plugins and themes, with centralized site/table scope validation.
- Added: full-site backups of the database and wp-content, signed manifests, ZIP archives, and selective database/file restore with impact previews. Complete restores including authentication/options tables require trusted WP-CLI.
- Fixed: MariaDB session restoration, composite/no-primary-key backups, false schema-change failures, and maintenance of plugin runtime tables.
- Fixed: large restore checkpoints exceeding max_allowed_packet; buffered SQL stays in the signed on-disk journal instead of job metadata and AJAX responses.
- Fixed: empty cleanup selections remain no-ops; malformed AJAX selections and invalid schedules are rejected instead of silently changing the requested operation.
- Fixed: native backup errors propagate correctly, standard index names are matched consistently, and WP-CLI report help no longer emits synopsis warnings.
- Fixed: health digest failures retry no sooner than one hour, with a database lock preventing overlapping sends.
- Fixed: cleanup confirmations, byte-exact duplicate detection, active draft/edit-lock protection, session-token races, and taxonomy-aware orphan cleanup.
- Fixed: runner ownership and pause/resume handling, restore validation and safety backups, multisite cleanup/uninstall, and admin accessibility/progress feedback.
- Changed: site-scoped analyzer caching, refreshed snapshots, batched cleanup queries, and clearer bulk-index results.
- Tested: 24 PHP test scripts, 31 JavaScript interaction scenarios, and live admin, CLI, backup and restore workflows.
2.6.0
- Fixed: restore of plugin-created PHP dumps always failed – the statement whitelist blocked the dumper’s own
SET FOREIGN_KEY_CHECKS; a safe session-scoped SET subset is now handled and FK checks are disabled programmatically per restore tick. - Fixed: SQL statements preceded by comment banners were silently skipped during restore.
- Fixed: stored XSS in the Slow Query EXPLAIN panel – error text, column names, and hints are now escaped; snapshot compare and restore modal table names too.
- Fixed: expired-transients cleanup could loop forever on sites with a persistent object cache (Redis/Memcached).
- Fixed: backup retention could delete the backup currently being restored.
- Fixed: mysqldump backups could pass validation despite a mid-stream failure – exit code and completion trailer are now verified.
- Fixed: multisite – expired network transients (stored in
wp_sitemeta) are now cleaned; uninstall removes subsite tables, options, quarantined tables, and plugin transients. - Fixed: job cancellation and queue drain races; stale session token cleanup pagination;
batch_size/snapshot_prejob parameters being stripped; WP-CLIbackup delete/snapshot takereporting success on failure; assorted UI feedback and accessibility issues. - Changed: deactivation now unschedules cron events and Action Scheduler actions (previously the drain action kept running every minute after deactivation, bloating Action Scheduler tables).
- Changed: health advisor result is cached (15 min), removing ~15 heavy queries from dashboard / Site Health / admin bar loads; session-token counting is batched.
- Changed: cleanup jobs delete rows in single batched
DELETE ... IN (...)statements instead of thousands of individual deletes per tick. - Changed: backup names include random entropy and the temporary mysqldump credentials file moved out of the public uploads tree.
- Changed: a failed automatic pre-job backup now aborts the job instead of silently running without a backup; failed restores surface the pre-restore backup UID for rollback.
- Changed: plugin log and snapshot tables are pruned daily (filterable retention); autoload updates use
wp_set_option_autoload()on WP 6.4+; schedules no longer drift and monthly runs use calendar months. - Tested up to WordPress 7.0.2.
2.5.7
- Removed WordPress.org directory assets from the plugin package.
- Hardened database queries by preparing table identifiers and values with
$wpdb->prepare()placeholders. - Replaced dynamic collation repair SQL with a prepared table conversion query.
- Fixed plugin-cache cleanup placeholder generation to avoid PHPCS replacement-count warnings.
2.5.6
- Fixed duplicate changelog entries for version 2.4.5.
2.5.5
- Fixed stale cache issue where MyISAM tables continued to be displayed in the Table Engines tab after a successful conversion.
2.5.4
- Fixed selector mismatch in MyISAM to InnoDB conversion where checked tables were not detected.
- Resolved Action Scheduler database bloat by cleaning legacy hooks and optimizing queries.
- Fixed false positive unused taxonomies candidates list.
2.4.5
- Horizontal tabs navigation replaces the grouped sidebar so the main content area uses full width. Tabs are grouped with labels (Overview, Optimize, Safety, Operations, Configuration) and use design tokens for consistent styling.
- Active tab has a top border that visually merges with the content area; hover/focus states use primary color with keyboard-visible focus ring.
- Mobile select fallback remains unchanged for narrow viewports (≤960px). All
?tab=URLs continue to work unchanged.
2.4.4
- GitHub Actions CI: a new
.github/workflows/ci.ymllints every PHP file under PHP 7.4 / 8.0 / 8.1 / 8.2 / 8.3 and runs the PHPUnit suite on every push and pull request. Tagged pushes (v*) also stage a release zip artifact. - Expanded PHPUnit suite: three new test files covering ETA formatting (5 cases), the grouped sidebar navigation contract (legacy
?tab=URLs andrender_tab_*method coverage), and additionalRVSDADO_Actions::validate_job_params()branches (uid sanitizer, mode default, unknown type, runner-vs-admin context, table list filtering). RVSDADO_Admin_Helpers_Trait::format_eta()promoted to public so external callers (CLI, REST, tests) can reuse the same formatter used in the active jobs table.
2.4.3
- Orphan table analyzer is dramatically faster on busy sites: the plugin owner registry is now cached in-memory for the duration of the request, and the per-plugin code scan (up to 80 PHP files per plugin) is cached as a transient keyed by the plugin’s directory
mtimeso it self-invalidates on plugin updates. First detection pass is unchanged; subsequent passes within 12 hours are near-instant.
2.4.2
- Grouped sidebar navigation replaces the flat horizontal tab strip: 5 logical groups (Overview, Optimize, Safety, Operations, Configuration). All
?tab=URLs from previous versions continue to work unchanged. - Sticky sidebar that scrolls independently, plus a breadcrumb trail at the top of every section.
- Narrow viewports (≤960px) get a responsive
<select>group fallback instead of the sidebar. aria-current="page",aria-label, and focus-visible outlines for full keyboard / screen-reader navigation.
2.4.1
- Added a design-token CSS system (colors, spacing, radius, shadows, typography) as the single source of truth for all admin styling.
- Added a Dark mode for the plugin admin pages with Auto (follow OS), Light, and Dark options under Settings Color theme. The theme attribute is applied before paint to avoid flash of unstyled content.
- Refined component theming for cards, panels, intro boxes, wizard, help boxes, and the v2 accessible modal under dark mode.
- Sticky table headers on all plugin
.widefattables -column titles stay visible while scrolling large datasets. - Sortable columns with click or keyboard (Enter/Space) toggling asc/desc; numeric / date / text is auto-detected; tables driven by background polling opt out automatically.
2.4.0
- Accessible toast notifications replace blocking
alert()calls (aria-live, dismissible, auto-timeout). - Accessible confirm/prompt modal v2 with focus trap, Escape-to-close, and tip-to-confirm validation (RESTORE / DROP / QUARANTINE / DELETE).
- Adaptive job polling: respects Page Visibility, throttles when idle, kicks back to fast cadence when work appears.
- New running-jobs indicator in the WordPress admin bar (visible on every wp-admin page, capability-gated).
- Pause / Resume jobs from the active jobs table (new
pause()/resume()runner methods and AJAX endpoints). - ETA shown next to each active job’s processed/total count, derived from runner throughput.
2.3.2
- Renamed internal prefixes to
rvsdado_/RVSDADO_across classes, constants, options, transients, hooks, AJAX actions, and asset handles for stronger isolation. - Stored data and transient keys now use the unique
rvsdado_prefix in explicit string literals. - Migrated destructive DDL paths (DROP TABLE / RENAME TABLE) and other identifier-bound SQL to
$wpdb->prepare()with the%iplaceholder. - Added a stricter whitelist that requires tables to be currently detected as orphans (or sourced from the quarantine registry) before any destructive DDL runs.
- Replaced the dynamic
IN ({$ids_csv})SQL clause with prepared%dplaceholders. - Removed the residual
ini_set('display_errors', '0')call from the AJAX core. - Raised the minimum WordPress requirement to 6.2 to support the
%iidentifier placeholder.
2.3.1
- Addressed WordPress.org pre-review feedback for transient key naming, CLI report output storage, and AJAX output buffering.
- Restricted WP-CLI report file output to the plugin’s uploads directory.
2.3.0
- Added the Guided Safe Cleanup Wizard with recommended selections, CARE confirmations, before/after snapshots, live runner progress, and cleanup result deltas.
- Added scheduled health digest emails with daily, weekly, or monthly frequency.
- Added lightweight QA scaffolding, a manual QA checklist, and a release build helper that excludes QA/dev-only artifacts.
- Fixed Action Scheduler drain registration timing and avoided early translation loading for the custom cron schedule label.
2.2.0
- Updated plugin metadata and release references for version 2.2.0.
- Addressed Plugin Check findings for translator comments and prepared SQL scanner warnings in database cleanup, runner, scheduler, and backup checks.
2.1.0
- Autoload tab: full pagination, search, filter (autoloaded/not/large/review/watch), sort, and segmentation – no longer limited to 50 options.
- Backup manifests: every new backup writes a
manifest.jsonwith method, DB name, WP prefix, tables, files, gzip flag, and version. - Full database restore: restore plugin-created backups from UI or CLI (
wp rvs-database-doctor backup restore <uid> --confirm=RESTORE). Automatic pre-restore backup, streaming SQL import, blocked dangerous statements, DB/prefix compatibility checks. - Backup list now shows method, table count, and restore eligibility.
- WP-CLI: added
backup validate <uid>andbackup restore <uid> --confirm=RESTORE;autoloadnow supports--per-page,--page,--filter,--search,--orderby,--order.
2.0.0
- Time-based job runner with dynamic batch size (default 1000).
- Background queue (WP-Cron drain / Action Scheduler support).
- Before / After snapshots + SVG charts.
- Smart Advisor v2 with EXPLAIN hints.
- Bulk actions for Table Sizes, Autoload, Indexes and Cleanup.
- Manual full database backup (PHP dump or mysqldump), user-selectable tables.
- Micro-backup of affected tables with retention.
- Scheduled optimizations.
- One-click Optimize Now.
- Refactored UI: Dashboard as the default tab, Analytics, Schedules, Backups.
- Refactored WP-CLI with job / snapshot / backup subcommands.
- Fully translated to English (text domain
rvs-database-doctor).
1.0.0
- Initial release.