ChronoSplit DB

Today

When WordPress sites grow beyond 500,000 posts, the wp_postmeta table often becomes the primary bottleneck. Standard indexing isn't enough when the table size exceeds the server's RAM.

ChronoSplit is a custom engineered solution that brings MySQL Horizontal Partitioning to the WordPress dashboard. It physically splits the database storage into yearly "buckets" without breaking the WordPress application layer.


🚀 Key Engineering Features

1. MySQL Range Partitioning

Instead of standard tables, the plugin alters the storage engine to use PARTITION BY RANGE.

2. Memory-Safe "Chunked" Backups

Standard backup plugins often crash on massive tables due to PHP memory_limit exhaustion.

3. The p_ahead Logic

To ensure the site never crashes when a new year starts:


🛠 Tech Stack


📚 Documentation

Overview

ChronoSplit is a utility for high-scale WordPress environments. It supports partitioning both wp_posts and wp_postmeta.

Prerequisite

Installation

  1. Download the plugin zip file.
  2. Upload to /wp-content/plugins/.
  3. Activate via the WordPress Admin Dashboard.
  4. Navigate to Tools > ChronoSplit DB.

Usage Guide

Step 1: Create a Backup

Navigate to the Backup tab.

This is a mandatory step.

  1. Select the target table (wp_postmeta or wp_posts).
  2. Click Create Backup.
  3. The system will generate a .sql file in your uploads directory.
  4. Note: You can download these files for off-site storage or delete them to save space.

Step 2: Apply Partitions

Navigate to the Partition Tables tab.

  1. The system will scan your wp_posts table to detect all active years.
  2. Review the proposed partitions (e.g., p_2023, p_2024, p_ahead).
  3. Select which tables to partition:
    • wp_postmeta: Highly Recommended. Contains the heaviest metadata.
    • wp_posts: Optional. Recommended for sites with >1M posts.
  4. Confirm the safety check and click Apply Partitions.

Step 3: Maintenance (Yearly)

When a new year starts (e.g., Jan 1st, 2026):

  1. Return to the plugin.
  2. Click Update Partitions.
  3. The plugin will automatically detect that 2025 has ended, move the data from p_ahead into a new p_2025 partition, and reset p_ahead for 2026.

Safety & Recovery

The Revert Function

If you wish to move your site to a host that does not support partitioning, or if you simply want to return to standard WordPress:

  1. Go to the Revert / Undo tab.
  2. Select the tables to revert.
  3. Click Merge & Restore Defaults.
  4. Result: Partitions are removed, data is merged back into a single .ibd file, and the Primary Key is reset to standard WordPress defaults (meta_id).

Category Partitioning Limitation

Users often ask to partition by Category. This is not possible with standard MySQL Partitioning because the category_id does not exist inside the wp_postmeta table. ChronoSplit uses Post ID Ranges which ensures 100% data integrity and strict chronological syncing between posts and metadata.