How to Fix the 500 Internal Server Error in WordPress: 7 Proven Ways

How to Fix the 500 Internal Server Error in WordPress: 7 Proven Ways

How to Fix the 500 Internal Server Error in WordPress: 7 Proven Ways

You open your website and instead of your homepage you get a short, blunt message: “500 Internal Server Error.” No explanation, no hint about what broke — just a number and a dead page. For a business site it is the worst kind of error: visitors see it, search engines see it, and it tells you nothing about the cause.

Here is the good news first: your content is almost certainly still there. A 500 error does not mean your posts, pages and products are deleted. It means the server tried to build the page and something stopped it — a bad configuration file, a plugin that crashed, a permission the server did not like. Fix the cause and everything comes back exactly as it was.

The seven fixes below find the cause and repair it, in order — work them top to bottom and stop the moment the site comes back. Most 500 errors are fixed by the first or second one, because most of them come down to one file: .htaccess.

What the 500 error actually is

HTTP 500 is the server’s generic “something went wrong on my side” response. When a visitor opens a WordPress page, the server runs PHP, which runs your theme and plugins and builds the HTML. If anything in that chain fails badly enough — a configuration file the server cannot parse, a PHP fatal error, a file the server is not allowed to read — the server gives up and returns a 500 instead of a page. And because the server deliberately hides the details (showing them would leak file paths and server information), you get the number and nothing else.

It is the same family as the white screen of death: both are usually a PHP fatal error with the message hidden. The difference is only what the server shows you. On some servers a fatal error produces a blank white page; on others it produces a “500 Internal Server Error” page. Same problem, different symptom. If you see a blank white page instead, the white-screen guide covers that case — the fixes overlap, but the starting point is different.

Seven things cause almost every WordPress 500 error:

  • A corrupt .htaccess file. The single most common cause. A bad line in .htaccess — from a plugin, a security rule, or a migration — makes the server reject every request before WordPress even runs.
  • A plugin conflict. A plugin that throws a fatal error, or two plugins that clash, can take the whole site down.
  • Memory exhaustion. The site runs out of the PHP memory it is allowed to use — common on sites with a page builder, WooCommerce, or a dozen active plugins.
  • A theme error. Usually a bad edit in functions.php, or a theme that is not compatible with your server’s PHP version.
  • Wrong file permissions. Files or folders the server cannot read — or is told not to execute — can produce a 500, especially after a migration or a host change.
  • Corrupt core files. An update that stopped halfway can leave WordPress core files truncated or missing.
  • A PHP version problem. A plugin that needs PHP 8 while the server still runs PHP 7.4, or a server-side limit the site has outgrown.

Notice what is not on the list: your content being deleted, your domain expiring, or your hosting account being cancelled — different problems with different symptoms. A 500 error is a code or configuration problem, and those have a fix.

Before you touch anything: three checks

Two minutes first — they change which fix you start with.

Back up first, even though the site is down. Download a copy of your files and export the database — or run a manual backup if the dashboard loads. You are about to rename files and edit configuration, and a backup is what turns a mistake into a five-minute restore instead of a disaster. If you have never taken a backup, do it now, before anything else.

Check what is actually broken. Open the homepage, then try wp-admin, then try a single post page. If the whole site shows 500, the problem is server-wide — start with fix 1. If only wp-admin shows 500 while the front end works, it is a plugin that only runs in the dashboard, or memory — start with fix 3. If only one page shows 500, it is something used only on that page — a shortcode, a block, or a template — and the plugin that provides it is the prime suspect.

Note what changed last, and check the host. A 500 that appeared right after a plugin update, a theme change, a migration, or a snippet pasted into a file is telling you where to look. The last change is the prime suspect until proven otherwise. While you are at it, check your host’s status page — if the host is having an outage or doing maintenance, nothing is wrong with your site at all, and the fix is to wait.

Fix 1: Rename the .htaccess file (the most common fix)

The .htaccess file sits in your site’s root folder and tells the server how to handle requests — permalinks, redirects, security rules. One bad line in it is enough to make the server return a 500 on every single page, before WordPress even loads. That is why this is fix 1: it is the most common cause, and the test takes thirty seconds.

Open your host’s file manager or an FTP client like FileZilla, go to the site root (the folder containing wp-config.php), and find .htaccess. If you cannot see it, turn on “show hidden files” — files starting with a dot are hidden by default. Rename it to .htaccess_old and reload the site.

If the site loads, .htaccess was the problem. Now regenerate a clean one: log in to the dashboard, go to Settings → Permalinks, and click Save Changes without changing anything. WordPress writes a fresh .htaccess with only the standard rules. Check the site again — if it still loads, you are done. Do not paste your old rules back in bulk; add them back one block at a time and test after each one, so you find the bad line instead of reintroducing it.

If the site still shows 500 after the rename, the file was not the problem. Rename it back to .htaccess and move to fix 2 — you have ruled out the most common cause in under a minute.

Fix 2: Raise the PHP memory limit

If the site is still down, it may simply be running out of memory. WordPress asks PHP for 40 MB on a single site (64 MB on multisite) by default — not much on a site with a page builder, WooCommerce, or a dozen active plugins. When PHP runs out, the server returns a 500.

Open wp-config.php in the root folder of your site — your host’s file manager or FTP — and add this line just above the comment “That’s all, stop editing! Happy publishing.”:

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

Save the file and reload the site. 256 MB is the sensible target for most sites. Two warnings: this only works up to the ceiling your host sets — if your host caps PHP memory at 128 MB at the server level, no setting in wp-config.php can go past it, and you will need to ask the host or upgrade the plan. And if only the admin area runs out of memory while the front end is fine, the matching constant is WP_MAX_MEMORY_LIMIT, which defaults to 256 MB and can be raised the same way.

Fix 3: Deactivate all plugins (the most common fix after .htaccess)

If the memory limit did not help, a plugin is the next most likely culprit. The test is simple: turn them all off and see if the site comes back.

If you can reach the dashboard, go to Plugins → Installed Plugins, select them all, choose Deactivate from Bulk Actions, and click Apply. Check the site. If it loads, the problem is one of your plugins. Reactivate them one at a time, checking the site after each one, until the 500 returns — the last plugin you switched on is the one. Leave it off, look for an update or a replacement, and check it is compatible with your WordPress and PHP versions before switching it on again.

If you cannot reach the dashboard, do the same thing with your host’s file manager or an FTP client: open wp-content, find the plugins folder, and rename it to plugins_old. That switches every plugin off at once. Check the site: if it loads, rename the folder back to plugins, then rename the individual plugin folders inside it one at a time to find the culprit. Note: plugins in the mu-plugins folder are not affected by this rename — if the site is still down, a must-use plugin or the theme is the problem, and fix 4 is next.

Fix 4: Switch to a default theme

If the plugins are not the problem, the theme is next. One bad line in a theme’s functions.php — a missing semicolon, a mismatched bracket, a function that no longer exists — is enough to kill every page on the site.

If you can reach the dashboard, go to Appearance → Themes and activate a default WordPress theme such as Twenty Twenty-Five. Check the site. If it loads, your theme is the problem. Do not edit the theme files unless you know exactly what the bad line is; contact the theme author with the error details, or roll the theme back to the previous version.

If you cannot reach the dashboard, rename your theme’s folder inside wp-content/themes (mytheme becomes mytheme_old) using the file manager or FTP. WordPress falls back to a default theme automatically. If the site loads, you have your answer. Rename the folder back only after the theme is fixed or replaced.

Fix 5: Check file and folder permissions

If the site is still down, the server may be refusing to read your files. Every file and folder on a WordPress site needs the right permissions: folders 755, files 644, and wp-config.php 600 or 644. Wrong permissions — usually after a migration, a restore, or a host change — can stop the server reading its own files, and the result is a 500.

Ready to Build, Fix, or Scale Your Website?

One Code Stream engineers high-speed, conversion-focused websites, custom web applications, and e-commerce solutions for global businesses. Let’s turn your vision into measurable digital growth.

In your host’s file manager or FTP client, check the permissions on the site root, wp-content, and wp-config.php. If folders show 777, or files show 000, or anything looks different from the standard numbers, fix them: set all folders to 755 and all files to 644, and wp-config.php to 600 or 644. Most file managers let you do this in bulk — select the folders, right-click, and set the permission, then do the same for files. Reload the site after each change so you know which one fixed it.

Two things to know: permissions of 777 (read, write and execute for everyone) are a security risk and some servers refuse to serve files with them — that alone can cause a 500. And if the permissions were correct all along, this fix costs you two minutes and rules out another cause.

Fix 6: Re-upload the WordPress core files

If the error log points at WordPress core, or if none of the fixes above worked, the core files themselves may be corrupt — usually after an update that stopped halfway, or a migration that skipped files.

Download a fresh copy of WordPress from wordpress.org, unzip it, and upload the wp-admin and wp-includes folders over the ones on your server. Do not touch wp-content (your themes, plugins and uploads) or wp-config.php. Then reload the site. If it loads, the core files were the problem, and the fresh copies fixed it.

One related check while you are in the file manager: look for a file called .maintenance in the site root. WordPress creates it during updates and deletes it when the update finishes. If an update failed, the file gets stuck and the site shows “Briefly unavailable for scheduled maintenance” instead of loading — deleting that one file brings the site straight back.

Fix 7: Check the PHP version and read the error log

If you are still guessing, stop. The server can tell you exactly what failed — you just have to look at the log.

First, check the PHP version. In the dashboard, go to Tools → Site Health → Info → Server and read the PHP version. WordPress needs PHP 7.4 at minimum and recommends 8.1 or newer. If the server is still on PHP 7.4 or older, a plugin that dropped support for it will crash the site — ask the host to move the site to PHP 8.1 or 8.2. (If you updated PHP recently and the 500 started right after, the reverse applies: a plugin or theme may not support the new version yet, and rolling back one PHP version while you update it is the safer move.)

Then read the error log. Turn on logging in wp-config.php, above the “That’s all, stop editing!” line:

define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );

Reload the broken page once, then open wp-content/debug.log — the last entries name the file and line that failed. The folder in that path is the diagnosis: wp-content/plugins/ means a plugin, wp-content/themes/ means a theme, wp-includes/ or wp-admin/ means core itself. A typical entry reads “PHP Fatal error: Allowed memory size of 41943040 bytes exhausted in /home/example/public_html/wp-content/plugins/acme-slider/includes/display.php on line 87” — the path tells you the Acme Slider plugin exhausted the memory, and fix 2 or fix 3 is the answer.

Two rules: keep WP_DEBUG_DISPLAY false so errors are logged but never shown to visitors, and remove all three lines once the site is fixed — debug mode left on a live site is a security problem, because the log can expose file paths and server details. If there is no debug.log at all, check the host’s error log in the control panel instead — most hosts keep one, and it records the same failures.

When none of that works

If all seven fixes fail, stop and restore from backup — that is what it is for. Restore the files and database from the most recent backup taken before the 500 appeared. If you have no backup, ask your host: most hosts keep server-level backups even when you do not, and a restore from their side takes minutes.

If the site comes back and immediately goes down again, or the error log shows injected code, unfamiliar files, or admin accounts you did not create, the site was probably hacked rather than broken — a malware cleanup job, not a settings fix. The hardening routine in our WordPress security hardening guide is where that work starts.

And if you would rather not touch server files at all, that is a reasonable choice too — renaming folders over FTP is not everyone’s idea of a good afternoon. Our WordPress development services cover exactly this: 500-error diagnosis and recovery, plus the maintenance that stops it happening again.

How to stop it happening again

A 500 error is almost always preventable:

  • Update one plugin at a time, and check the site after each one. Updating everything at once and then wondering which one broke the site is the most common way this happens.
  • Use staging for major updates. Update core and big plugins on a staging copy first, check the key pages, then push live. If your host offers staging, use it; if not, the manual backup is your safety net.
  • Keep PHP current. An old PHP version is a security risk and a compatibility problem — plugins drop support for it, and the rest can crash on it.
  • Run the monthly routine — backups, updates, a malware scan, a speed test and a form check, once a month, in that order. Our WordPress maintenance checklist is the version we run on client sites, and it takes about an hour.

Frequently asked questions

Is my content gone?

Almost certainly not. A 500 error means the server stopped before it could build the page — nothing is deleted. Your posts, pages, products and media are still in the database, and once the broken file, plugin or setting is fixed, everything comes back exactly as it was.

Why did it happen right after an update?

Because the update changed code or configuration. A plugin update can introduce a function that conflicts with another plugin, a theme update can clash with your PHP version, and a core update can rewrite .htaccess or drop support for something your theme relied on. That is why the first question after any 500 error is “what changed last?”

What is the difference between a 500 error and the white screen of death?

They are the same family of problem — usually a PHP fatal error with the message hidden. The difference is only what the server shows you: some servers return a generic “500 Internal Server Error” page, others return a blank white page. If you see a blank white page instead of the 500 message, the white screen of death guide covers that case.

Can I fix it without FTP?

Yes. Your hosting panel’s file manager renames folders and edits files just as well as FTP does, and the dashboard handles the plugin and theme tests when it loads. You only need file access of some kind, and every host provides a file manager in its control panel.

How long does it take to fix?

Most 500 errors are fixed in ten to thirty minutes — the .htaccess rename or the plugin test resolves the majority. If you reach fix 7 and the log points at core files or a server limit, budget an hour. A restore itself takes minutes; the delay is usually finding a backup that predates the problem.

What if only wp-admin shows 500 but the front end works?

That points at a plugin that only runs in the dashboard, or at memory — the admin area does heavier work than the front end. Run the same fixes in the same order, starting with the plugins. If wp-admin itself is down, use the file manager to rename the plugins folder, as in fix 3.

The bottom line

A 500 Internal Server Error is the server telling you something broke without telling you what — usually a corrupt .htaccess file, a plugin conflict, or memory exhaustion. Work the seven fixes in order: .htaccess, memory limit, plugins, theme, permissions, core files, then PHP version and the error log. Most sites are back by fix 1 or fix 3, and almost all by fix 7, with the log naming the exact file that failed. Back up before you start, remove the debug lines when you finish, and update one plugin at a time from now on.

If the site is still down after all seven, or you would rather hand the file work to someone who does it every week, request a free quote — 500-error recovery is part of our WordPress development services, and we will tell you what broke and how we fixed it.