How to Fix the WordPress 500 Internal Server Error

Few things rattle a site owner quite like loading their website and getting a blank page that just says “500 Internal Server Error.” Your content looks gone. Your dashboard might be locked out. And the message itself tells you next to nothing about what actually broke. Here is the reassuring part though: this error is almost always fixable, and nine times out of ten you can sort it yourself in a few minutes once you know where to look.
I have lost an afternoon or two to this exact screen, so this guide is the checklist I wish I had back then. I will cover what the 500 Internal Server Error really means, why it keeps showing up on WordPress sites in 2026, and how to fix it with a calm, tested process you can follow top to bottom. I have also added the newer culprits that did not even exist when this error first became common, things like PHP 8 incompatibilities, aggressive security firewall rules, and the tight resource caps on managed hosting.
A large share of 500 errors trace back to poorly coded themes, so building on a solid foundation prevents many of them before they start. If you design your site with a WordPress theme builder like TemplateToaster, begin from a polished free WordPress theme, or follow our tutorial to create a WordPress theme from scratch, you produce clean, standards friendly code that is far less likely to trigger the fatal errors behind a 500 page.
TL;DR: The 500 Internal Server Error is a generic server side error, not a problem with your device, and your data is almost never lost. Back up your site first, then switch on debugging in
wp-config.phpto find the real cause. The usual culprits are a corrupted.htaccessfile, a low PHP memory limit, a faulty plugin or theme, an incompatible PHP version, or damaged core files. Work through the fixes one at a time and test after each. If nothing works, the problem is at the server level and your host can help.
Table of Contents
- What Is the 500 Internal Server Error?
- Why the 500 Error Happens on WordPress
- Before You Start: Back Up Your Website
- Step 1: Clear Your Browser Cache and Reload
- Step 2: Enable Debugging and Read the Error Log
- Step 3: Fix a Corrupted .htaccess File
- Step 4: Increase the PHP Memory Limit
- Step 5: Deactivate All Plugins
- Step 6: Switch to a Default Theme
- Step 7: Check Your PHP Version (A Modern Cause)
- Step 8: Reinstall Corrupted Core Files
- Step 9: Correct File and Folder Permissions
- Step 10: Raise Execution Limits and Timeouts
- Step 11: Look for Security Firewall and Server Rules (A Modern Cause)
- Step 12: Rule Out Caching and Object Cache Conflicts (A Modern Cause)
- Step 13: Contact Your Hosting Provider
- How to Prevent the 500 Error in the Future
- Conclusion
- Frequently Asked Questions
What Is the 500 Internal Server Error?
The 500 Internal Server Error is a generic HTTP status code the web server throws when something goes wrong on its end but it cannot pin down a more specific reason. Think of it as the server shrugging and saying, “I hit a problem, but I have no idea how to describe it.” Since it is a catch all response, the message never names the real cause. That vagueness is exactly what makes it so maddening.
One thing worth getting straight early: this is a server side error, not a problem with your browser or your internet. Your request reached the server fine. The server just could not finish the job. So it is a different beast from a 404 not found error, which means the page does not exist, and different again from the 503 service unavailable error, which usually points to temporary overload or maintenance.
Depending on your browser, server software, and content delivery network, the same underlying problem can appear under several different labels. You may see any of the following:
- 500 Internal Server Error
- HTTP Error 500
- Temporary Error (500)
- Internal Server Error
- The website cannot display the page (HTTP 500)
- That is an error
- Is currently unable to handle this request (HTTP ERROR 500)
All of these point to the same family of issues. The wording changes, but the cause and the cure stay the same.
Why the 500 Error Happens on WordPress
WordPress runs on PHP and talks to a database, sitting on top of a web server such as Apache or Nginx. A 500 error appears when any link in that chain breaks during execution. The most frequent triggers are a corrupted configuration file, a plugin or theme conflict, an exhausted PHP memory limit, an incompatible PHP version, or damaged core files. Server level factors such as strict security rules and tight resource caps on shared hosting can produce the same result.
Here is the full list of causes I will work through, including the modern ones:
- A corrupted
.htaccessfile - An exhausted PHP memory limit
- A faulty or incompatible plugin
- A broken or incompatible theme
- Corrupted WordPress core files
- An incompatible PHP version, especially PHP 8.0 and above
- Incorrect file and folder permissions
- Server timeouts and low execution limits
- Security firewall and mod_security rules
- CDN, caching, or object cache conflicts
The trick is to be a detective, not a bull in a china shop. Rule out one cause at a time, in order, and check the site after each step. Resist the urge to change five things at once, because then you will never know which fix actually worked. Right, let us get into it.
Before You Start: Back Up Your Website
Before you touch any file or setting, create a full backup of your site, including files and the database. Troubleshooting involves editing core configuration files, and a backup gives you a safe point to return to if anything goes sideways. If your dashboard still loads, a tool from our roundup of the best WordPress backup plugins can do this in one click. If the dashboard is unreachable, copy your files over FTP and export the database through phpMyAdmin in your hosting control panel.
You will also need a way to access your files directly. Install one of the best FTP clients for WordPress users, or use the File Manager inside your hosting cPanel. Both let you edit and rename files even when the WordPress admin area is locked out.
Step 1: Clear Your Browser Cache and Reload
Start with the simplest check. Occasionally a cached error page keeps showing even after the underlying problem has cleared. Reload the page, then clear your browser cache and try a different browser or an incognito window. If you use a caching plugin or a CDN, purge those caches too. Our guide on how to clear cache in WordPress walks through every layer. If the error vanishes after a cache purge, you were looking at a stale page and the site is already healthy.
Step 2: Enable Debugging and Read the Error Log
Honestly, if you only do one thing from this whole guide, make it this one. Debugging turns a vague 500 into an exact message that names the file and the line at fault, which saves you from blindly poking around. WordPress has a built in debug mode you switch on inside wp-config.php, the configuration file sitting in your site root.
Open wp-config.php over FTP or File Manager and find the comment near the end that begins with the words “That is all, stop editing”. Just above that line, add the following:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload your site, then open the file wp-content/debug.log. It will record the fatal error, often something like “Allowed memory size exhausted” or “Uncaught Error” followed by a plugin or theme path. That message usually points you straight to the cause.
You can also check the server error log directly. In cPanel look for the “Errors” or “Metrics” section, or open the raw error_log file inside your site folder. Managed hosts such as the providers in our comparison of the best WordPress hosting providers surface these logs in a dedicated panel. Once you have read the log, remember to set WP_DEBUG back to false so visitors never see raw errors.
Step 3: Fix a Corrupted .htaccess File
If you are on an Apache server, a busted .htaccess file is one of the usual suspects, and in my experience it is the cause more often than people expect. This little hidden file controls rewrite rules, redirects, and permalinks, and one bad line in it is enough to bring the whole site down. Caching, security, and redirect plugins all like to scribble their own rules into it, which is usually where the trouble starts.
To test this, locate the .htaccess file in your site root. Make sure your FTP client or File Manager is set to show hidden files, since names that begin with a dot are hidden by default. Rename it to something like .htaccess_old, then reload your site.
If the error disappears, the file was the problem. Now regenerate a clean one. Log into your dashboard, go to Settings, then Permalinks, and click Save Changes without altering anything. WordPress writes a fresh, valid .htaccess file automatically. If you want to understand what each directive does, our complete WordPress .htaccess file guide breaks it down. A corrupted rewrite file is also a frequent reason behind broken permalinks, so the same fix often resolves both.
Step 4: Increase the PHP Memory Limit
WordPress, its plugins, and its themes all consume PHP memory while they run. When a process needs more memory than the server allows, PHP halts it and the server returns a 500 error. Memory heavy tasks like importing content, generating thumbnails, or running a page builder often trip this limit.
You can raise the limit in wp-config.php by adding this line above the “stop editing” comment:
define( 'WP_MEMORY_LIMIT', '256M' );
If that alone does not help, edit your php.ini file (or .user.ini on some hosts) and set memory_limit = 256M. On Apache you can also add php_value memory_limit 256M to .htaccess, though many modern hosts ignore that method. After saving, reload the site. If the error clears, a memory hungry plugin or theme was the culprit, and you should investigate which one in the next steps. Note that shared hosting caps the maximum you can request, so if 256M is refused you may need to contact your host or move to a stronger plan.
Step 5: Deactivate All Plugins
Plugins are far and away the most common trigger, especially right after an update or a fresh install. Did the error show up minutes after you updated something? Then this is almost certainly your problem. One plugin that clashes with another, with your theme, or with your PHP version is all it takes to crash the lot. Since plugins cause so much grief, our guide on how to install a WordPress plugin is worth bookmarking for safer habits down the line.
If you can still reach the dashboard, deactivate every plugin at once from the Plugins screen, then reload the site. If the error clears, reactivate the plugins one by one, checking the site after each, until the faulty one reveals itself.
If the dashboard is locked out, do the same thing over FTP. Open the wp-content folder and rename the plugins folder to plugins_old. This deactivates all plugins instantly. Reload your site. If it works, rename the folder back to plugins, then rename each individual plugin folder inside it one at a time to find the offender. When you identify the guilty plugin, delete it, replace it with an alternative, or report the bug to its developer. Plugin and theme conflicts are also covered in our overview of common WordPress problems and their solutions.
Step 6: Switch to a Default Theme
If plugins are not the cause, your active theme is the next suspect. A theme with a coding error, a leftover from an unfinished edit, or code that does not work with your PHP version can throw a 500 error.
The test is to switch to a default WordPress theme such as Twenty Twenty Four or Twenty Twenty Five. From the dashboard, go to Appearance, then Themes, and activate a default theme. Reload the site to see whether the error clears.
Without dashboard access, rename your active theme folder inside wp-content/themes over FTP. WordPress falls back to a default theme automatically as long as one is present. If renaming the theme fixes the site, the theme was at fault. Avoid editing parent theme files directly in future, and instead use a child theme so your changes survive updates and never break the parent. If you decide to remove the broken theme entirely, follow our steps on how to delete a WordPress theme cleanly.
Step 7: Check Your PHP Version (A Modern Cause)
This is a big one today, and it barely existed when the original version of this article was written. Hosts now flip sites onto PHP 8.0, 8.1, 8.2, and 8.3 by default, sometimes without much warning. Those versions are faster and safer, no argument there, but they also stripped out a pile of old functions and changed how others behave. Pair modern PHP with a plugin or theme that has not been touched in years and you get a fatal error, which shows up to you as a 500 page.
First, find out which version you run. Our guide on how to check your PHP version shows several methods. You can also see it under Tools, then Site Health, then Info in your dashboard.
If a recent PHP upgrade triggered the error, temporarily switch back to an earlier supported version through your hosting control panel, usually under a “Select PHP Version” or “MultiPHP Manager” tool. That should restore the site immediately. Treat this as a short term fix only, because old PHP versions stop receiving security updates. The proper solution is to update the offending plugin or theme to a version that supports modern PHP, or replace it. To learn what changes between versions and how to migrate safely, read our WordPress PHP upgrade guide and the primer on what PHP is. Keeping everything current is the long term answer, so see how to update WordPress properly.
Step 8: Reinstall Corrupted Core Files
If none of the above works, your WordPress core files may have become corrupted during a failed update, an interrupted upload, or a malware infection. The two folders that run the engine, wp-admin and wp-includes, can be replaced safely because they do not hold your content. Your posts live in the database, and your media, themes, and plugins live in wp-content.
Download a fresh copy of WordPress from WordPress.org and unzip it on your computer. Connect over FTP and upload only the new wp-admin and wp-includes folders, allowing them to overwrite the existing ones. Do not touch wp-content or wp-config.php. Reload your site afterward. This restores any damaged core file to its original state without erasing anything you created.
If you suspect the corruption came from a hack rather than a glitch, do not stop at reinstalling core files. Follow our process to remove malware from a WordPress website and, if you have lost access, learn how to get your WordPress admin back after being hacked.
Step 9: Correct File and Folder Permissions
Incorrect permissions can also produce a 500 error, particularly after migrating a site between servers or restoring from a backup. When files or folders carry permissions that the server considers unsafe, it refuses to execute them. The standard, secure values are 644 for files and 755 for folders, while wp-config.php can be tightened to 600 or 644.
You can set these through your FTP client by right clicking a folder and choosing “File Permissions,” then applying the value recursively. In cPanel File Manager, select the item and use the Permissions tool. Avoid ever setting anything to 777, which many old tutorials suggest, because it is a serious security risk and modern servers often reject it with the very error you are trying to fix.
Step 10: Raise Execution Limits and Timeouts
Long running operations such as large imports, backups, or bulk edits can exceed the maximum time PHP is allowed to run, producing a 500 or a related timeout error. If your log mentions “maximum execution time exceeded,” increasing the limit will help. Our walkthrough on how to increase max_execution_time in WordPress covers the exact edits.
Related resource ceilings cause similar symptoms during uploads. If you hit errors while adding media, see how to increase the PHP maximum upload size and the fix for the upload_max_filesize error. These tweaks address the resource exhaustion that often hides behind a generic 500 message.
Step 11: Look for Security Firewall and Server Rules (A Modern Cause)
Modern hosting stacks run security layers that did not used to be standard, and they are now a common and easily missed cause of intermittent 500 errors. A module called mod_security inspects requests and can block legitimate actions, such as saving a post or submitting a form, returning a 500 in the process. Cloud firewalls and services like Cloudflare or Sucuri can do the same when a rule is too aggressive.
If the error appears only on certain actions, like publishing a page or using a particular plugin feature, ask your host to check the mod_security log and whitelist the rule that is firing. If you route traffic through a CDN or a cloud firewall, temporarily pause it and test the site to confirm whether the proxy is responsible. Tuning these protections correctly, rather than disabling them, keeps your site both working and safe. For a stronger foundation overall, review the best WordPress security plugins and our checklist on hardening WordPress security.
Step 12: Rule Out Caching and Object Cache Conflicts (A Modern Cause)
Performance setups have grown more sophisticated, and they can occasionally break things. A stale page cache, a corrupted object cache backed by Redis or Memcached, or a misconfigured opcache can all surface as a 500 error after an update. If you recently changed a caching plugin or your host enabled object caching, clear every cache layer and, if needed, temporarily disable the caching plugin to test. Choosing a reliable tool from the best WordPress cache plugins reduces the chance of these conflicts returning.
Step 13: Contact Your Hosting Provider
If you have worked through every step and the site still fails, the cause likely sits at the server level where you have limited visibility. This includes exhausted account resources on shared hosting, a misconfigured server, database server trouble, or PHP settings you cannot override. Your host can read the full server logs, check resource usage, and often spot the issue in minutes.
Reach out through live chat or a support ticket, explain that you receive a 500 Internal Server Error, and list everything you have already tried. That context saves time and helps them go straight to the root cause. If a 500 error keeps recurring because your plan cannot handle your traffic, it may be time to compare the best WordPress hosting providers and move to a plan with more headroom.
How to Prevent the 500 Error in the Future
Fixing the error is one thing. Stopping it from coming back is better. A few habits keep your site stable:
- Use a staging site. Test every update, plugin, and theme change on a copy before touching your live site. Our guide on how to set up a WordPress staging site shows how.
- Keep automatic backups running. With a current backup you can roll back instantly instead of debugging under pressure.
- Update carefully and regularly. Outdated code is the most common trigger. Update core, themes, and plugins, but do it on staging first.
- Stay on a supported PHP version and confirm your plugins and theme support it.
- Choose quality hosting with adequate memory and execution limits so resource caps do not bite.
- Build on solid foundations. A cleanly coded theme made with a tool like TemplateToaster avoids the messy markup and outdated functions that often cause conflicts.
For more on diagnosing the wider family of WordPress issues, our roundups of the WordPress errors that frustrate users most and the 5 causes of the WordPress white screen of death are useful companions, since those problems share many of the same fixes covered here.
Conclusion
The 500 Internal Server Error looks scary, but it is rarely permanent and it almost never means your data is gone. All it really says is that something tripped up a request and the server could not tell you what. Back up first, switch on debug logging, then work down the list: .htaccess, memory limits, plugins, themes, core files, PHP version, permissions, timeouts, security rules, and caching. Somewhere in there, you will find the culprit.
The whole point is patience. Change one thing, test, move on. Do that and you will not just clear the error, you will actually understand what caused it, which is the part that stops it coming back. Add in a staging site, regular backups, current software, and hosting that does not cut corners, and the 500 error turns into the odd rare hiccup instead of a recurring nightmare.
Frequently Asked Questions
What does the 500 Internal Server Error mean in WordPress? It is a generic server side error that appears when the web server encounters a problem it cannot describe more specifically. On WordPress it usually traces back to a corrupted .htaccess file, an exhausted PHP memory limit, a plugin or theme conflict, an incompatible PHP version, or damaged core files.
Is the 500 error caused by my computer or the website? It is caused by the website server, not your device or browser. The request reached the server successfully, but the server failed to complete it. That said, a cached error page can linger, so clearing your browser cache is a sensible first check.
How do I fix the 500 error if I cannot access wp-admin? Use FTP or your hosting File Manager. Rename the .htaccess file, rename the plugins folder to deactivate all plugins, rename the active theme folder to fall back to a default theme, and check the wp-content/debug.log after enabling debugging in wp-config.php. One of these almost always restores access.
Can a PHP version update cause a 500 error? Yes. Newer PHP versions such as 8.0 and above remove older functions that some plugins and themes still use, which triggers a fatal error. Temporarily switching to an earlier supported PHP version in your hosting panel confirms the cause, after which you should update or replace the incompatible component.
Will I lose my content while fixing the 500 error? No, if you back up first and follow the steps correctly. Your posts and pages live in the database, and your media and customisations live in the wp-content folder. Reinstalling the wp-admin and wp-includes core folders does not touch any of that.
Why does the 500 error appear only when I save a post or submit a form? That pattern usually points to a server security rule such as mod_security blocking a specific request, or a resource limit being hit during that action. Ask your host to review the mod_security log and adjust the rule, and check your PHP memory and execution limits.
Build a Stunning Website in Minutes with TemplateToaster Website Builder
Create Your Own Website Now
I have this error for about 2 weeks and i can’t even login to do anything. I accidentally change the permalink and now even i try to go to the ftp and change the .htaccess file, this file can’t be found. please help.
Mostly it is hidden, just select “show hidden files” on your FTP client and it’ll appear.
Please mention the plugin for fixing errors automatically.
Thank you, this is the article I was looking for. Btw may I know what you use for your great and fast website? I’m also planning to create a simple website for my business, but I need a domain and hosting recommendation.