Errors
Diagnose WordPress 500 Errors Step by Step
A WordPress 500 internal server error means the server hit a problem it could not explain to your browser. The good news is that it is usually fixable with a methodical check of logs, rewrite rules, plugins, themes, and PHP settings. The safest approach is to diagnose in order, starting with the least invasive fixes and backing up before you change anything.
If your whole site is down, focus first on restoring access and finding the fault source, not on guessing. A 500 error can come from a bad .htaccess file, a broken plugin, a theme conflict, exhausted PHP memory, file permission issues, or a host-level problem. The key is to isolate what changed and confirm each layer one by one.
What a WordPress 500 error usually looks like
You may see one of several versions of the same problem:
- A plain “500 Internal Server Error” page.
- A “The server encountered an internal error or misconfiguration” message.
- A blank white response with a 500 status code in the browser.
- Only the front end fails, while /wp-admin still works.
- Only some pages or one specific action fails, such as saving a post or submitting a form.
The exact wording depends on your host and server stack, so do not rely on the message alone. Treat it as a signal that WordPress, PHP, or the web server rejected a request somewhere in the path.
Before you change anything
Take a full backup first if the site is still reachable enough to do so. If you cannot make a fresh backup, note that every change below should still be done carefully and one at a time so you can reverse it.
If this is a live business site and the error is affecting customers, you may want to work from a staging copy or ask for help rather than trial-and-error on production. A bad fix can turn one broken page into a completely inaccessible site.
Step 1: Check whether the error is site-wide or limited
Open the homepage, a known post, a category archive, and /wp-admin if it loads. Then try the same URLs in an incognito window or from another device. This tells you whether the problem is cached in your browser, limited to one area, or affecting the whole site.
If only one action fails, such as saving a page or uploading media, that points to a narrower cause like a plugin hook, security rule, or server limit. If everything returns 500, start with the server-side basics below.
Step 2: Look at the error log before guessing
The fastest path to the root cause is usually the error log. Most hosts provide access through their control panel, SSH, or a logs section in the hosting dashboard. You are looking for the first relevant error at the exact time you reproduced the problem.
Common clues include PHP fatal errors, undefined function calls, memory exhaustion, permission denied messages, or rewrite rule failures. If you have access to WordPress debug logging, it can help too, but the server error log is usually more reliable for a 500.
Typical log clues: - PHP Fatal error: Allowed memory size exhausted - PHP Fatal error: Uncaught Error in a plugin file - AH00124: Request exceeded the limit of 10 internal redirects - Permission denied: /path/to/file - RewriteRule: bad flag delimiters or invalid pattern
Do not edit code based only on a guess. Use the log line to narrow the test you run next.
Step 3: Regenerate .htaccess if you are on Apache or LiteSpeed
A damaged rewrite file is one of the most common causes of a 500 error after permalink changes, migrations, or security plugins. If your site uses Apache or LiteSpeed, the .htaccess file may control permalink routing and access rules.
- Back up the current .htaccess file before touching it.
- Connect by FTP, SFTP, or file manager.
- Rename .htaccess to something like .htaccess-old.
- Try loading the site again.
- If the site works, log in to WordPress and go to Settings > Permalinks, then save changes without editing anything.
That rebuilds the file with WordPress’s default rules. If the site still 500s after removing .htaccess, the problem is elsewhere, and you should restore the original file after testing so you do not lose custom rules.
If you are on Nginx, there is no .htaccess file to fix. In that case, look for a server config issue, a bad rewrite rule in the host panel, or a PHP/application problem instead.
Step 4: Disable plugins the safe way
Plugins are a frequent source of fatal errors, especially when one update introduces incompatible code or a plugin conflicts with PHP or another extension. If /wp-admin still works, disable plugins from the dashboard. If it does not, use the filesystem.
- Back up first.
- Rename the
wp-content/pluginsfolder to something likeplugins-old. - Load the site again.
- If the 500 error clears, restore the folder name and reactivate plugins one by one.
That folder rename disables all plugins at once, which is often the quickest way to prove whether a plugin is involved. Once the site loads, narrow it down by re-enabling plugins in small groups until the error returns.
If the site only breaks when one specific plugin is active, leave it disabled and check for an update, replacement, or compatibility issue before you turn it back on. If the plugin is essential and you need help triaging the conflict, a free diagnosis from Mend can identify the cause and quote a flat price before any work begins.
Step 5: Switch to a default theme
If plugins are not the culprit, the active theme is the next likely place to look. A theme can trigger a 500 if it contains a bad function call, a broken template include, or custom code added directly to functions.php or a child theme file.
The safest test is to switch temporarily to a default WordPress theme such as Twenty Twenty-Four if you can log in. If you cannot log in, you can rename the active theme folder through FTP or file manager so WordPress falls back to a default theme if one is installed.
If the site comes back after the theme switch, the theme is the problem. Check recent edits, child-theme overrides, and any custom snippets added outside a plugin or mu-plugin.
Step 6: Check PHP memory and execution limits
Some 500 errors are not caused by a broken file at all, but by the server running out of resources. A plugin, import, image processing task, or heavy page builder can hit the PHP memory limit or exceed execution time.
You may see a memory exhausted message in the logs, or the error may appear without a clear browser clue. The fix depends on your host, but common safe steps include:
- Confirm the current PHP memory limit with your host or site info panel.
- Ask the host to raise memory and max execution time if your plan allows it.
- Review whether a recent plugin, import, or cron job suddenly increased load.
Do not keep increasing limits blindly. If a task only works when limits are unusually high, there may be a deeper code or data issue that needs attention.
Step 7: Inspect file permissions and ownership
Incorrect permissions can produce 500 errors when the web server cannot read a file, execute a script, or write to a directory it needs. This often happens after a migration, a server move, or manual file changes.
As a general rule, directories should not be writable by everyone, and files should not be executable unless they need to be. Exact permission values can vary by host and server setup, so use your host’s recommended settings instead of copying random numbers from the internet.
If you are unsure, ask your host to verify ownership and permissions. Fixing permissions incorrectly can create a security problem or make the site less stable.
Step 8: Look for host-level protections or WAF blocks
Sometimes the 500 error is not from WordPress itself. A web application firewall, security layer, mod_security rule, malware scanner, or rate limit can block a request and return 500 or a similar server error.
This is especially likely if the error appears only on certain URLs, only after submitting a form, only for logged-in users, or only when a bot-like pattern is detected. Check the host security logs, firewall events, and any recent changes in security plugins or host rules.
Step 9: Test recent changes in reverse order
A practical diagnosis always asks: what changed last? WordPress errors often begin right after a plugin update, theme tweak, host migration, PHP upgrade, CDN rule change, or security hardening step.
List the last few changes and reverse them one at a time. This is safer and faster than random edits because each rollback either removes a cause or proves it is not the source.
If you recently updated multiple things at once, stop making changes and test each layer separately. The more variables you change together, the harder the fix becomes.
How to prevent 500 errors from coming back
Once you find the root cause, the best prevention is boring but effective:
- Keep a working backup and verify that you can restore it.
- Update plugins and themes one at a time.
- Prefer well-maintained code over abandoned add-ons.
- Avoid direct edits to core, plugin, or parent theme files.
- Watch logs after updates or server changes.
- Use staging for risky changes when the site matters.
If you want a broader maintenance plan after you get through the error, this is a good time to read What a Good WordPress Maintenance Routine Looks Like. It covers the small habits that prevent a lot of emergency fixes.
When to call a professional
Bring in help when the error is intermittent, tied to checkout or forms, returns after every fix, or points to a server-level issue you cannot safely change. You should also call for help if the logs mention fatal errors but you are not comfortable tracing them to a plugin, theme, or custom code file.
If the site is down and you need it fixed quickly, Mend can triage the issue with a free diagnosis and then repair it on a backup-first workflow. For urgent downtime, the Emergency Rescue service is designed for broken sites, and every paid fix includes a plain-English report of the root cause and exactly what changed. If you would rather have a senior engineer handle the diagnosis and repair, you can also start at /start/diagnosis.
For a deeper reference on related failure modes, see How to Fix the WordPress 500 Internal Server Error and How to Fix the WordPress White Screen of Death. If the site is completely locked up, those guides cover a few of the same safe recovery steps in more detail.
A WordPress 500 error is frustrating, but it is rarely random. Start with logs, test .htaccess, disable plugins, switch themes, and then check limits, permissions, and host rules. One careful pass usually reveals the cause.
If you are stuck in a loop of breaking and restoring, that is usually the sign to stop experimenting and get a clean diagnosis. The fastest fix is often the one that avoids more changes than necessary.
Frequently asked questions
What is the first thing to check on a WordPress 500 error?
Check the error log first if you can access it. It usually points to the exact file, plugin, theme, or server rule causing the failure.
Can a 500 error come from .htaccess?
Yes. A bad .htaccess file is one of the most common causes on Apache and LiteSpeed servers, especially after permalink or security changes.
How do I test whether a plugin is causing the error?
Rename the wp-content/plugins folder through FTP or file manager to disable all plugins at once. If the site comes back, re-enable them one by one until the error returns.
When should I contact my host?
Contact your host if the logs show server-level errors, permission problems, firewall blocks, or memory limits you cannot change yourself. Host-side issues often need their help to resolve safely.