Incident-focused WordPress reference for logs, plugins, themes, database, WP-CLI, cron, permalinks, SMTP, permissions and 500/critical errors.
Files & paths
- Configuration — wp-config.phpContains DB access, salts and debug constants.
- Plugins — wp-content/plugins/A failing plugin can be disabled by renaming its folder, carefully.
- Themes — wp-content/themes/Keep a compatible default theme available as fallback.
- Uploads — wp-content/uploads/Check disk space, permissions and URLs before blaming Media Library.
Debug & logs
- Enable debug — define('WP_DEBUG', true);Enable temporarily during diagnostics.
- Log errors — define('WP_DEBUG_LOG', true);Normally writes to wp-content/debug.log.
- Hide display — define('WP_DEBUG_DISPLAY', false);Avoids exposing detailed errors to visitors.
- PHP/web log — error_log / logs FPM / logs Apache ou NginxFor HTTP 500, server logs are often more precise than WordPress UI.
Plugins & themes
- List plugins — wp plugin listShows plugin status and versions from shell.
- Deactivate plugin — wp plugin deactivate nom-pluginCleaner than renaming if WP-CLI is available.
- Deactivate all — wp plugin deactivate --allStrong diagnostic action; plan application impact.
- Switch theme — wp theme activate twentytwentysixOnly if a compatible fallback theme is installed.
Database
- Database check — wp db checkChecks access and logical table state.
- Table prefix — $table_prefixConfirms the table prefix expected by the site.
- WordPress URL — wp option get siteurlCompare siteurl and home during redirect/migration issues.
- Home URL — wp option get homeMismatch can cause redirects or incorrect links.
Cron & tasks
- Cron events — wp cron event listShows overdue, frequent or unexpected tasks.
- Run due cron — wp cron event run --due-nowMay execute many tasks; use with impact awareness.
- WP-Cron disabled — define('DISABLE_WP_CRON', true);If enabled, an external scheduler must invoke wp-cron.php.
- Cron loops — Search hooks qui se replanifient anormalementCorrelate with PHP logs and database load.
Permalinks, cache & HTTP
- Flush permalinks — wp rewrite flushDo not run on every request; use after rewrite changes.
- List rewrite rules — wp rewrite list | head -50Useful to verify expected routes.
- Object cache — wp cache typeDepending on version, may identify active cache implementation.
- HTTP status — curl -I https://exemple.fr/page/Compares public behavior without browser state.
Email & forms
- wp_mail — Depends on PHP configuration or an SMTP plugin. A form can validate successfully while delivery fails.
- SMTP — Use an appropriate authenticated service with diagnostic logs. Keep message ID or provider trace for diagnostics.
- SPF/DKIM/DMARC — Check the domain used in From and Return-Path. Incorrect sending identity can cause spam or rejection.
- WP-CLI mail test — wp eval "var_dump(wp_mail('admin@example.com','Test BOAI','Test'));"true only means WordPress handed the message to the configured transport.
Critical error / HTTP 500
- Check logs first — PHP-FPM / Apache / Nginx / debug.logThe critical error page often hides the full root cause.
- Memory — memory_limit + WP_MEMORY_LIMITPHP/FPM limits may override WordPress constants.
- Failing plugin — Rename one plugin directory at a time. Change one variable at a time.
- Recovery mode — A WordPress recovery link requires a working administrator email address. Useful to isolate plugins without FTP, but relies on email delivery.
Key points
- Back up files and database before changes or ensure a valid restore point.
- Do not leave WP_DEBUG_DISPLAY enabled publicly.
- Correlate HTTP 500 with server logs, not only WordPress debug logs.
- Avoid automatic flush/rebuild operations on every request.