database

Building Custom WP-CLI Commands for Massive Data Migrations

The article explains how to build custom WP-CLI commands to perform massive data migrations in WordPress, avoiding browser timeouts and memory exhaustion by processing data in batches using PHP generators. It emphasizes managing the object cache carefully, employing SQL transactions for data safety, and using progress bars and dry-run options to maintain transparency and control during large updates.

https://deliciousbrains.com/building-custom-wp-cli-commands-for-massive-data-migrations/

Database Indexing: The Missing Manual for WordPress

The article explains that while WordPress’s default database indexes are adequate for most sites, large sites with millions of rows in tables like wp_postmeta and wp_options suffer from slow queries due to full table scans. It emphasizes understanding MySQL indexing basics, managing the wp_options table size to stay within a 1MB cache buffer, and using partial indexes on large text fields to improve query performance, while recommending tools like Query Monitor and the MySQL Slow Query Log to identify bottlenecks.

https://deliciousbrains.com/database-indexing-for-wordpress/

Scroll to Top