Shabnam Tornado Database Maintenance is a database inspection and maintenance toolkit for WordPress administrators and developers. It combines preview-first cleanup, integrity checks, verified logical backups, reference discovery, and an optional controlled Post ID reindex workflow.
The plugin reads the active WordPress table names from $wpdb. It does not assume the default wp_ prefix, so installations using custom prefixes such as shcd_ are supported.
Post ID reindexing is an advanced, destructive operation. It is disabled by default, is not required for ordinary cleanup, and should be tested on a staging copy before use on a production site.
INFORMATION_SCHEMA, including tables, columns, indexes, engines, and foreign keys.AUTO_INCREMENT normalization without renumbering existing rows.The optional reindex workflow creates a dense 1..N sequence for rows in the active $wpdb->posts table. This includes posts, pages, custom post types, revisions, and Media Library attachments that still exist when the mapping is created.
Tornado uses a collision-resistant two-phase mapping:
AUTO_INCREMENT value.The Posts table is the source of truth for the mapping. Adapters synchronize references; they do not independently choose or renumber the Posts primary-key sequence.
Reindex execution requires matching Discovery, Mapping, and Backup fingerprints. It also requires supported transactional tables, successful Preflight checks, administrator capabilities, a REST nonce, a session-bound one-time authorization token, and an explicit confirmation phrase. Blocking failures before commit cause the operation to stop or roll back.
Tornado includes dedicated reference handling for known relationships and a conservative adaptive detector for conventional plugin tables.
The adaptive detector can evaluate:
post_id, page_id, product_id, or attachment_id.object_id with object_type, or element_id with element_type.Detection is evidence-based. The plugin checks column type, naming, mapping intersection, row resolution, table scope, and compatible WordPress post types. Ambiguous, encrypted, compressed, binary, proprietary, remotely stored, or free-text references are not guessed. They remain blocking until an administrator selects an explicit policy or a dedicated adapter is provided.
Tornado includes dedicated or structured handling for selected WordPress, WooCommerce, Elementor, Gutenberg, and Rank Math relationships. It also exposes an adapter registration hook for site-specific integrations.
Compatibility does not mean that every extension or external system can be detected automatically. IDs copied to a CRM, ERP, payment gateway, search service, mobile application, custom API, arbitrary HTML, shortcode, URL, or remote database may remain outside WordPress and must be reviewed separately.
Cleanup operations provide a Preview before deletion and operate in bounded batches. Supported cleanup categories include:
The optional revision archive stores selected snapshots in Tornado’s own table instead of keeping ordinary WordPress revision rows indefinitely. Elementor and WooCommerce content can be included according to the configured archive policy. This archive does not replace Elementor’s complete editor history or an external backup.
Tornado creates local logical SQL backups and verifies the resulting file with SHA-256. By default, backup files are stored below the directory returned by wp_upload_dir() in a Tornado-owned directory with a persisted random storage token, restrictive file permissions, and Apache/IIS deny files. A site administrator may explicitly provide SHCD_TORNADO_DBM_BACKUP_DIR for a custom storage location. A backup records the Posts ID fingerprint, schema fingerprint, consistency status, and storage classification.
A backup is accepted for reindex only when the required snapshot and protected-storage checks pass. Mixed storage engines or an insufficiently protected custom backup location can produce warnings or prevent the backup from being accepted for reindex.
Full database restore is intentionally available through WP-CLI rather than a browser request, reducing the risk of HTTP timeout or connection loss during import.
Tornado does not send site data to an external service and does not include usage tracking or telemetry. Administration requests are made to the site’s own WordPress REST API.
The plugin stores operational data locally, including settings, discoveries, mappings, backup records, jobs, logs, revision archives, and short-lived authorization data. SQL backup files may contain the complete database and must be treated as sensitive data.
Uninstall removes scheduled events and plugin capabilities. Operational tables and backup files are removed only when the corresponding uninstall options are enabled by an administrator.
INFORMATION_SCHEMA metadata.Tornado registers commands under wp shcd-tornado-dbm when WP-CLI is available. Examples include:
wp shcd-tornado-dbm discoverwp shcd-tornado-dbm mapping buildwp shcd-tornado-dbm dry-run <mapping-uuid>wp shcd-tornado-dbm backup createwp shcd-tornado-dbm integrity checkwp shcd-tornado-dbm cleanup previewwp shcd-tornado-dbm cleanup execute --yeswp shcd-tornado-dbm tables scan-unusedwp shcd-tornado-dbm reindex preparewp shcd-tornado-dbm reindex preflight <mapping-uuid> <backup-uuid>Destructive WP-CLI commands require their documented confirmation arguments. Use wp help shcd-tornado-dbm for the commands available in the installed version.