25 Most Common WordPress Errors and How to Fix Them
By wpmew
Most common WordPress errors come from a small number of causes: a plugin or theme conflict, a broken .htaccess file, low PHP memory, wrong file permissions, or a problem with your hosting server. If you know how to turn on debugging and disable plugins without logging in, you can fix most of them in minutes.
Short answer: Back up your site. Turn on WP_DEBUG_LOG. Rename the plugins folder to rule out plugins. Switch to a default theme. Reset .htaccess. If none of that works, contact your host with the error log.
Key takeaways
- Always back up before you troubleshoot, even if the site is already broken.
- The error log tells you which file caused the problem. Read it before guessing.
- Plugin and theme conflicts cause most errors. Check them first.
- Use SFTP or your host’s file manager when you can’t reach wp-admin.
[IMAGE: Flowchart for troubleshooting WordPress errors: check error log → disable plugins → default theme → reset .htaccess → increase memory → contact host. Suggested alt: “WordPress troubleshooting flowchart”. Suggested filename: wordpress-troubleshooting-flowchart.webp.]
Before you start: three tools you’ll need
1. Turn on debug logging
Add these lines to wp-config.php, above the line that says /* That's all, stop editing! */:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Errors are saved to wp-content/debug.log and not shown to visitors. Turn this off when you’re done.
2. Disable all plugins without wp-admin
Connect with SFTP or your host’s file manager, go to wp-content/, and rename plugins to plugins-off. If that fixes the site, rename it back to plugins and deactivate plugins one by one to find the cause.
3. Switch to a default theme
Rename your active theme’s folder in wp-content/themes/. WordPress falls back to a default theme such as Twenty Twenty-Five, as long as one is installed.
Critical and fatal errors
1. “There has been a critical error on this website”
This is WordPress’s friendly message for a PHP fatal error. WordPress usually emails the site admin a recovery mode link.
Fix: Open the recovery link from the email, or check debug.log. The log names the plugin or theme file that failed. Deactivate that plugin or theme, then update it or replace it.
2. White screen of death (blank page)
A blank white page with no error message usually means a PHP error while error display is turned off, or PHP ran out of memory.
Fix: Turn on debug logging, disable plugins, and switch themes. If only wp-admin is blank, increase the memory limit (see error 5).
3. Parse error or syntax error
Parse error: syntax error, unexpected... means code was pasted with a typo, usually in functions.php.
Fix: Open the file and line number named in the error through SFTP, then undo the change you made. This is why custom code belongs in a snippets plugin, which can safely turn off broken snippets.
4. PHP version errors
Old plugins can fail after your host upgrades PHP. New plugins can fail on very old PHP versions.
Fix: Check Tools → Site Health → Info → Server to see your PHP version. Update the plugin that’s failing, or temporarily change the PHP version in your hosting panel while you replace it.
5. “Allowed memory size exhausted”
Fix: Add this to wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
If the error comes back, your host’s limit may be lower than that. Ask them to raise it, or find the plugin that uses too much memory.
Server errors
6. 500 Internal Server Error
A general server error. Common causes are a corrupt .htaccess file, a plugin conflict, or PHP limits.
Fix: Rename .htaccess to .htaccess-old, then go to Settings → Permalinks and click Save to create a new one. If that doesn’t work, disable plugins and check the server error log in your hosting panel.
7. Error establishing a database connection
WordPress can’t reach MySQL.
Fix:
- Check
DB_NAME,DB_USER,DB_PASSWORD, andDB_HOSTinwp-config.phpagainst your hosting panel. - Ask your host whether the database server is down.
- If only wp-admin says the database needs repair, add
define( 'WP_ALLOW_REPAIR', true );and visit/wp-admin/maint/repair.php. Remove that line afterwards.
8. 502 Bad Gateway / 504 Gateway Timeout
The server or proxy didn’t get a response in time. Common causes are traffic spikes, slow PHP processes, or a CDN issue.
Fix: Wait a few minutes and reload. Temporarily pause your CDN. Look for slow plugins or cron jobs. If it keeps happening, you may need more server resources. See our guide on shared hosting vs VPS.
9. 503 Service Unavailable
The server is overloaded or in maintenance.
Fix: Same as 502. Also check whether a .maintenance file was left in your site’s root folder (see error 17).
10. 403 Forbidden
Fix: Check your file permissions (folders 755, files 644). Check for rules in your security plugin or .htaccess that are blocking you. Check whether your host’s firewall blocked your IP address.
11. 429 Too Many Requests
A security plugin, host, or CDN is rate-limiting you.
Fix: Allowlist your IP address in the security plugin or Cloudflare. Look for bots that are hitting wp-login.php or xmlrpc.php.
Page and URL errors
12. Posts return 404, but the homepage works
Fix: Go to Settings → Permalinks and click Save Changes without changing anything. This rebuilds the rewrite rules. On Nginx, make sure the server config includes try_files $uri $uri/ /index.php?$args;.
13. Too many redirects (ERR_TOO_MANY_REDIRECTS)
The redirect loop is usually caused by different URLs in Settings → General, forced HTTPS in two places, or Cloudflare’s Flexible SSL setting.
Fix: Make sure WordPress Address and Site Address match exactly, including https and www. Set Cloudflare SSL to Full (strict). Clear your browser cookies.
14. Mixed content warnings (not fully secure)
Your page is on HTTPS but loads some images or scripts over HTTP.
Fix: Update both URLs in Settings → General to https. Then run a search-replace from http://yourdomain to https://yourdomain with Better Search Replace or WP-CLI. Back up first.
15. Changes don’t show up
That’s usually caching, not an error.
Fix: Clear your caching plugin, your server or host cache, your CDN, and your browser cache, in that order.
Admin and login errors
16. Locked out of wp-admin / login page refreshes
Fix: Clear your cookies. Disable your security plugin by renaming its folder. Check that the site URLs are correct. If you forgot your password and the reset email doesn’t arrive, reset it in phpMyAdmin or with wp user update.
17. “Briefly unavailable for scheduled maintenance”
An update was interrupted.
Fix: Delete the .maintenance file in your site’s root folder, then run the update again.
18. “Are you sure you want to do this?”
A security check (nonce) failed. This often happens when a page was open too long or a plugin blocks the request.
Fix: Reload the page and try again. If it keeps happening, disable plugins to find the conflict.
19. Sidebar or widgets appear below the content
Usually an unclosed HTML div in a post or widget.
Fix: Check the post in the code editor for broken HTML. Try switching themes to confirm.
Upload and media errors
20. “The uploaded file exceeds the upload_max_filesize directive”
Fix: Raise upload_max_filesize and post_max_size in your hosting panel’s PHP settings (for example, 64M). Some hosts also let you set them in .user.ini.
21. HTTP error when uploading images
Fix: Try a smaller image. Increase the memory limit. Rename the file to remove special characters. Temporarily disable your image optimization plugin.
22. Images not showing (broken thumbnails)
Fix: Check that wp-content/uploads is writable (755). Use Regenerate Thumbnails if you changed image sizes. Check for hotlink protection rules that block your own domain.
23. “Missing a temporary folder”
Fix: Ask your host to set the PHP upload_tmp_dir, or add define( 'WP_TEMP_DIR', dirname( __FILE__ ) . '/wp-content/temp/' ); and create that folder.
Email and scheduling errors
24. WordPress not sending emails
Contact form messages and password resets never arrive.
Fix: Install WP Mail SMTP and send mail through a real email provider. Add SPF, DKIM, and DMARC records for your domain.
25. Scheduled posts miss their schedule
WP-Cron only runs when someone visits your site.
Fix: Add define( 'DISABLE_WP_CRON', true ); to wp-config.php and set up a real server cron job that calls wp-cron.php every five minutes.
How to prevent WordPress errors
- Keep daily off-site backups with a plugin such as UpdraftPlus.
- Test big updates on a staging site before updating the live site.
- Update plugins one at a time, not all at once, so you know which one broke something.
- Remove plugins you don’t use and avoid abandoned ones.
- Use a snippets plugin instead of editing
functions.phpdirectly. - Choose good hosting with server-level backups and staging.
FAQs
How do I find which plugin is causing an error?
Check wp-content/debug.log first, because it usually names the plugin’s folder. If it doesn’t, rename the plugins folder, confirm the site works, and then reactivate plugins one at a time.
Will disabling plugins delete my settings?
No. Deactivating or renaming the folder keeps plugin settings in the database. Deleting a plugin may remove its data if the plugin cleans up when it’s uninstalled.
When should I contact my host?
Contact your host when the error happens even with all plugins disabled and a default theme active, or when you see database connection, 502/503/504, or server resource errors. Send them the exact error message and the time it happened.