Skip to content
webfixed

Guides / WordPress

WordPress 500 Internal Server Error: how to fix it

By Michael Broadbridge. Last checked 14 November 2026 on WordPress 7.1.

Short answer

A 500 Internal Server Error means the server could not complete the request. On WordPress the most likely cause is a corrupt .htaccess file: rename it, reload, then save Settings, Permalinks to make a new one. If that fails, switch plugins off by renaming the plugins folder, raise the PHP memory limit, and read your host’s error log.

Symptoms

You may see one of these messages:

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

  • The browser shows "Internal Server Error" or "500 Internal Server Error" on a plain page with none of your site’s design.
  • Every page fails, including the dashboard and wp-login.php, or only some pages or actions fail.
  • It started after a plugin or theme update, an edit to .htaccess, a PHP version change or a move to a new host.
  • Your host’s error log shows new entries each time you reload the page.

Causes, most likely first

  1. A corrupt .htaccess file

    On servers that use .htaccess files, this file holds the rules that send each address to WordPress. One bad line, from a plugin or a manual edit, makes the server fail every request. WordPress’s own documentation names it as the most likely cause.

  2. A plugin or theme crashing

    PHP code that crashes stops the page. WordPress usually catches this and shows its critical error message instead, but not in every case.

  3. PHP running out of memory

    Each page load gets a fixed amount of memory. When a page needs more, PHP stops and the error log shows a line containing "Allowed memory size of".

  4. The PHP version

    A plugin or theme that does not support the PHP version your host runs, often straight after the host or a migration has changed it.

  5. File permissions

    If files or folders have the wrong permissions, the server cannot read them. WordPress warns that setting incorrect permissions can take a site offline.

How to fix it

Check which error you have

"There has been a critical error on this website." is WordPress’s own message. It is also sent as a 500 error, but it means WordPress loaded and caught a PHP crash, and the critical error guide covers it. A plain "Internal Server Error" page comes from the web server, often before WordPress has run at all. The wording above is the Apache default, and some hosts show their own branded page instead.

  1. Note the exact wording on screen, and whether it appears on the home page, other pages, the dashboard and wp-login.php.
  2. If the page says "There has been a critical error on this website.", follow the critical error guide instead. It uses WordPress’s recovery mode email to name the faulty plugin.
  3. Write down anything that changed just before it started, such as an update, a new plugin, an edit to .htaccess or a PHP version change.
  4. If your hosting control panel still works, take a backup before you change anything.

Replace the .htaccess file

The .htaccess file sits in the main folder of the site, alongside the wp-admin and wp-content folders. File names that start with a dot are often hidden, so turn on the option to show hidden files in your file manager or SFTP program. Servers running nginx do not use .htaccess, so skip this part if your host runs nginx.

  1. Open your host’s file manager or connect by SFTP, and go to the main folder of the site.
  2. Download a copy of .htaccess, then rename it on the server to .htaccess_old.
  3. Reload the site. If the home page loads, the old file was the cause. Other pages may show a not found error until the next step.
  4. Log in and click Save Changes without changing anything. WordPress writes a new .htaccess file with its standard rules.Menu: Settings > Permalinks
  5. If WordPress cannot write the file, the Permalinks screen says "These are the mod_rewrite rules you should have in your .htaccess file." and shows them in a box. Create a new file called .htaccess in the main folder and paste them in.
  6. If the old file had extra rules from a security, caching or redirect plugin, let that plugin write them again from its own settings, then reload the site to check it still works.

Keep the .htaccess_old copy until the site has run normally for a few days. It shows what the bad rule was if the problem comes back.

Switch plugins and the theme off

  1. In wp-content, rename the plugins folder to plugins-off. This deactivates every plugin without deleting their settings.
  2. Reload the site. If it loads, rename the folder back to plugins. The plugins stay deactivated.
  3. Reactivate them one at a time, reloading the site after each one. When the error returns, the last plugin you activated is the cause.Menu: Plugins > Installed Plugins
  4. If the error stays with every plugin off, rename your active theme’s folder in wp-content, then themes.
  5. Log in and open Appearance, then Themes. WordPress switches to a default theme such as Twenty Twenty-Five if one is installed. Until then, visitors see a blank page.

Raise the PHP memory limit

By default WordPress asks PHP for 40MB on a single site and 64MB on a multisite network. It can only raise the limit as far as your host allows.

  1. If the dashboard works, open the Info tab. PHP memory limit is listed under Server, and WP_MEMORY_LIMIT under WordPress Constants.Menu: Tools > Site Health
  2. Download a copy of wp-config.php, then open it in the file manager’s editor.
  3. Above the line that says "That's all, stop editing!", add: define( 'WP_MEMORY_LIMIT', '256M' );
  4. Save the file and reload the site.
  5. If the error log still shows "Allowed memory size of", ask your host to raise memory_limit, or raise it on the PHP settings page of your control panel if there is one.

Check the PHP version

  1. Find the PHP version in your hosting control panel. If the dashboard works, it is also on the Info tab under Server.Menu: Tools > Site Health
  2. If the host changed the version recently, switch back one version in the control panel and reload the site.
  3. If that fixes it, update or replace the plugin or theme that needed the older version, then move forward again.

WordPress recommends PHP 8.3 or greater. It still runs on PHP 7.4, but versions that old have reached end of life and no longer get security fixes.

Read the host’s error log

The server records the real cause of a 500 in its error log. Most control panels have an Errors or Logs section, and some hosts write a file called error_log into the site’s folder.

  1. Reload the broken page once and note the time.
  2. Open the error log and find the entries from that minute.
  3. A line with "PHP Fatal error" names a file. The folder in its path, such as wp-content/plugins followed by a plugin name, shows which plugin or theme failed.
  4. A line that names .htaccess, such as one starting "Invalid command", points to a bad rule in that file.
  5. If you cannot find the log, or it is empty, ask your host’s support to check it. They can see logs you cannot.

Check file permissions

  1. In the file manager, look at the permissions of the main folder, wp-content, the plugins and themes folders, and wp-config.php.
  2. WordPress’s documentation gives 755 or 750 for folders, 644 or 640 for files, and 440 or 400 for wp-config.php, on servers where PHP runs as your own user.
  3. Never set 777. WordPress says no folder should ever have it, not even uploads.
  4. If many files changed at once, for example after a migration or a restore, ask your host to reset them.

If that didn’t work

  1. Damaged WordPress core files

    WordPress suggests uploading fresh wp-admin and wp-includes folders from a clean download of the same version. Replace those two folders only, and leave wp-content and wp-config.php alone.

  2. The 500 happens only on one action

    If only saving a post, uploading an image or checking out fails, keep the error log open while you do it once. The entry from that moment names the plugin or limit involved.

  3. A fault on the server itself

    If the error log shows nothing from WordPress and nothing on the site changed, the fault may be in the server set-up. Your host can check this.

When to get help

Stop if the error is still there with a fresh .htaccess file, all plugins off and a default theme active, if the error log names WordPress core files or nothing at all, or if you are not comfortable editing wp-config.php and .htaccess. A shop that cannot take orders is a reason to get help sooner.

What a developer would check

  • The server and PHP error logs for the exact entry at the time of the error.
  • The .htaccess rules, including any added by caching, security and redirect plugins.
  • PHP version and memory limit against what each plugin and the theme need.
  • File ownership and permissions, especially after a migration or restore.

Describe the problem in your own words and WebFixed gives you an instant fixed quote. Nothing is charged until you accept it.

Related questions

Is a 500 error the same as the WordPress critical error?
Not quite. The critical error message is WordPress’s own page, shown when it catches a PHP crash, and it is sent with a 500 status. A plain Internal Server Error page usually comes from the web server, often before WordPress runs, so .htaccess and server settings are checked first.
Will renaming .htaccess break my site?
Pages other than the home page may show a not found error until you save the Permalinks settings, which writes a new file. Rules added by plugins, such as redirects or security rules, need adding back from those plugins’ settings.
Will I lose my content?
No. Posts, pages and settings are in the database, and images are in the uploads folder. Renaming .htaccess, plugin folders and theme folders does not touch either, and every step here can be undone.

Written by Michael Broadbridge, Founder of Webgro. First published 14 November 2026. Last checked 14 November 2026 on WordPress 7.1.