Quick answer: An HTTP 500 internal server error means the server failed to complete the request but will not say why. The three most common causes are a corrupted .htaccess file, a PHP memory limit that is too low, and a broken plugin or theme. Work through them in that order — regenerate .htaccess, raise memory, then isolate the plugin — and read the server error log to skip straight to the real cause.
What a 500 error is
HTTP 500 is the web server’s way of saying “something went wrong and I could not finish.” It is deliberately vague because the server does not expose its internal errors to visitors. On a WordPress site the cause is usually one of a small set of things: a bad server configuration file, a resource limit, or broken code. The error looks alarming but the causes are well-understood and the fixes are reversible.
A 500 is closely related to the “critical error” message and they share some causes, but there is a useful distinction: a 500 is often a server-level failure — the .htaccess file or server config — that stops WordPress before it even runs. A critical error is WordPress running and then hitting a PHP fatal. If you see a plain server-styled “500 Internal Server Error” page rather than the WordPress-styled critical error message, start with .htaccess.
Read the error log first
You can guess, or you can look. Every server keeps an error log, and a 500 writes a line to it explaining what failed. Find it in your hosting panel — cPanel has “Errors” or a “Metrics → Errors” section, hPanel and most managed hosts expose one too. The most recent entry, timestamped to when you triggered the 500, usually names the file or limit involved and turns the rest of this guide into a single targeted step.
Also enable the WordPress debug log if the page is WordPress-generated — add to wp-config.php above the “stop editing” line:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Back up first
.htaccess and wp-config.php before editing them. These files can cause their own 500 if mistyped, so keep restorable copies. If you can, back up the whole site before starting.Step 1: Regenerate the .htaccess file
A corrupted or conflicting .htaccess is the most common cause of a sudden 500, especially after a plugin change or a botched edit. Testing it is quick and safe:
- Open your site root in the host’s file manager or FTP.
- Rename
.htaccessto.htaccess-old. - Reload the site.
If the site comes back, the old .htaccess was the problem. Regenerate a clean one: log in to WordPress, go to Settings → Permalinks, and click Save Changes without changing anything. WordPress writes a fresh, correct .htaccess. Your links work again and the corrupt directives are gone.
If renaming it changed nothing, rename it back and move to Step 2.
Step 2: Raise the PHP memory limit
If the server ran out of memory mid-request, it returns a 500. Raise WordPress’s memory limit in wp-config.php, above the “stop editing” line:
define( 'WP_MEMORY_LIMIT', '256M' );
If that does not hold, the ceiling is set at the server level. Raise it in php.ini (memory_limit = 256M) or in your hosting panel’s PHP settings, or ask your host to. As with any memory fix, if usage climbs without limit the real problem is a plugin leaking memory — raise the ceiling once, but if you have to keep raising it, find the plugin.
Step 3: Isolate a plugin or theme
If the server is fine and .htaccess is clean, broken code is the likely cause. Deactivate all plugins — from the admin if you can reach it, or by renaming wp-content/plugins to plugins-off over FTP if you cannot. If the 500 clears, reactivate plugins one at a time until it returns; the last one is the cause.
If plugins are not it, test the theme: switch to a default theme like Twenty Twenty-Four, or rename your theme’s folder over FTP so WordPress falls back to a default. If that fixes it, the fault is in your theme or code you added to it.
Step 4: Re-upload core files
If nothing above works, a WordPress core file may be corrupted — from an interrupted update or a failed transfer. Download a fresh copy of WordPress, and upload just the wp-admin and wp-includes folders over the top of your existing ones. These folders contain no content, so replacing them is safe and often repairs a stubborn 500.
Rollback
Remove the debug lines from wp-config.php and delete wp-content/debug.log when done. Any file you renamed to test can be renamed back or, in the case of a corrupt .htaccess, left replaced by the freshly generated one. Restore any backup if an edit caused a new problem.
Frequently asked questions
What is the difference between a 500 error and a 503 error?
A 500 means the server hit an internal failure it could not recover from. A 503 means the server is temporarily unavailable — usually during maintenance, an update, or an overload — and is expected to return shortly. A 503 that will not clear is often a stuck maintenance mode or an overloaded server, which is a different fix.
The 500 only happens sometimes. Why?
An intermittent 500 usually means a resource limit under load — memory or execution time — that only overflows when traffic or a heavy request pushes it over. Raising the limits helps, but a genuinely undersized hosting plan will keep hitting them until you give it more headroom.
Can a 500 error hurt my SEO?
A brief 500 that you fix quickly does no lasting harm — search engines retry. A 500 that persists for days will see pages drop from the index, because crawlers treat a long outage as the page being gone. Fixing it promptly is what matters.
