CSMBAC Technical Resource
WordPress
WordPress-specific errors and the debugging order that fixes them.
Articles
-
Error establishing a database connection
Fix WordPress "Error establishing a database connection". Check the database server, wp-config credentials, host string, and connection limits in order.
-
WordPress and PHP "headers already sent" white-screen fix
Fix the PHP headers already sent warning in WordPress that causes blank pages, by locating the output that precedes the header call.
-
WordPress application passwords for the REST API
Create WordPress application passwords for the REST API and external tools, keep them scoped, and revoke them when no longer needed.
-
WordPress site returns 502 bad gateway
Fix a WordPress 502 bad gateway: check PHP-FPM worker health, fastcgi logs, worker and timeout settings, then verify via WP-CLI.
-
Block themes vs classic themes in WordPress
Block themes vs classic themes: block themes use the Site Editor and template parts in the database, classic themes keep templates in the file system.
-
Making WordPress bulk content edits safely
WordPress bulk content edits: bulk editor limits, the REST API and WP-CLI approaches, the standalone bulk editor, and safe rollback.
-
Create a WordPress child theme
Create a WordPress child theme: the functions.php and style.css setup, why overrides stay safe, and update discipline.
-
Configuring WordPress core auto-updates
Set up WordPress core auto-updates: what installs by default, how WP_AUTO_UPDATE_CORE and AUTOMATIC_UPDATER_DISABLED behave, and how version control changes the rules.
-
WordPress database cleanup
Safe WordPress database cleanup: back up first, remove post revisions, transients, spam and autoloaded wp-options bloat, then optimize tables via WP-CLI.
-
Profile slow WordPress database queries
How to find slow WordPress database queries with Query Monitor style tools and a few code-free checks.
-
Headless WordPress setup guide
What headless WordPress is, how the REST API plus a static or framework front end works, and the trade-offs.
-
WordPress .htaccess vs server config
When to put a WordPress rule in .htaccess versus the Apache or Nginx server config, with the trade-offs.
-
WordPress image optimisation plugins compared
WordPress image optimisation plugins compared: compression, WebP and AVIF conversion, bulk operation, and why you should choose one plugin and not stack several.
-
WordPress login redirect loop
WordPress login redirect loop fix: cookie mismatch, forced HTTPS redirect, hostname mismatch, and stale cache, in the order that resolves the loop.
-
How WordPress maintenance mode works
How WordPress maintenance mode works: the .maintenance file, how updates enter and exit it, and the fix when a site is stuck in maintenance.
-
WordPress media uploads failing
Why WordPress media uploads fail with an HTTP error, and the ordered fixes for uploads permissions, PHP upload_max_filesize, execution time and disk space.
-
Managing WordPress media with WP-CLI
WP-CLI media tasks: wp media import, regenerate, attachment metadata, and clean unused images, with safety checks.
-
How to raise the WordPress memory limit
Fatal "Allowed memory size exhausted" fix: raise WP_MEMORY_LIMIT in wp-config.php, check the host php.ini caps, then find what actually leaks memory.
-
WordPress Multisite overview
Understand WordPress Multisite, subdomain and subdirectory networks, setup requirements, and when to use one.
-
Redis and Memcached object caching for WordPress
WordPress object caching with Redis or Memcached: what the drop-in does, how to choose, and how to enable it safely.
-
Isolating a WordPress plugin that breaks the site
Isolate the WordPress plugin breaking your site: disable all plugins at once, reactivate in halves via WP-CLI or filesystem, and read the fatal that names it.
-
Fix a WordPress plugin conflict
Fix a WordPress plugin conflict: find the pair that fights, deactivate in groups, and use a staging copy to test the restored pair before shipping live.
-
WordPress plugin update rollback safety
WordPress plugin update rollback safety: prepare for updates, limit the blast radius, and restore the previous plugin version quickly.
-
WordPress plugin vs theme, which feature goes where
Decide whether a WordPress feature belongs in a plugin or a theme. Keep behaviour in plugins, presentation in themes, and avoid locking logic to a theme.
-
Setting up real cron for WordPress
Move WordPress from wp-cron.php visiting-triggered scheduling to a real server cron so scheduled jobs and email run reliably.
-
How to review WordPress release notes and plan an update
Reviewing WordPress release notes before updating, checking security fixes, compatibility, and testing steps.
-
WordPress REST API basics
WordPress REST API basics explained: endpoints, authentication, and safe read/write examples that work on a default install.
-
A WordPress REST route conflict explained
WordPress REST API route conflict: duplicate namespaces or routes, how to spot them, and how to fix conflicting endpoint registration.
-
Restore WordPress from a backup
Restore WordPress from a backup: restore files before the SQL, fix wp-config credentials, then repair siteurl and home if the domain changed.
-
WordPress user roles and capabilities explained
Understand WordPress roles and capabilities, the six default roles, what each can do, and how to grant targeted capabilities safely.
-
WordPress search replace for domain and content changes
WordPress search replace: the serialized data trap, a safe dry-run method, and verifiable steps for domain and content changes.
-
Security headers for WordPress
Security headers for WordPress: set HSTS, X-Frame-Options, X-Content-Type-Options and a CSP that does not break admin, uploads or inline assets.
-
Using the WordPress Site Health tool
Use WordPress Site Health: run the Status checks, read the Info tab, copy the debug payload, and act on the recommendations it flags.
-
Fix WordPress ERR_TOO_MANY_REDIRECTS
Where WordPress gets stuck in ERR_TOO_MANY_REDIRECTS, and the ordered fixes for double HTTPS, cached redirects, CDN SSL mode, htaccess and cookie loops.
-
The WordPress troubleshooting order
The reliable WordPress troubleshooting order: debug log first, plugin and theme isolation, cache clearing, and database repair, with the tools for each step.
-
WordPress update failed with 500
WordPress update failed with 500 fix: roll back the half-installed update, verify perms and disk, then update manually via WP-CLI.
-
WordPress white screen of death
Recover from a blank white WordPress screen, the debugging order, memory limits, theme and plugin isolation, and how to see the real error.
-
Advanced wp-config.php constants
Advanced wp-config.php constants: WP_MEMORY_LIMIT, DISALLOW_FILE_EDIT, SAVEQUERIES and the values that fix memory and security issues.
-
WordPress wp-cron troubleshooting
WordPress wp-cron troubleshooting: how scheduled jobs fire, the causes of stuck cron, and how to switch to a real scheduler.
-
Harden the WordPress login page
Practical hardening for wp-login.php, rate limits, two-factor, headers and clean ups that stop brute force and abuse.
-
Managing wp-config.php with the WP-CLI config command
Manage wp-config.php constants with WP-CLI's config command, setting, reading, and listing values safely.
-
Installing WordPress with WP-CLI
Install WordPress with WP-CLI: download the core, generate wp-config, install the database and a user, and verify the fresh install.
-
Activate and manage themes with WP-CLI
Manage WordPress themes with WP-CLI: list, install, activate, switch, deactivate and update themes safely from the command line.
-
WordPress XML sitemap setup with SEO plugins
WordPress XML sitemap plugins: Yoast and Rank Math generate dynamic sitemaps at /sitemap_index.xml. Avoid running two sitemap plugins at once.