WordPress 500 Internal Server Error
What Is This Error?
The WordPress 500 Internal Server Error is one of the most frustrating messages a site owner can encounter — it tells you something broke on the server, but offers absolutely no clue about what. Your visitors either see a blank white screen or a generic browser error page, and in many cases your wp-admin dashboard is completely unreachable too.
Unlike a 404 (missing page) or a 403 (access denied), a 500 error is a server-side catch-all. WordPress or your web server hit a condition it couldn’t handle, threw up its hands, and returned this generic code. It could be one tiny misconfiguration or a cascading plugin conflict — the error message itself won’t tell you which.
The good news is that this error almost always has one of a handful of common causes, and you can track it down systematically — no deep coding knowledge required. Think of it like a fire alarm with no smoke detector: you check each room one by one until you find what’s burning.
Get free WordPress & AI tips
Join 500+ readers. No spam, unsubscribe anytime.
Why Does This Happen?
- Corrupted or invalid .htaccess file: This file tells your server how to handle URL routing. A single malformed line — often introduced by a plugin — can bring the entire site down instantly.
- A broken or conflicting plugin: Plugins execute PHP code on every page load. A buggy update, a newly incompatible plugin pair, or a fatal PHP error inside a plugin will trigger a 500 before WordPress even finishes loading.
- PHP memory limit exhausted: WordPress and its plugins need a pool of PHP memory to run. When a script exceeds that limit, the server kills it mid-execution and returns a 500 rather than a partial page.
- A corrupted or incompatible theme: Your active theme’s
functions.phpis loaded on every single request. Syntax errors or calls to missing functions inside it crash the site just as effectively as any plugin. - Server-level PHP version mismatch: If your host upgraded their PHP version without warning, older plugins or themes built for PHP 7.x can throw fatal errors when running on PHP 8.x, producing a 500 with no clear message.
How to Fix It — Step by Step
- Regenerate your .htaccess file
Log into your hosting file manager or FTP client and navigate to your WordPress root folder. Rename.htaccessto.htaccess_old— do not delete it. Then, if your dashboard is accessible, go to Settings → Permalinks and click Save Changes. WordPress will write a clean .htaccess automatically.You should see: Your site loads normally. If it does, the old .htaccess file was corrupted. You can safely delete .htaccess_old.
- Deactivate all plugins at once
Via FTP or file manager, go towp-content/plugins/and rename the entirepluginsfolder toplugins_disabled. WordPress will auto-deactivate everything because the folder no longer exists.You should see: The site loads (likely with a stripped-down look). That confirms a plugin is the culprit. Rename the folder back to
plugins, then reactivate plugins one at a time — testing after each — until the 500 returns and reveals the bad actor. - Switch to a default WordPress theme
Inwp-content/themes/, rename your active theme’s folder (e.g.,my-theme→my-theme_old). WordPress will fall back to the most recent default theme it can find, such as Twenty Twenty-Four.You should see: If the site loads cleanly, your theme’s code is the problem. Restore the folder name, then inspect the theme’s
functions.phpfor recent edits or contact the theme developer. - Increase the PHP memory limit
Openwp-config.phpand add the following line directly above the/* That's all, stop editing! */comment:define('WP_MEMORY_LIMIT', '256M');You should see: The site loads if memory exhaustion was the root cause. If your host caps memory below 256M, you’ll need to contact them to raise the server-level limit.
- Enable debug mode and read the error log
Inwp-config.php, add these three lines:define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);Then check
/wp-content/debug.logfor the actual PHP error. Your host’serror_logfile in the root directory is another place to look.You should see: A specific error message naming the exact file and line number that caused the crash — this eliminates all guesswork and points you straight to the fix.
Common Mistakes When Fixing This
- Deleting .htaccess instead of renaming it: If your plugins rely on custom rewrite rules, simply deleting the file and regenerating it from Permalinks can wipe those rules and break other features. Always rename first so you have a backup to reference.
- Re-enabling all plugins at once after the folder rename: People rename the folder back and reactivate everything in bulk, then wonder why the 500 is back. You must reactivate plugins one by one, testing your site after each click, or you’ll never isolate which one is guilty.
- Setting an unrealistically high memory limit: Adding
define('WP_MEMORY_LIMIT', '1024M')won’t work if your hosting plan hard-caps PHP memory at 256M. WordPress can only request up to what the server allows — check your host’s documentation or open a support ticket for the real ceiling. - Skipping the error log entirely: Most people spend an hour clicking around when
debug.logalready contains the exact filename, function, and line number of the crash. If you have server access, always check the log first — it’s the single fastest path to a resolution.
Frequently Asked Questions
Will I lose my posts, pages, or media when fixing a 500 error?
No. A 500 Internal Server Error is a runtime crash — it has no effect on your database or file uploads. Your content, settings, and media files are completely untouched. You’re only modifying configuration files and plugin states, not the data itself.
My wp-admin dashboard is also broken. How do I make changes without logging in?
Use your hosting control panel’s built-in file manager (available in cPanel, Plesk, or most managed hosts) or connect via FTP using a client like FileZilla. Every step in this guide — renaming .htaccess, disabling plugins, editing wp-config.php — can be done directly on the server without needing WordPress admin access.
The 500 error only appears on specific pages, not the whole site. What does that mean?
A page-specific 500 usually points to a shortcode, Gutenberg block, or widget from a particular plugin that only runs on that page. Open that page in the editor and remove blocks or shortcodes one at a time while testing. Your debug.log will also show a repeating error tied to requests for that specific URL, which narrows it down fast.
Should I contact my web host about this error?
Yes, especially if none of these steps resolve it. Your host has access to server-level Apache or Nginx error logs that go deeper than what WordPress can expose. Issues like a PHP version upgrade, a mod_security rule blocking a request, or a server misconfiguration can only be diagnosed and fixed at that level. Most hosts are happy to check the logs on your behalf if you open a support ticket.
