Linux 软件免费装
Banner图

Shabnam Tornado Database Maintenance

开发者 shcd
更新时间 2026年8月14日 19:08
PHP版本: 8.3 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

backup database cleanup integrity reindex

下载

1.0.0

详情介绍:

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. Main features Controlled Post ID reindexing 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:
  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. Adaptive plugin-reference detection Tornado includes dedicated reference handling for known relationships and a conservative adaptive detector for conventional plugin tables. The adaptive detector can evaluate: 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. Plugin and builder compatibility 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 and revision management 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. Backups and recovery 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. Important limitations

安装:

  1. Create a full external backup of the site and database.
  2. Upload the shcd-database-maintenance directory to /wp-content/plugins/, or install the ZIP through Plugins > Add New > Upload Plugin.
  3. Activate Shabnam Tornado Database Maintenance.
  4. Open Tools > Tornado.
  5. Review System Status and run Discovery.
  6. Use Preview before any cleanup operation.
  7. Test Mapping, Backup, Preflight, 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.

常见问题:

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, and AUTO_INCREMENT normalization can be used without changing existing Post IDs.

Does it 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 Post ID reindexing and AUTO_INCREMENT normalization?

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.

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?

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.

Does the plugin support Elementor?

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.

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.

Is Multisite supported?

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.

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.

更新日志:

1.0.0