Skip to main content

Database Tuning

The database sets the speed limit for every dynamic WordPress action (login, checkout, admin, search, AJAX). This module focuses on practical MySQL/MariaDB tuning for WordPress: InnoDB memory, connection limits, indexing, and the diagnostic workflows that reveal slow plugins and queries.

LessonDescription
FoundationHow WordPress queries execute and where database tuning helps.
MariaDB vs MySQLHow to choose an engine and what differences matter for WordPress.
InnoDB Buffer PoolSize InnoDB memory to reduce disk I/O without causing OOM/swap issues.
Query CacheWhy query cache is a trap for WordPress and how to ensure it's disabled.
Connection TuningAlign DB connection limits with PHP worker concurrency and real traffic patterns.
Query Log ConfigurationEnable the slow query log safely and analyze which queries/plugins are slow.
WP-Specific IndexingAdd targeted indexes to wp_postmeta/wp_options when slow logs prove they're needed.
Monitoring DB HealthUse InnoDB status, process list, and disk I/O to spot contention and regressions.
Checklist & CheatsheetA deployment checklist for database tuning and verification.