| 开发者 |
shcd
shcd Tags: database cleanup backup integrity reindex maintenance |
|---|---|
| 更新时间 | 2026年11月13日 07:08 |
| PHP版本: | 8.3 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
No. Post ID Reindexing is disabled by default and requires a separate, explicit workflow with Discovery, Mapping, Backup, Preflight, authorization, and typed confirmation.
No. Cleanup, revision retention, orphan checks, backup, integrity reporting, table compaction, and AUTO_INCREMENT maintenance can be used without changing existing Post IDs.
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.
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.
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.
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.
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.
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.
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.
No. Remote services, custom applications, external databases, exported files, and copied IDs outside the current WordPress database must be audited separately.
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.
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.
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.
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.
Reindex remains blocked. Review the table and column, choose an explicit supported policy, register a site-specific adapter, or leave the operation unexecuted.
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.
Tornado uses exactly three dedicated internal operational tables after the verified legacy-store migration:
Tornado discovers the active database schema using the current WordPress database connection and the available INFORMATION_SCHEMA metadata. Discovery can inspect:
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:
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:
Tornado includes forensic discovery for database residue left by removed plugins and themes. The discovery process can use:
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:
The database audit compares the database before and after supported manual cleanup operations. The audit can report:
Before eligible table removal, Tornado checks live database dependencies. The checks include:
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.
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.
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:
Tornado includes dedicated reference handling for known relationships and a conservative adaptive detector for conventional plugin tables. The adaptive detector can evaluate:
Tornado includes dedicated or structured handling for selected relationships in:
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:
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:
Tornado uses authenticated WordPress administrative requests and capability checks for its maintenance operations. Destructive workflows use applicable protections such as:
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.