Linux 软件免费装
Banner图

Shabnam Tornado Database Maintenance

开发者 shcd
shcd Tags: database
cleanup
backup
integrity
reindex
maintenance
更新时间 2026年11月13日 07:08
PHP版本: 8.3 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

backup database cleanup integrity reindex

下载

2.4.1 1.0.0 2.4.2

详情介绍:

Shabnam Tornado Database Maintenance is a WordPress database inspection, cleanup, backup, integrity, and recovery toolkit. It combines routine database housekeeping with advanced maintenance engines, while protecting destructive actions with previews, verified backups, ownership evidence, and live dependency checks. Tornado reads active table names through $wpdb and supports custom database prefixes, including shcd_. It does not assume the default wp_ prefix. This readme documents version 2.4.2. Administration Languages Tornado follows the language of the current WordPress administration user. Persian, English, and Arabic translations are included. Change the Language field in your WordPress user profile to select the administration language; Tornado has no separate language setting. When the profile uses the site default, WordPress supplies that language. Other locales fall back to English. English uses a left-to-right layout. Persian and Arabic use right-to-left layouts. Interface labels, cleanup controls, supported report messages, errors, and number formatting follow the selected administration locale. Content titles, table names, option keys, UUIDs, confirmation tokens, and numeric form values retain their original values. Translations are bundled locally, with gettext catalogs and an English translation template for WordPress translation tools. Language selection does not create an additional database table or send text to an external service. Database Discovery Tornado inspects tables, columns, indexes, storage engines, and available foreign-key metadata through INFORMATION_SCHEMA. Its inventory considers active and inactive plugins, must-use plugins, drop-ins, themes, WordPress Core tables, and other database tables. Unknown ownership or unreadable dependency metadata is treated conservatively; unfamiliar tables are not automatically considered unused. Intelligent Maintenance Engines The 2.x architecture includes coordinated components built into the plugin, not separate add-ons or external services. Smart Cleanup and Extension Forensics Preview-first cleanup identifies supported WordPress and WooCommerce candidates before deletion. Categories include revisions, auto drafts, trash, autosaves, expired transients, orphaned metadata and relationships, and selected WooCommerce or Action Scheduler records. Candidate ID sets are fingerprinted and revalidated under the cleanup lock. Failed queries or changed candidates stop the affected deletion. Smart Cleanup coordinates inventory, preview, verified private backup, eligible cleanup, extension-residue analysis, dependency checks, uploads scanning, final compaction, and before/after reporting. Installed extensions, shared data, commerce records, ambiguous ownership, and unresolved dependencies remain protected. Full revision purges, pending editorial revisions, and media-plugin-specific trash are excluded from unattended cleanup. Extension Forensics investigates residue left by removed plugins and themes. It correlates deletion records, installed-extension inventory, historical theme identities, table namespaces, option/meta keys, row-level ownership evidence, custom post types, taxonomies, WP-Cron, Action Scheduler, theme CSS/templates, and supported plugin registry data. Optional ZIP inspection is static and bounded: PHP is not executed, and archive paths, traversal, and symlinks are checked. A table-name match or inactive status alone never authorizes deletion. Eligible tables require a fresh checksum-verified backup and successful live dependency checks. Automatic residue cleanup is skipped on Multisite when shared ownership is unclear. Uploads, Audits, and Backups The uploads scanner checks exact paths associated with removed extensions and searches supported database locations for references, including Options, Posts, Post Meta, User Meta, Comment Meta, Term Meta, WooCommerce HPOS order meta, and supported legacy order-item metadata. It rejects unsafe trees and symlinks, applies file and size limits, and verifies moved files with SHA-256. Eligible files are moved to reversible private quarantine with a restore manifest; uploads are not permanently deleted. Referenced, ambiguous, unmatched, and protected business-data paths remain untouched. Database audits compare table counts, exact row totals where readable, and INFORMATION_SCHEMA estimates for allocated data and index space. Incomplete scans are marked partial and unknown counts are not reported as zero. Allocation figures are estimates, not the full physical database-directory footprint. OPTIMIZE TABLE is limited to eligible tables under engine, size, and free-space rules. Smart Cleanup performs a final eligible compaction pass. Logical SQL backups are stored locally and verified with SHA-256. The default location is a protected Tornado-owned directory below wp_upload_dir(), with a persisted random storage token and restrictive access controls. Administrators can configure SHCD_TORNADO_DBM_BACKUP_DIR. Backup records include schema and Posts ID fingerprints, consistency status, and storage classification. Full database restore is provided through WP-CLI. Revision Archive and ID Maintenance The independent revision archive stores supported snapshots in Tornado's typed records store. Depending on policy, it can capture final Elementor editor and metadata saves, deduplicate snapshots, apply per-post retention, and remove eligible orphan snapshots after permanent post deletion. It excludes derived CSS and cache data and does not replace Elementor's complete editor history or a full site backup. Generic AUTO_INCREMENT normalization does not lower counters. Explicit counter repair can set supported Core and WooCommerce counters to MAX(ID)+1 after a fresh private backup and live verification. It does not change existing row IDs or fill interior gaps, but deleted tail IDs may become reusable. The optional Post ID Reindex workflow creates a dense 1..N sequence for the active $wpdb->posts table. Mapping priority is pages, posts, products, variations, other content, attachments, then revisions, preserving ascending old-ID order within each group. An immutable Old ID to Temporary ID to Final ID mapping synchronizes registered references in two phases. Execution requires matching Discovery, Mapping, and Backup fingerprints, supported transactional tables, successful Preflight, administrator authorization, and explicit confirmation. Reindexing is disabled by default and is not needed for ordinary cleanup. Compatibility, Storage, and Safeguards Adaptive reference detection evaluates semantic ID columns, ID/type pairs, strict ID lists, supported JSON or PHP-serialized paths, and explicit foreign keys to the active Posts table. Structured handling covers selected WordPress Core, WooCommerce, Elementor, Gutenberg, and Rank Math relationships. Unsupported, proprietary, remote, encrypted, binary, or ambiguous references are not guessed. The 2.4.1 builder policy excludes unrelated numeric values unless a supported field path establishes a genuine assignment. After verified legacy migration, Tornado uses three operational tables based on the active prefix: shcd_tornado_jobs for job state, shcd_tornado_mappings for Reindex mappings, and shcd_tornado_records for typed discoveries, backups, logs, reports, and supported revision snapshots. These are three separate tables, not one shcd_tornado table. Destructive operations use applicable previews, candidate fingerprints, backup verification, capability checks, nonces, one-time authorization, typed confirmation, locks, ownership revalidation, and live dependency checks. Tornado sends no site data to an external service and includes no telemetry. Operational records, backups, and quarantined uploads stay local and may contain sensitive data. Tornado requires WordPress 7.0 or later and PHP 8.3 or later. Network-wide Multisite Reindexing and WooCommerce HPOS order-ID reindexing are unsupported. Automatic extension-residue cleanup is skipped where Multisite ownership is unclear. IDs stored outside the current WordPress database cannot be discovered reliably. Test Smart Cleanup, table removal, counter repair, and Reindexing on staging before production use.

安装:

  1. Create a full independent backup of the site files and database.
  2. If upgrading from a legacy SHCD Tornado plugin, deactivate the old plugin before running the guarded legacy migration.
  3. Upload the shcd-database-maintenance directory to /wp-content/plugins/, or install the ZIP through Plugins > Add New > Upload Plugin.
  4. Activate Shabnam Tornado Database Maintenance.
  5. Open Tools > Tornado.
  6. Review System Status and run Discovery.
  7. Review the database prefix and the three Tornado operational tables.
  8. Use Preview before any cleanup operation.
  9. Verify that private backup storage is writable and protected.
  10. Test Mapping, Backup, Preflight, cleanup, and Reindex workflows on a staging copy before considering production use.
No wp-config.php edit is required for normal operation. An optional emergency constant can disable destructive operations; review the plugin settings and inline administrator guidance before enabling destructive operations. Do not uninstall the previous release before upgrading. Install the new release over the existing plugin directory and allow the guarded migration process to run. Keep an independent backup until migration and post-upgrade verification have completed. System Requirements Upgrade Notes for Version 2.4.2 Upgrading to 2.4.2 WP-CLI Commands Tornado registers commands under wp shcd-tornado-dbm when WP-CLI is available. Examples include: Destructive WP-CLI commands require their documented confirmation arguments. Use wp help shcd-tornado-dbm for the commands available in the installed version.

升级注意事项:

2.4.2 Back up the site and database before running Smart Cleanup, explicit counter repair, table removal, or Post ID Reindexing. Upgrade over the existing plugin installation; do not uninstall the previous version before the guarded migration has completed. Test destructive workflows on a staging copy first.

常见问题:

Does Tornado automatically renumber my WordPress posts?

No. Post ID Reindexing is disabled by default and requires a separate, explicit workflow with Discovery, Mapping, Backup, Preflight, authorization, and typed confirmation.

Do I need Reindexing to clean the database?

No. Cleanup, revision retention, orphan checks, backup, integrity reporting, table compaction, and AUTO_INCREMENT maintenance can be used without changing existing Post IDs.

Which internal database tables does Tornado create?

Tornado uses exactly three dedicated operational tables after verified legacy migration: the active prefix followed by tornado_jobs, tornado_mappings, and tornado_records. With the shcd_ prefix, the names are shcd_tornado_jobs, shcd_tornado_mappings, and shcd_tornado_records. These are three separate tables, not one shcd_tornado table.

Does Tornado support a custom database prefix?

Yes. Core table names are read from $wpdb, and plugin tables are resolved from the active $wpdb->prefix. The plugin does not hard-code wp_posts.

What is the difference between AUTO_INCREMENT repair and Post ID Reindexing?

AUTO_INCREMENT repair changes the next generated value. It does not change the primary keys of existing records. Depending on the selected repair workflow, the next value may be set to MAX(ID)+1, which can make deleted tail IDs available for reuse. Post ID Reindexing changes existing IDs and synchronizes registered references using the two-phase mapping workflow. It is a separate, more extensive operation.

Does ordinary counter normalization lower AUTO_INCREMENT values?

Generic counter normalization is non-decreasing and does not lower counters. The explicit advanced counter-repair workflow is separate and can set supported counters to MAX(ID)+1 after backup and live verification. Review the operation’s warning because deleted tail IDs may be reused.

How does adaptive detection handle an unknown plugin table?

It evaluates schema and data evidence before registering a relationship. Clear conventional references can be included in Preflight and the two-phase mapping. Ambiguous data remains blocked instead of being rewritten by guesswork.

Does the plugin support Rank Math?

The plugin includes a dedicated Rank Math adapter for supported internal-link, internal-meta, and analytics object relationships. The adapter is conditional and only acts on tables and columns that exist in the current installation.

Does the plugin support Elementor?

It includes structured Elementor reference handling, selected builder-registry support, revision snapshots under the configured archive policy, and post-operation CSS or cache rebuilding. Elementor and third-party widget data can vary, so unresolved proprietary paths remain protected.

Can Tornado detect IDs stored outside WordPress?

No. Remote services, custom applications, external databases, exported files, and copied IDs outside the current WordPress database must be audited separately.

Are backups sent to another server?

No. Backups are created locally. The default location is a protected, randomized Tornado directory below the WordPress uploads base directory returned by wp_upload_dir(). Administrators remain responsible for server permissions, off-site backups, encryption, retention, and restore testing.

Does the uploads scanner permanently delete files?

No. Eligible files are moved into a protected, reversible quarantine location and recorded in a restore manifest. Ambiguous, referenced, unsafe, or business-data paths are preserved.

Does Smart Cleanup delete every discovered extension table?

No. A table must have sufficient ownership evidence, verified backup coverage, and no blocking live dependencies. Installed extensions, shared data, uncertain ownership, and protected business records are not automatically removed.

Is Multisite supported?

The plugin can inspect the active site’s tables, but network-wide Multisite Reindexing is intentionally not supported. Automatic deleted-extension residue cleanup is skipped where shared ownership cannot be safely established.

What happens when Preflight finds an unresolved reference?

Reindex remains blocked. Review the table and column, choose an explicit supported policy, register a site-specific adapter, or leave the operation unexecuted.

What happens when I uninstall the plugin?

Scheduled hooks and Tornado capabilities are removed. By default, operational tables and backup files are retained to avoid accidental data loss. They are deleted only when the relevant uninstall settings were enabled before uninstalling.

What are the main features of Shabnam Tornado Database Maintenance?

  • Database schema discovery through INFORMATION_SCHEMA, including tables, columns, indexes, storage engines, and foreign-key metadata.
  • Preview-first cleanup for supported WordPress and WooCommerce records, orphaned data, expired transients, revisions, auto drafts, trash, autosaves, and other configured categories.
  • One-click Smart Cleanup orchestration for inventory, preview, verified backup, eligible cleanup, extension-residue analysis, uploads scanning, compaction, and final reporting.
  • Deleted-plugin and deleted-theme forensic discovery using removal records, table families, option/meta namespaces, source evidence, and row-level ownership witnesses.
  • Uploads residue scanning with database-reference checks, safe-path validation, SHA-256 verification, private quarantine, and a restore manifest.
  • Whole-database before-and-after auditing with exact row counts and allocated data/index size estimates.
  • Live table-dependency inspection for incoming foreign keys, views, triggers, and related table references.
  • Logical SQL backups with SHA-256 file verification, schema fingerprints, Posts ID fingerprints, consistency reporting, and protected local storage.
  • A dedicated three-table operational data architecture for jobs, ID mappings, and typed records.
  • Independent revision snapshots stored in the typed records store according to the configured archive policy, including supported final Elementor editor and metadata saves.
  • Controlled, collision-resistant, two-phase Post ID reindexing with immutable Old ID to Temporary ID to Final ID mappings.
  • Conservative adaptive discovery of plugin references, plus structured handling for selected WordPress, WooCommerce, Elementor, Gutenberg, and Rank Math relationships.
  • Semantic builder-assignment detection that avoids treating unrelated numeric values such as prices, stock, quantities, ratings, dimensions, and counters as content references.
  • Explicit advanced AUTO_INCREMENT repair for supported Core and WooCommerce tables, with backup and live verification. This operation does not renumber existing rows, but can make deleted tail IDs available for reuse.
  • Audit logs, operation reports, bounded administrative list caching, retention controls, and WP-CLI commands.
  • No external telemetry or usage tracking. Site data and backup files remain on the site’s own storage.
  • Intelligent maintenance engines for Extension Inventory and Forensics, ownership evidence, Smart Cleanup, uploads scanning, adaptive references, dependency inspection, database auditing and compaction, and semantic builder assignments.

Which internal database tables does Tornado use?

Tornado uses exactly three dedicated internal operational tables after the verified legacy-store migration:

  • tornado_jobs - stores maintenance job and execution-state data.
  • tornado_mappings - stores the immutable records used by the Post ID mapping and reindex workflow.
  • tornado_records - stores indexed typed operational records, including discoveries, backup records, logs, operation reports, and supported revision archives.
Each table name is formed by appending its suffix to the active WordPress database prefix. For a site whose active prefix is shcd_, the three table names are:
  • shcd_tornado_jobs
  • shcd_tornado_mappings
  • shcd_tornado_records
These are three separate tables. The plugin does not use a single table named shcd_tornado. The plugin does not store its operational jobs, mappings, and typed records in WordPress posts or post meta. The typed records table consolidates record types that were stored in separate legacy metadata tables in earlier releases. Jobs and mappings remain in their own dedicated tables. Legacy-store migration is guarded. Before legacy tables are removed, Tornado requires a fresh verified backup covering the source data, locks the relevant internal tables, copies the legacy rows, and compares the copied data. Source tables are dropped only after successful verification. If migration or verification fails, the source data is retained. The 2.4.0 release shortened the internal table names while retaining the three-table architecture and the independent Elementor revision history. The migration does not overwrite an existing destination table. Tornado does not create new database quarantine tables. Eligible unused or deleted-extension tables can be dropped only after verified backup coverage and live dependency checks. Existing legacy quarantine tables are still inspected and included in the applicable Smart Cleanup workflow.

How do database discovery and integrity checks work?

Tornado discovers the active database schema using the current WordPress database connection and the available INFORMATION_SCHEMA metadata. Discovery can inspect:

  • Base tables and table names.
  • Columns and column data types.
  • Primary keys and indexes.
  • Storage engines.
  • Foreign-key relationships.
  • Table ownership candidates and extension-specific namespaces.
  • Supported WordPress and plugin relationships.
  • Table statistics used by cleanup and audit reports.
Discovery is prefix-aware. Core table references are resolved from the active $wpdb table names and plugin-owned tables use the active $wpdb->prefix. The plugin does not assume that the site uses wp_posts, wp_options, or another default-prefix table name. When metadata cannot be read, the plugin must not interpret the missing information as proof that a table is safe to modify. Unreadable or incomplete dependency information is treated conservatively and is reported as unresolved or protected.

Which cleanup and revision-management operations are supported?

Tornado provides preview-first cleanup. A preview identifies the selected cleanup categories and the candidate records before deletion. Cleanup runs in bounded batches and revalidates the candidate set before destructive work. Supported cleanup categories include:

  • All revisions or revisions beyond the configured retention limit.
  • Auto drafts, trash, autosaves, and optionally aged pending revisions.
  • Orphaned post meta.
  • Orphaned comments and comment meta.
  • Orphaned user meta and term meta.
  • Orphaned term relationships.
  • Supported WooCommerce orphaned lookup, order-item, permission, and related records.
  • Expired transients and supported expired timeout records.
  • Stale local media rows covered by the plugin’s explicit media policies.
  • Selected Action Scheduler orphan logs and eligible old claims.
  • Other supported categories exposed by the installed release and its cleanup policy.
The exact available categories depend on the installed WordPress and plugin schema. Tornado rechecks parent relationships before deleting supported orphan records. If a verification query fails, the affected deletion is stopped rather than assuming the record is orphaned. Preview First uses candidate counts and SHA-256 fingerprints of the candidate ID sets. The execution stage validates the fingerprints while holding the cleanup lock. This reduces the risk of deleting a different set of records after the preview was generated. Generic values and ambiguous serialized references are not treated as safe cleanup candidates solely because their names look familiar. High-risk generic keys remain manual-review items and are not preselected. Full revision purges, pending editorial revisions, and media-plugin-specific trash are excluded from unattended Smart Cleanup. Where supported, they remain available through advanced manual tools.

What does the Smart Cleanup workflow do?

Smart Cleanup provides one primary administrative workflow for the supported maintenance phases. Depending on the site’s configuration and available evidence, the workflow can include:

  1. Inventory and discovery of the current database and installed extensions.
  2. Internal cleanup preview and candidate validation.
  3. Creation and verification of a private SQL backup.
  4. General cleanup of selected supported records.
  5. Deleted-plugin and deleted-theme residue analysis.
  6. High-confidence table dependency and ownership checks.
  7. Uploads residue scanning and reversible file quarantine.
  8. Final eligible-table compaction.
  9. Whole-database before-and-after audit and operation reporting.
The workflow uses an orchestration lock so incompatible destructive maintenance operations do not run concurrently. Backup, baseline-audit, dependency, and Multisite safeguards fail closed when their required checks cannot be completed. Sub-services defer their own compaction during Smart Cleanup. The orchestrator performs one final eligible-table optimization pass after the cleanup phases. The default cleanup interface is designed around one primary Smart Cleanup action. Specialist controls, manual cleanup categories, and recovery tools are grouped under Advanced Tools where applicable. Smart Cleanup does not mean that every discovered object is automatically deleted. Ambiguous, shared, installed-extension, business, and otherwise protected data is excluded from destructive actions.

How does Extension Forensics identify deleted-plugin and deleted-theme residue?

Tornado includes forensic discovery for database residue left by removed plugins and themes. The discovery process can use:

  • WordPress plugin and theme deletion records.
  • Active and inactive installed plugins.
  • Must-use plugins and drop-ins.
  • Installed and historical theme identities.
  • Custom table names and table-family patterns.
  • Option and metadata namespaces.
  • Independent row-level ownership evidence.
  • Custom post types and taxonomies.
  • WP-Cron and Action Scheduler hooks.
  • Theme custom CSS, templates, and saved theme content.
  • Plugin registry and other supported WordPress records.
  • Optional static source inspection of a plugin or theme ZIP archive.
ZIP source inspection is static and bounded. It does not execute code. Archive size, PHP parsing, paths, symlinks, and path traversal are checked before source evidence is accepted. Tornado uses multiple evidence sources rather than assuming that a table belongs to a deleted plugin because its name resembles a slug. Generic option/meta keys and ambiguous value references require independent ownership evidence or administrator review. Installed inactive plugins and themes remain protected. WordPress Core tables, ordinary posts/pages/media, commerce content, and data that may be shared with another installed extension are also protected. A fresh checksum-verified private backup must cover target tables before their removal. Live dependency checks are performed before a table is dropped. Tornado does not disable foreign-key protections to force a deletion. Eligible high-confidence deleted-extension tables can be dropped after backup and dependency verification. Inferred or ambiguous ownership does not authorize automatic permanent deletion. Generic serialized/value references, extension-named columns, and non-core text matches can remain read-only review findings. WordPress does not provide a universal ownership registry for every deleted extension. Unknown proprietary data must remain protected unless sufficient evidence or a dedicated adapter is available. Automatic deleted-extension residue cleanup is skipped on Multisite where shared ownership cannot be safely established.

How does the uploads residue scanner work?

The uploads residue scanner checks exact top-level paths that are associated with extensions recorded as removed or supported by high-confidence database table-owner evidence. The scanner:

  • Excludes currently installed plugins, including inactive plugins, must-use plugins, drop-ins, and installed themes.
  • Checks database references in Options, Posts, Post Meta, User Meta, Comment Meta, Term Meta, WooCommerce HPOS order meta, and supported legacy order-item meta.
  • Preserves paths that remain referenced by database records.
  • Rejects symbolic links and unsafe directory trees.
  • Applies bounded file-count and file-size checks.
  • Verifies moved files using SHA-256.
  • Moves eligible files into a protected, reversible quarantine location beside the verified private SQL backup.
  • Stores a restore manifest and reports candidate paths, quarantined paths, file counts, bytes moved, skipped references, unsafe paths, and failures.
The scanner does not permanently delete uploads. It moves only high-confidence exact-slug top-level directories or exact plugin-basename files for extensions recorded as removed or supported by sufficient ownership evidence. WooCommerce download/invoice data and other known business-data directories are protected. Unmatched or ambiguous uploads remain untouched. Quarantine is skipped if Tornado cannot verify a private writable location outside known public web roots.

What does the database before-and-after audit report?

The database audit compares the database before and after supported manual cleanup operations. The audit can report:

  • Exact COUNT(*) row totals for each readable base table.
  • INFORMATION_SCHEMA data and index allocation estimates.
  • Table-count changes.
  • Net row-count changes.
  • Allocated-size changes and estimated space saved.
  • Per-table changes.
  • Optimized, skipped, and failed tables.
  • The largest remaining tables.
The baseline audit must complete before destructive manual cleanup starts. If one or more tables cannot be counted, the final audit is marked partial. Unknown counts are not converted to zero. A confirmed dropped table is reported with zero rows after deletion, including a table that was already empty. A table that could not be scanned remains unknown rather than being reported as zero. INFORMATION_SCHEMA size totals are estimates of allocated table data and indexes. They are not the complete MySQL data-directory footprint. Concurrent site writes can affect before-and-after net differences. The whole-database audit is used for manual Preview First cleanup and deleted-extension cleanup. The expensive audit is skipped for background WP-Cron and WP-CLI cleanup.

How are table dependencies checked before a table is removed?

Before eligible table removal, Tornado checks live database dependencies. The checks include:

  • Incoming foreign keys from other tables.
  • Foreign keys that reference the candidate table.
  • Views and readable view definitions.
  • Triggers attached to candidate tables.
  • Trigger-body references where readable.
  • Other supported table-family and installed-owner evidence.
Self-referencing foreign keys are not treated as external blockers. Unreadable metadata, unresolved dependencies, circular dependencies, and external dependencies remain protected and are reported. Where deleted-extension tables have a parent/child relationship, Tornado processes recorded child tables before retrying eligible parents. It never disables foreign-key checks or removes a real dependency to force the operation. The dependency checks are shared by Smart Cleanup and the applicable manual table-removal or legacy-quarantine recovery paths.

How does database compaction work?

After eligible cleanup, Tornado can run OPTIMIZE TABLE on supported tables. Compaction is limited by the configured eligibility rules, including engine support, verified table changes, free-space estimates, and table-size bounds. The 1.0.7 workflow targeted verified changed tables and tables reporting at least 1 MiB or 5 percent free space, while tables larger than 256 MiB and unsupported engines were reported as skipped. Smart Cleanup defers sub-service compaction and performs one final eligible-table optimization pass after its cleanup phases. Compaction is not a substitute for a backup. It may require additional database resources and can take time on large tables. Unsupported or failed operations are reported instead of being described as successful.

How does AUTO_INCREMENT maintenance work?

Tornado distinguishes between ordinary counter normalization, cleanup-triggered counter repair, explicit advanced counter repair, and Post ID reindexing. Ordinary generic AUTO_INCREMENT normalization does not lower counters and does not reuse deleted IDs. Cleanup-triggered counter repair can recalculate an affected table’s counter to MAX(primary_key)+1 after a verified row-count reduction, subject to the cleanup policy and live checks. Earlier releases deliberately skipped this behavior for incomplete cleanup, no-op cleanup, scheduled cleanup, and WP-CLI cleanup. The explicit advanced counter-repair workflow introduced in the 2.4.0 development line can inspect supported WordPress Core and WooCommerce order counters and repair them to MAX(ID)+1 even when no general-cleanup rows were deleted. It uses a fresh private backup and live verification. This operation does not renumber existing records, but deleted tail IDs may become available for reuse. Version 2.4.2 preserves the AUTO_INCREMENT and Post ID mapping algorithms from 2.4.0 and 2.4.1. Counter repair does not fill interior ID gaps. It changes the next generated value; it does not rewrite the primary keys of existing records. Counter repair and Post ID reindexing are separate operations.

How does controlled Post ID reindexing work?

The optional reindex workflow creates a dense 1..N sequence for rows in the active $wpdb->posts table. It is an advanced destructive operation and is disabled by default. The final mapping prioritizes content types in this order:

  1. Pages.
  2. Posts.
  3. Products.
  4. Product variations.
  5. Other content types.
  6. Attachments.
  7. Revisions.
Rows within each content-type group preserve ascending old-ID order. A content-type change during mapping construction aborts the mapping. Mappings built under an obsolete ordering policy are not reused. Tornado uses a collision-resistant two-phase mapping:
  1. Build an immutable Old ID to Temporary ID to Final ID mapping from the current Posts table.
  2. Move registered references from Old IDs to Temporary IDs.
  3. Move the Posts primary keys from Old IDs to Temporary IDs.
  4. Move registered references from Temporary IDs to Final IDs.
  5. Move the Posts primary keys from Temporary IDs to Final IDs.
  6. Verify reference parity, row counts, sequence boundaries, zero gaps, and the final 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. If an unresolved reference remains, Reindex is blocked until the reference is reviewed, an explicit supported policy is selected, or a site-specific adapter is registered. Reindexing changes existing WordPress content IDs and registered references. It is not necessary for database cleanup, revision retention, orphan cleanup, backup, integrity reporting, or ordinary AUTO_INCREMENT maintenance.

How does adaptive plugin-reference detection work?

Tornado includes dedicated reference handling for known relationships and a conservative adaptive detector for conventional plugin tables. The adaptive detector can evaluate:

  • Integer columns with semantic names such as post_id, page_id, product_id, or attachment_id.
  • Polymorphic pairs such as object_id with object_type, or element_id with element_type.
  • Strictly formatted ID lists in semantically named columns.
  • Supported JSON and PHP-serialized paths that clearly represent WordPress object IDs.
  • Explicit foreign keys that reference the active Posts table.
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. The 2.4.1 builder-assignment policy applies the same semantic rules to discovery and actual repair. A numeric value that happens to match a content ID is not sufficient evidence that it is a builder reference. The detector excludes unrelated values such as prices, stock values, quantities, counters, ratings, dimensions, derived cache values, commerce records, and font records unless a supported semantic field path establishes a genuine assignment. For supported builder assignments, Tornado rewrites only genuine nested builder-ID paths, preserves scalar types and JSON/PHP-serialized formats, and rechecks the destination content type before each registered-assignment rewrite.

Which plugins and builders have structured compatibility?

Tornado includes dedicated or structured handling for selected relationships in:

  • WordPress Core.
  • WooCommerce.
  • Elementor.
  • Gutenberg.
  • Rank Math.
  • Selected builder, media, and cache integrations.
The plugin 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. Elementor and third-party widget data can vary between installations and versions. Unresolved proprietary paths remain protected rather than being rewritten by guesswork.

How does the independent revision archive work?

Tornado supports an independent revision archive in its typed records store. The archive can preserve selected snapshots according to the configured archive policy rather than relying exclusively on ordinary WordPress revision rows. Supported archive behavior includes:

  • Capture of supported final Elementor editor and metadata saves.
  • Snapshot deduplication.
  • Per-post retention.
  • Orphan discovery and cleanup after permanent post deletion.
  • Retention independent of ordinary WordPress revision rows.
The archive does not store derived CSS or cache data. It does not replace Elementor’s complete editor history, a complete site backup, or an independently tested recovery plan. The archive policy can be disabled. The explicit Off setting is preserved during upgrades.

How are database backups and recovery handled?

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 relevant verification information, including:

  • The Posts ID fingerprint.
  • The database schema fingerprint.
  • Backup consistency status.
  • Storage classification.
  • File checksum and verification result.
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. This reduces the risk of HTTP timeouts or connection loss during a large import. The ordinary backup retention policy keeps three backups. Operation reports and log rows have bounded retention, with twenty reports and twenty log rows retained under the documented policy. Active Reindex recovery pins are preserved. Registered backup files under historical private storage roots can be removed without generating a new storage token. Tornado verifies whether a file was actually removed; failed registrations remain available for retry and are reported. A local SQL backup may contain the complete database and must be treated as sensitive data. Administrators remain responsible for independent off-site backups, encryption, server permissions, retention, and restore testing.

Which safeguards protect destructive operations?

Tornado uses authenticated WordPress administrative requests and capability checks for its maintenance operations. Destructive workflows use applicable protections such as:

  • Internal preview and candidate-set verification.
  • SHA-256 fingerprints for selected candidate sets.
  • Fresh private backup verification.
  • Administrator capability checks.
  • REST nonces or authenticated admin AJAX nonces.
  • Session-bound, one-time authorization where required.
  • Typed confirmation for high-risk operations.
  • Advisory or orchestration locks to prevent conflicting destructive work.
  • Live revalidation of ownership and table dependencies.
  • Fail-closed behavior when required queries or metadata checks fail.
  • Explicit reporting of skipped, deferred, protected, and failed items.
The 2.2.2 release binds a preview to its own random token, administrator, and login session. The plugin verifies transient persistence before returning a successful preview. A selection change or expired preview invalidates the authorization for that selection. Unknown execution results are not automatically retried. This avoids repeating a destructive action when the client cannot determine whether the server completed it. A global destructive-operation Emergency Stop is honored by the applicable cleanup workflows.

What are the important limitations?

  • Network-wide Multisite Reindexing is not supported.
  • Automatic deleted-extension residue cleanup is skipped on Multisite when shared ownership cannot be safely established.
  • WooCommerce HPOS order-ID reindexing is not supported.
  • Legacy WooCommerce order IDs are not reindexed unless the related advanced option is explicitly enabled.
  • Unknown proprietary data is not rewritten without sufficient evidence or a dedicated adapter.
  • Remote systems and copied IDs outside the WordPress database cannot be discovered reliably.
  • Some database engines or storage configurations may not support all backup, transaction, or compaction operations.
  • Reindex requires supported transactional tables and successful Preflight checks.
  • A successful local backup is not a substitute for an independently tested hosting or infrastructure backup.
  • Exact row counts and whole-database audits can take time on large databases.
  • Database allocation estimates do not represent the complete physical data-directory footprint.

Does Tornado send site data to an external service?

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 installation. 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. Uploads quarantine files may also contain private site content and must be protected accordingly. 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. By default, operational data and backups are retained to avoid accidental data loss.

更新日志:

2.4.2 2.4.1 2.4.0 2.3.0 2.2.2 2.2.1 2.2.0 2.1.0 2.0.0 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0