Trace an HTTP 500 error on WordPress back to its cause by checking PHP, .htaccess, the plugins, the memory and the permissions. The priority is to restore a situation under control without wiping the traces useful to the diagnosis.

How do I recognise a WordPress 500 error?
On WordPress, a visible outage can come from the core, the theme, a plugin, PHP, the database or the server. A reliable fix isolates one variable at a time and always keeps the option of going back. Start by noting when it appeared, the most recent changes, the URLs concerned and the behaviour observed.
Note the page's HTTP status, test in a private window, and read the PHP error log along with debug.log if WordPress debugging is enabled. Note too whether the admin is still reachable: the answer points straight at the theme, a plugin or the server environment.
An HTTP 500 response
A blank page or an Internal Server Error message
An error limited to wp-admin or to one URL
One signal alone does not prove the cause: âAn HTTP 500 responseâ can come from âAn invalid directive in the .htaccess fileâ just as easily as from âA fatal PHP error hidden in productionâ. Look for at least two findings that agree before you apply a lasting fix.
A 500 error is a server symptom, not a diagnosis
The HTTP 500 code only means the server could not finish the request. The message shown in the browser almost never carries the cause: that is in the Apache or Nginx error log and in the PHP log, at the exact timestamp of the request that failed.
The most telling lines are âInvalid commandâ or âRewriteRule: bad flagâ for an invalid .htaccess file, âPHP Fatal errorâ for incompatible code, âPremature end of script headersâ, or exceeding max_execution_time for a script that runs too long, and âPermission deniedâ for incorrect file permissions.
Testing .htaccess and the PHP resources methodically
Rename .htaccess to .htaccess-old, then reload the page. If the site answers, regenerate a clean file by saving the permalink settings, then reintroduce the rules your caching or security plugins added, one at a time. A single directive the server does not support is enough to throw a 500 across the whole site.
If the error only shows on certain heavy actions â an import, generating a PDF, a backup â weigh memory_limit, max_execution_time and WP_MEMORY_LIMIT against what the job needs. The expected permissions are generally 755 for folders and 644 for files, with wp-config.php tighter still where the hosting allows it.
Causes to check
For a WordPress 500 error, the 4 causes below are ranked from the commonest to the rarest. Test the one matching the siteâs most recent change first, one at a time.
An invalid directive in the .htaccess file
A fatal PHP error hidden in production
A memory or time limit exceeded
Incorrect file permissions or ownership
The recovery email WordPress sends, the Site Health report, the update history and the PHP logs often name the file and the line at fault. Start from that evidence rather than disabling plugins at random.
A good fix does not merely make the symptom disappear. It explains why the problem appeared and how to check that it does not come back.
Precautions before starting
Make a full backup of the files and the database, even if an automatic backup already exists, and write down the versions of WordPress, the theme, the plugins and PHP. Keep that copy off the server in question, and check it opens.
If the site is still taking form submissions or orders, plan a short maintenance window so nothing is written while you work.
Quick diagnosis: what is the likely cause?
Answer these questions to aim your search before diving into the server logs.
Want a human opinion on your exact situation?
Get a recommendationDiagnosis and fix
| Phase | Objective | A mistake to avoid |
|---|---|---|
| Observe | Reproduce it and gather the evidence | Changing several settings before you have a baseline |
| Isolate | Confirm the component or the rule responsible | Deleting files without keeping a copy |
| Fix | Apply the smallest documented change | Restoring a version that still contains the same cause |
| Validate | Test the whole journey and monitor it | Concluding from the home page loading alone |
How do I resolve a WordPress 500 error step by step?
The 4 steps below tackle a WordPress 500 error from the least intrusive to the heaviest. After each change, repeat the same test; if nothing changes, go back to the previous state before moving on to the next step.
- 01
Step 1
Note the exact time and URL, then read the server and PHP logs.
- 02
Step 2
Rename .htaccess temporarily and test a minimal version.
- 03
Step 3
Disable plugins and the theme in groups to isolate the conflict.
- 04
Step 4
Fix the cause, regenerate the permalinks and restore the expected permissions.
check that every old URL answers with a 200 or redirects correctly.
Validate the resolution
Walk through the journey that was failing, then check the admin, the editor, the media library, the forms and user login. Clear the caches (plugin, server and CDN) before you conclude, or an old version can hide the result.
Validation checks
Watch the PHP log for a few days: some errors only surface when a scheduled task (WP-Cron) or a nightly backup runs.
Prevent a recurrence
Prevention has to answer the cause you identified. For a WordPress 500 error, the first measure is âValidate .htaccess before deployingâ; note too the signal that would have shown the incident sooner, and who is responsible for watching for it.
Validate .htaccess before deploying
Centralise the PHP logs
Monitor memory
Apply consistent permissions
Apply updates on a staging copy, or failing that after a verified backup, one plugin at a time. Checking the key pages after each update catches most regressions before visitors do.
Frequently asked questions about a WordPress 500 error
Where do you find the server error log?
It is usually reachable from the hosting panel (cPanel's Errors or Logs section, for instance) or in a logs folder on the account. Look for the exact timestamp of the request that failed to read the matching line.
Can renaming .htaccess break the site?
Permalinks may return 404s for a while, but the site itself is not damaged. Saving the permalink settings again recreates a default file. Keep the old file so you can put the useful rules back.
Why does the 500 error only appear at certain times?
An intermittent error often points to a resource limit reached during traffic peaks, or during a heavy scheduled task such as a backup or an import. Line the error times up with the cron jobs and the traffic peaks.
How do you check the fix will hold?
Check that every old URL returns 200 or redirects properly. Test the admin, the media library and the forms. Watch for 500 errors during traffic peaks. Then watch the logs, the alerts and the relevant metrics for several days.
How to resolve it
If a WordPress 500 error persists after these steps, we can pick the diagnosis up again from your logs and your access details, without acting blind on the site.
Get a diagnosisSummary with an AI
Choose your assistant: the request is prefilled where that is possible, and always copied, ready to paste if need be.

































đȘ