If you’ve ever stared at a screen showing WordPress errors like 400, 403, 404, 500, 502, 503 or 504, you know the panic. Your site goes down, clients complain, Google starts deindexing you, and you have no clue where to start. I’ve been there. So here’s the raw, no-BS playbook I actually use to fix these WordPress errors without hiring a developer every single time.
Why WordPress Errors 400, 403 and 404 Keep Coming Back
Error 400 (Bad Request) is almost always a malformed request hitting your server. In 90% of cases I’ve debugged, it’s a corrupted cookie, a plugin injecting garbage headers, or a CDN caching a broken redirect. Clear your browser cache, disable your CDN temporarily, and check the raw request in DevTools. If it disappears, it was cache poison.
Error 403 (Forbidden) means permissions. Not «maybe» — it is permissions. Your wp-content folder should be 755, files 644, and wp-config.php 600 if possible. Anything with 777 is asking for a hack. If permissions look fine and you still get 403, check your .htaccess for a stray Deny from all line.
Error 404 (Not Found) on WordPress is usually a permalink mess. Go to Settings → Permalinks and hit Save without changing anything. That regenerates your .htaccess rewrite rules. If the 404 persists, your host may have disabled mod_rewrite or you’re missing the RewriteEngine On block.
500, 502, 503 and 504: The Server-Side Nightmare
Error 500 (Internal Server Error) is the vague one that drives everyone crazy. Nine times out of ten it’s a PHP fatal error from a plugin or theme. Rename your plugins folder to plugins_off via FTP and reload. If the site comes back, activate plugins one by one until it dies again. That’s your culprit.
Error 502 (Bad Gateway) is a proxy or PHP-FPM crash. On Nginx with PHP-FPM, check /var/log/php-fpm.log and bump pm.max_children. On shared hosting, 502 usually means your host’s PHP pool is overwhelmed — nothing you can fix from the dashboard.
Error 503 (Service Unavailable) is the one WordPress shows during maintenance mode. But if it’s permanent, check .maintenance in your root folder and delete it. Also check if your host enabled mod_evasive after too many requests from your IP.
Error 504 (Gateway Timeout) means your server waited too long for a response. Long-running database queries are the usual suspect. Enable slow_query_log in MySQL and look for queries over 5 seconds. A bloated wp_options table (autoloaded data over 1MB) will do it.
Rule of thumb: if the error number is 4xx, the problem is on your side (client, code, permissions). If it’s 5xx, the problem is the server or PHP. That single distinction saves hours.
Apache, Nginx and DNS: The Configuration Layer
For Apache, the mod_rewrite module must be enabled (a2enmod rewrite on Ubuntu). Without it, every WordPress permalink breaks. Also verify AllowOverride All in your vhost, otherwise .htaccess is ignored entirely.
On Nginx, the classic mistake is missing the try_files $uri $uri/ /index.php?$args; line inside the location / block. Without it, WordPress errors 404 appear on every interior page while the homepage loads fine.
DNS issues are sneakier. If dig yourdomain.com returns nothing or points to the wrong IP, no amount of WordPress fixing will help. Use dig +trace to see where the resolution breaks. Also check that your domain hasn’t expired — yes, it happens more than people admit.
Plugin, Theme and WordPress Install Conflicts
When WordPress errors appear after an update, 80% of the time it’s a plugin conflict. The fastest diagnostic is the health check plugin plus the default Twenty Twenty-Five theme. If the error vanishes, you know it’s theme or plugin.
Installation errors («unable to connect to database» or 500 during install) almost always trace back to PHP version incompatibility. WordPress 6.x requires PHP 7.4 minimum, but honestly, run 8.2 or 8.3 in 2026. Older PHP makes you a target for exploits.
Security issues cause silent WordPress errors too. Malware injecting code into wp-config.php or hidden .php files in uploads will break your site without warning. Run a scan with Wordfence or Sucuri, and check wp-content/uploads for any PHP file — there should be zero.
Network, VPN, Proxy and CDN Solutions
If your site works for you but not for others (or vice versa), it’s a network issue. Try a VPN to change your IP — sometimes your ISP or your host’s firewall has blocked you after brute-force attempts.
Cloudflare in front of WordPress is fantastic for performance but a nightmare for caching errors. If you update your site and see stale content or weird 5xx errors, purge the Cloudflare cache and check the «Under Attack Mode» toggle. That mode breaks AJAX on many WordPress themes.
Squid proxy setups, common in corporate networks, can break WordPress admin calls. Verify ACL rules allow wp-admin and admin-ajax.php, otherwise you’ll get 403 errors on every backend action.
Mobile, WhatsApp and Multimedia Loading Problems
If your site breaks only on mobile, your theme’s respo