Debugging theory: https://github.com/szepeviktor/debug-wordpress
- Check PHP version, 8.1 in 2026
- Check PHP directives:
memory_limitmax_execution_timeopcache.memory_consumptionopcache.interned_strings_buffer
- Check OPcache status
- Install
query-monitorand https://github.com/szepeviktor/qm-opcache-status - Or see the output of
opcache_get_status()
- Install
- Is Redis server available?
- Add Redis user in redis.conf
user Example_user reset on +@all -DEBUG ~Example-prefix:* >Example_password
- Check Redis server configuration
maxmemorymaxmemory-policy
- Enable
redisPHP extension - Install, configure, activate and enable (create the symlink for object-cache.php)
wp-redisplugin in wp-config$redis_server = [ 'host' => '127.0.0.1', 'port' => 6379, 'auth' => 'password', // ['Example_user', 'Example_password'], 'database' => 1, ]; define('WP_CACHE_KEY_SALT', 'Example-prefix:');
- Delete transients:
wp transient delete --all - Compare CPU load to resource limits: https://gist.github.com/szepeviktor/2f23726aeecf3655abc473160514e1e3
- See your browser's Developer Tools / Network / HTML page request / Timings: DNS, TCP, SSL, page generation
- Reveal detailed timing in
Server-TimingHTTP response headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Server-Timing - Log response times: https://github.com/szepeviktor/wordpress-website-lifecycle/blob/master/debug/debug-response-time.php
- Profile page generation (see HTML comments): https://github.com/szepeviktor/wordpress-website-lifecycle/blob/master/debug/debug-profiling.php
- Install
query-monitorplugin for SQL queries, HTTP requests, hooks and many more - Install and configure SPX PHP profiling extension: https://github.com/NoiseByNorthwest/php-spx
- Add missing SQL indices: https://mariadb.com/docs/server/reference/sql-statements/data-definition/alter/alter-table#add-index
- Delete orphan entities and metadata: https://github.com/humanmade/orphan-command
- Debug HTTP request headers: https://github.com/szepeviktor/wordpress-website-lifecycle/blob/master/debug/debug-request-headers.php
- Debug HTTP POST requests: https://github.com/szepeviktor/wordpress-website-lifecycle/blob/master/debug/debug-post-requests.php
- Rate limit aggressive bots (Facebook/Bing): https://github.com/szepeviktor/php-rate-limiter
- Remove debug tools and delete log files! https://gist.github.com/szepeviktor/d2df7a36f61d31dad1ab9a6a5fb57106