You open your website and instead of your homepage you see a blank page that says "500 Internal Server Error" or "There has been a critical error on this website." No explanation, no clue what broke, and your visitors see the same thing.
This is the most confusing error in WordPress, because the message tells you nothing. But it is also one of the most fixable. A 500 error almost always has one specific cause, and the fixes below are ordered from most likely to least likely, so most people find the problem within the first three steps. Work through them in order and do not skip ahead.
The quick answer
A WordPress 500 Internal Server Error is usually caused by a corrupt .htaccess file, a faulty plugin, a broken theme, a PHP memory limit that is too low, or damaged core files. Start by renaming .htaccess to .htaccess_old and reloading your site. If that does not work, deactivate all plugins by renaming the wp-content/plugins folder, then raise the PHP memory limit to 256M in wp-config.php. One of those three steps fixes the error for most sites. If none of them work, turn on WordPress debug logging to see the exact error, then contact your host.
What is a 500 Internal Server Error?
The 500 in the message is an HTTP status code. When your browser asks your server for a page, the server replies with a status code. 200 means "here is the page." 404 means "that page does not exist." 500 means "something went wrong on my side, and I cannot tell you what."
It is a catch-all. The server hit a problem it could not describe, so it sends the generic 500 code instead of a useful message. That is why the error feels so unhelpful: the vagueness is built into the code itself.
The good news is that your content is almost certainly still there. A 500 error means the server could not run the code that builds your pages. Your posts, pages, images, and settings live in the database and your files, and they are untouched by the error itself. Fix the code problem and everything comes back.
What does your 500 error look like?
The same error shows up in three different ways, and which one you see is your first clue about the cause.
| What you see | What it usually means | Start here |
|---|---|---|
| A plain page saying "Internal Server Error", sometimes with "Apache" at the bottom | The web server failed before WordPress even started, often a bad .htaccess file | Fix 2: .htaccess |
| "There has been a critical error on this website" | WordPress started but hit a fatal PHP error, usually a plugin, theme, or memory problem | Fix 4: plugins |
| Chrome says "This page isn't working" with "HTTP ERROR 500" | The server sent an empty error, often a mistake in wp-config.php or a missing core file | Fix 1: error log |
If your page says "Error establishing a database connection" instead, that is a different error with its own fix: your database username, password, or server details in wp-config.php are wrong, or the database server is down. The steps below will not fix that one.
Also check whether the error is on every page or just one. If only your homepage fails but wp-admin works, start with the theme test in Fix 5. If the whole site fails including wp-admin, work through the fixes in order.
Before you start: back up first
Every fix below changes files on your site. Before you touch anything, make a backup if you possibly can.
If you can still reach wp-admin, use a backup plugin to download a full backup of your files and database. If you cannot reach wp-admin, use your host's File Manager or an FTP app to download a copy of your wp-content folder and wp-config.php, and use phpMyAdmin in your hosting control panel to export the database.
If you have no backup at all and cannot make one, at least write down every change you make, and rename files instead of deleting them. Every step below uses renaming for exactly this reason: renaming is reversible, deleting is not.
You will need one of two tools for most of these fixes: your host's File Manager (in cPanel, Site Tools, hPanel, or whichever control panel your host uses) or an FTP app such as FileZilla. Both do the same job. File Manager is easier if you have never used FTP, because there is nothing to install. You will also want to know your host's support contact, because the last fix is asking them for help.
Fix 1: Find the real error in the log
The single most valuable step, and the one most people skip, is reading the error log. A 500 error hides the cause from visitors, but the server usually writes the real error to a log file, often naming the exact file and line number that failed. Five minutes here can save an hour of guessing.
First, look in your hosting control panel for a section called Error Log, Logs, or Metrics. On cPanel hosts it is under Metrics, then Errors. Open it and look at the most recent entries from the time your site broke. A line mentioning a plugin file, a PHP fatal error, or "Allowed memory size exhausted" points straight at the cause.
If your host's log is empty or unhelpful, turn on WordPress's own debug logging. Open wp-config.php in File Manager or FTP, find the line that says `/* That's all, stop editing! Happy publishing. */`, and add these three lines just above it:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Save the file, reload your site once so the error happens again, then open wp-content/debug.log. The newest lines at the bottom name the file and line that caused the fatal error. The name is usually a plugin or theme folder, which tells you exactly where to look next.
Two warnings about debug mode. First, WP_DEBUG_DISPLAY is set to false on purpose: it keeps errors out of your visitors' browsers, where they could expose file paths. Never set it to true on a live site. Second, turn debug logging off again once you have fixed the problem, by changing WP_DEBUG back to false, and delete debug.log afterwards. The log file can grow large and can contain sensitive paths.
Fix 2: Regenerate a corrupt .htaccess file
This is the most common single cause of a 500 error on Apache and LiteSpeed hosts, and it takes about two minutes to test.
The .htaccess file is a small server configuration file in your main WordPress folder, next to wp-config.php. WordPress uses it to make your pretty permalinks work. If it contains a line the server does not understand, the server refuses to load anything at all, and every page, including wp-admin, shows a 500 error.
Common ways it gets corrupted: a plugin or a security tool writes a bad rule into it, a line such as `php_value memory_limit 256M` is added by a tutorial (that directive does not work on hosts running PHP-FPM and breaks the whole file), or the file is cut off halfway during a failed save.
Here is how to test it:
- Open File Manager or FTP and go to the folder that contains wp-config.php.
- Turn on the setting that shows hidden files, because .htaccess starts with a dot and is hidden by default.
- Rename .htaccess to .htaccess_old.
- Reload your site. If the homepage loads, the old file was the cause. If it still shows the 500 error, rename the file back to .htaccess and move on to the next fix.
- If renaming fixed it, log in to wp-admin, open Settings, then Permalinks, and click Save Changes without changing anything. WordPress writes a fresh, clean .htaccess file for you.
If your host runs Nginx instead of Apache, there is no .htaccess file at all, so skip this fix entirely. Your host's documentation or support team can tell you which server software you are on, and most shared hosts use Apache or LiteSpeed.
Fix 3: Raise the PHP memory limit
WordPress asks PHP for 40 MB of memory on a single site by default. That is enough for a basic site, but a site with many plugins, a heavy page builder, or a large media library can run out of memory while building a page. When it does, PHP stops with a fatal error and the server returns a 500.
The error log from Fix 1 will often say this directly: "Allowed memory size of 41943040 bytes exhausted." If you see that line, this is your fix.
Open wp-config.php and add this line just above `/* That's all, stop editing! Happy publishing. */`:
define( 'WP_MEMORY_LIMIT', '256M' );
Save the file and reload your site. 256 MB is a safe value for most shared hosting accounts. Do not set it above what your hosting plan allows; if your plan only gives you 128 MB, asking for 512 MB will not help and the host will still cap it.
If you cannot edit wp-config.php, some hosts let you raise the limit in the control panel under PHP settings or a MultiPHP INI Editor. If neither option exists, ask your host's support team to raise it for you.
Raising the memory limit is sometimes a bandage rather than a cure. If your site needs more than 256 MB just to load a normal page, one plugin is probably using far more memory than it should, and Fix 4 will find it.
Fix 4: Deactivate all plugins
A faulty plugin is the most common cause of the "critical error" version of the 500 message. It usually happens right after installing a new plugin, updating one, or updating WordPress itself to a version a plugin does not support yet.
If you can reach wp-admin, go to Plugins, then Installed Plugins, select all of them, choose Deactivate from the bulk actions menu, and click Apply. Reload your site. If it loads, a plugin was the cause.
If you cannot reach wp-admin, you can do the same thing from File Manager or FTP:
- Open wp-content and rename the plugins folder to plugins.hold.
- Reload your site. WordPress loads with every plugin switched off, and if the site comes back, you have confirmed a plugin is at fault.
- Rename the folder back to plugins. WordPress keeps every plugin deactivated.
- Now reactivate plugins one at a time from wp-admin, reloading your site after each one. When the 500 error returns, the last plugin you activated is the culprit. Leave it deactivated and look for an update or a replacement.
Start with the plugin you most recently installed or updated, since that is the likeliest suspect. Page builders, security plugins, and caching plugins are the usual offenders, because they run on every page load. If the plugin is essential to your site, check whether the developer has released an update that fixes the problem before you replace it.
Fix 5: Switch to a default WordPress theme
If plugins are not the problem, the next suspect is your theme. A theme with a coding error, or a theme that has not been updated for your WordPress version, can produce a fatal error on every page.
If you can reach wp-admin, go to Appearance, then Themes, and activate one of the default WordPress themes, such as Twenty Twenty-Five. Reload your site. If it loads, your theme is the problem.
If you cannot reach wp-admin, rename your active theme's folder in wp-content/themes. WordPress cannot find the theme, so it falls back to a default theme automatically. If the site loads, the theme was at fault.
When the theme is the cause, check for an update from the theme developer first. If there is no update, or the update does not fix it, switch to a different theme or contact the developer with the error from your debug log. Do not edit the theme's files yourself to fix a fatal error unless you know PHP: a wrong edit can make the problem worse.
Fix 6: Check file permissions
Incorrect file permissions can also cause a 500 error, usually after a migration to a new host, a restore from backup, or a server change. WordPress recommends 755 for folders and 644 for files, and 400 or 440 for wp-config.php.
In File Manager, right-click a folder and check its permissions. If your folders are set to 777 or your files to 666, some servers refuse to run them for security reasons and return a 500 instead. Change folders to 755 and files to 644, starting with the main WordPress folder and wp-content.
Be careful with wp-config.php: it should be 400 or 440, which means readable but not writable. If you set it to 644 and your host is strict, that alone can trigger the error.
If you are not sure what the permissions currently are, your host's support team can check and reset them for you in a minute. This is a quick fix for them and a common request.
Fix 7: Re-upload the WordPress core files
If none of the above worked, your WordPress core files themselves may be damaged. This happens after a failed automatic update, a bad migration, or, more rarely, a hacked site where core files were modified.
Download a fresh copy of WordPress from wordpress.org. Unzip it on your computer, then upload only the wp-admin and wp-includes folders to your site by FTP, overwriting the existing ones. Do not upload the wp-content folder from the fresh download: it would overwrite your themes, plugins, and uploads. Do not overwrite wp-config.php either.
Reload your site. If it loads, a damaged core file was the cause. Run a full scan with a security plugin afterwards, since modified core files are also a sign of a hacked site.
Fix 8: Check your PHP version and contact your host
WordPress 7.1 needs PHP 8.2 or newer, and recommends PHP 8.3. If your host is still running PHP 7.4 or 8.0, a plugin or theme update that uses newer PHP features will crash with a 500 error.
Check your PHP version in wp-admin under Tools, then Site Health, then the Info tab, or in your hosting control panel under PHP settings. If it is below 8.2, update it in the control panel. Update one version at a time and test your site after each step, because jumping several versions at once can break old plugins.
If you have worked through every fix above and the site still shows a 500 error, it is time to contact your host. This is not giving up: some causes live on the server side, where you cannot reach them. A server misconfiguration, an exhausted server resource, or a problem with the PHP handler on your account can only be fixed by the host.
When you contact support, give them three things: when the error started, what you already tried (in order), and the last lines of your error log or debug.log. That saves a round of back-and-forth and usually gets you a real answer on the first reply. Good hosts can also tell you the exact error from their own server logs, which you may not be able to see.
Mistakes that make a 500 error worse
- Editing files without a backup. Every fix here changes a file. One wrong character in wp-config.php or .htaccess can turn a 500 error into a completely blank site. Back up first, and rename instead of deleting.
- Changing several things at once. If you rename .htaccess, deactivate plugins, and raise the memory limit in one go, and the site comes back, you will never know which one fixed it. Change one thing, test, then move on.
- Displaying errors on a live site. Setting WP_DEBUG_DISPLAY to true shows file paths and server details to anyone who triggers an error. Always log to a file instead.
- Setting the memory limit too high. Asking for 1 GB on a shared plan that allows 256 MB does nothing except hide the real problem, which is usually a plugin using too much memory.
- Deleting the plugins folder instead of renaming it. Renaming deactivates everything safely. Deleting removes your plugins and their settings.
- Ignoring the error after a quick fix. If renaming .htaccess fixed it, find out what corrupted the file. If a plugin caused it, update or replace the plugin. The same error will come back otherwise.
Frequently asked questions
Will a 500 error hurt my Google rankings?
A short outage of a few hours will not. Google understands that sites go down sometimes. But if the error lasts for days, Google may temporarily drop your pages from search results until it can crawl them again. Fix it promptly, and your rankings should recover on their own once Google recrawls the site. Keeping your WordPress SEO basics in order helps Google re-index your pages quickly once the site is back.
How long does it take to fix a 500 error?
Most 500 errors are fixed in under an hour once you start working through the steps in order. The .htaccess test takes two minutes, the plugin test takes about fifteen, and the memory limit fix takes five. The cases that take longer are the ones where the error log is empty and the cause has to be found by elimination.
Is a 500 error the same as the white screen of death?
They are closely related. The white screen of death is usually a 500 error that produces a blank page instead of an error message, and it has the same causes: a bad plugin, a broken theme, or not enough memory. The fixes in this guide work for both.
Can a 500 error mean my site was hacked?
It can, but it is rarely the first explanation. Check the timing: if the error appeared right after you installed or updated something, that is almost certainly the cause. If it appeared out of nowhere with no changes on your side, look at your error log for unfamiliar file names, and check whether any core files were modified. A security plugin scan will settle the question.
Why does the error come back after I fix it?
Because the underlying cause was not removed. A plugin that was deactivated but not updated will break the site again the moment it is reactivated. A memory limit that was raised will be hit again if a plugin keeps growing. A .htaccess file that was regenerated will be corrupted again if the plugin that wrote the bad rule is still active. Fix the cause, not just the symptom.
Should I just restore a backup instead?
If you have a recent backup from before the error started, restoring it is a legitimate fix, and it is often the fastest one. Restore the backup, then figure out what changed between the backup and the error so it does not happen again. Restoring is not a substitute for finding the cause, but it gets your site back online while you investigate.
What to do after your site is back
Once the 500 error is gone, do three things before you move on. First, turn off debug logging and delete debug.log. Second, check that your backup system is working, because the next problem will be easier if you have a recent backup to restore from. Third, write down what caused the error and what fixed it, somewhere you will find it next time. The same error rarely strikes twice in exactly the same way, but the fix you used this time is the first thing to try if it does.
And if the cause turned out to be a plugin or a theme that is no longer maintained, replace it now while the lesson is fresh. A plugin that broke your site once will break it again at the next WordPress update.