Cheat sheet

WordPress — Express troubleshooting

Incident-focused WordPress reference for logs, plugins, themes, database, WP-CLI, cron, permalinks, SMTP, permissions and 500/critical errors.

⌚ About 3 min read
View my favorites
WordPressIntermediate to advanced8 sections · 32 reference points

Incident-focused WordPress reference for logs, plugins, themes, database, WP-CLI, cron, permalinks, SMTP, permissions and 500/critical errors.

Files & paths

Configuration
wp-config.php

Contains 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 Nginx

For HTTP 500, server logs are often more precise than WordPress UI.

Plugins & themes

List plugins
wp plugin list

Shows plugin status and versions from shell.

Deactivate plugin
wp plugin deactivate nom-plugin

Cleaner than renaming if WP-CLI is available.

Deactivate all
wp plugin deactivate --all

Strong diagnostic action; plan application impact.

Switch
wp theme activate twentytwentysix

Only if a compatible fallback theme is installed.

Database

Database check
wp db check

Checks access and logical table state.

Table prefix
$table_prefix

Confirms the table prefix expected by the site.

WordPress URL
wp option get siteurl

Compare siteurl and home during redirect/migration issues.

Home URL
wp option get home

Mismatch can cause redirects or incorrect links.

Cron & tasks

Cron events
wp cron event list

Shows overdue, frequent or unexpected tasks.

Run due cron
wp cron event run --due-now

May 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 anormalement

Correlate with PHP logs and database load.

Flush permalinks
wp rewrite flush

Do not run on every request; use after rewrite changes.

List rewrite rules
wp rewrite list | head -50

Useful to verify expected routes.

Object cache
wp cache type

Depending 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
Dépend de la configuration PHP ou d’un plugin SMTP

A form can validate successfully while delivery fails.

SMTP
Préférer un compte/service authentifié avec logs

Keep message ID or provider trace for diagnostics.

SPF/DKIM/DMARC
Check le domaine utilisé dans From/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.log

The critical error page often hides the full root cause.

Memory
memory_limit + WP_MEMORY_LIMIT

PHP/FPM limits may override WordPress constants.

Failing plugin
Renommer un seul dossier plugin à la fois

Change one variable at a time.

Recovery mode
Lien envoyé par WordPress si email admin fonctionnel

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.
← All cheat sheets
♡ 0