| 开发者 | shcd |
|---|---|
| 更新时间 | 2026年8月14日 19:08 |
| PHP版本: | 8.3 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
$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.
Main features
INFORMATION_SCHEMA, including tables, columns, indexes, engines, and foreign keys.AUTO_INCREMENT normalization without renumbering existing rows.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.post_id, page_id, product_id, or attachment_id.object_id with object_type, or element_id with element_type.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.
Important limitations
shcd-database-maintenance directory to /wp-content/plugins/, or install the ZIP through Plugins > Add New > Upload Plugin.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.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, and AUTO_INCREMENT normalization can be used without changing existing Post IDs.
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.
Reindexing changes existing IDs and synchronizes registered references. AUTO_INCREMENT normalization changes only the next generated value when the database allows it; it does not renumber existing rows or remove interior gaps.
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.
Version 1.0.0 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, media repair tools, selected builder-registry support, and post-operation CSS or cache rebuilding. Elementor and third-party widget data can vary, so unresolved proprietary paths remain blocking.
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.
The plugin can inspect the active site's tables, but network-wide Multisite reindexing is intentionally not supported. Do not use the reindex workflow as a network-wide operation.
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.
shcd-database-maintenance repository slug and matching text domain.$wpdb.