---
title: "How to fix the 500 Internal Server Error in WordPress"
url: https://wpministry.co/errors/500-internal-server-error/
description: "A 500 error says something failed without saying what. On WordPress it is usually a damaged .htaccess file or a PHP error in a plugin or the theme."
lang: en-US
---

Skip to content

# How to fix the 500 Internal Server Error in WordPress

A 500 error is the web server saying something went wrong without saying what. On a WordPress site the two usual causes are a damaged .htaccess file and a PHP error in a plugin or theme. Replacing .htaccess with WordPress's standard one takes two minutes and settles which it is.

By

WP Ministry

Published

October 6, 2026

Tested on

WordPress 7.1.4, PHP 8.3.36

## In short

- A 500 error is a general failure notice from the server. The real cause is in the server's error log.
- Try the .htaccess file first. It is the quickest thing to rule out and a common cause.
- If that changes nothing, a plugin or the theme is failing. The error log names it.
- Your content is not affected by any of this.

"500 Internal Server Error" is the web server's way of saying that something failed and it will not say what in public. It is not one fault but a label for many. The actual cause is written to an error log, and the fixes below are ordered by how often each cause turns up and how quickly it can be ruled out.

Your posts, pages and settings are not affected.

If the site is down and you would rather have it fixed for you, emergency WordPress support (https://wpministry.co/services/emergency-support/) is a one-time repair, no care plan needed.

## Where it goes wrong

A page request passes through each of these in turn. This one comes from **the web server**.

1. Browser
2. DNS
3. HTTPS
4. CDN or firewall
5. Web server (this error comes from here)
6. PHP
7. WordPress
8. Database and files

## What causes it

- ### The .htaccess file has a line the server cannot read
  Common
  A plugin, or an edit made by hand, left a rule in .htaccess that the web server does not understand. One bad line stops every page.
  Fix: Replace .htaccess with WordPress's standard one
- ### A plugin or the theme has a PHP error
  Common
  Code in a plugin or theme failed. WordPress usually reports this as a "critical error", but it reaches the visitor as a 500 all the same.
  Fix: Find the PHP error behind it
- ### Something on the server itself
  Sometimes
  Wrong permissions on files or folders, a limit reached on the hosting plan, or a fault in the server's own configuration.
  Fix: Ask the host to check the server's log

## How to fix it

### Replace .htaccess with WordPress's standard one

- Easy
- Back up first
- About 5 minutes
- Steps tested on WordPress 7.1.4

This applies to sites on Apache or LiteSpeed, which is most shared hosting. A site on nginx has no `.htaccess` file: go to the next fix.

1. #### Step 1: Find .htaccess in the site's main folder
   It sits beside `wp-config.php`. Its name begins with a dot, so turn on "Show hidden files" in your file manager if you cannot see it.
2. #### Step 2: Replace everything in it with this
   This is what WordPress itself writes for a site at the root of its domain.
   .htaccess Copy

   ```
   # BEGIN WordPress
   <IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
   RewriteBase /
   RewriteRule ^index\.php$ - [L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /index.php [L]
   </IfModule>
   # END WordPress
   ```

3. #### Step 3: Reload the site
   If it loads, a line in the old file was the cause.
4. #### Step 4: Put your other rules back with care
   Open the copy you saved. Anything outside the `# BEGIN WordPress` and `# END WordPress` lines was added by a plugin or by hand. Add those sections back one at a time, reloading after each, until you find the one that breaks the site.

If WordPress is installed in a subfolder, such as `example.com/blog`, do not paste the block above. Rename `.htaccess` to `.htaccess-old` instead, then go to Settings, then Permalinks in the dashboard and press Save Changes. WordPress writes a fresh file with the right paths.

**To undo it:** Put your copy of the old .htaccess back.

### Find the PHP error behind it

- Takes care
- Low risk
- About 15 minutes
- Steps tested on WordPress 7.1.4

If `.htaccess` was not the cause, a plugin or the theme is failing. WordPress will write the details to a log if you ask.

1. #### Step 1: Turn the debug log on
   In `wp-config.php`, find the line `define( 'WP_DEBUG', false );` and replace it with these three.
   wp-config.php Copy

   ```
   define( 'WP_DEBUG', true );
   define( 'WP_DEBUG_LOG', true );
   define( 'WP_DEBUG_DISPLAY', false );
   ```

2. #### Step 2: Load the page that fails, then open the log
   Open `wp-content/debug.log` and find the newest line that begins "PHP Fatal error". It ends with the path of the file that failed.
3. #### Step 3: Act on what it names
   - A path through `wp-content/plugins/` or `wp-content/themes/`: that plugin or theme is at fault. Switch it off as described for the white screen of death (https://wpministry.co/errors/white-screen-of-death/).
   - "Allowed memory size exhausted": the page ran out of memory. See how to fix "Allowed memory size exhausted" (https://wpministry.co/errors/allowed-memory-size-exhausted/).
4. #### Step 4: Turn the debug log off
   Put the line back to `define( 'WP_DEBUG', false );` and delete `debug.log`.

With WP-CLI:

bash

```
wp config set WP_DEBUG true --raw
wp config set WP_DEBUG_LOG true --raw
wp config set WP_DEBUG_DISPLAY false --raw
```

And when you have read the log:

bash

```
wp config set WP_DEBUG false --raw
wp config set WP_DEBUG_LOG false --raw
```

### Ask the host to check the server's log

- Easy
- No risk
- About 15 minutes
1. #### Step 1: Look for an error log in your hosting panel
   Many panels have an "Errors" or "Error log" page showing the server's most recent errors. The line written at the moment you loaded the page is the one that matters.
2. #### Step 2: If you cannot see one, ask support
   Tell them the site returns a 500 error, that you have replaced `.htaccess` with the standard one and that WordPress's debug log shows nothing. Ask what the server's error log says for your site.

## When to get help

If .htaccess is the standard one, the debug log is empty and the 500 is still there, the cause is in the server's own logs, which most hosting plans only show to the host. Ask them, and tell them what you have already ruled out.

## Common questions

Is a 500 error my fault or my host's?

Usually the site's: a rule in `.htaccess`, or code in a plugin or theme. The fixes above rule those out. What is left is the host's.

Why does it only happen on some pages?

Different pages run different code. A fault in one plugin's feature shows only on the pages that use it, which is a strong hint about which plugin to look at.

Will a 500 error hurt my search ranking?

A short outage does not. Search engines come back and try again. An error that lasts for days can lead to pages being dropped, so it is worth fixing promptly.

## More on this subject

- WordPress errors and troubleshooting: https://wpministry.co/topics/wordpress-troubleshooting/
- Guide How to update the PHP version of a WordPress site: https://wpministry.co/blog/update-php-version-wordpress/
- Guide WordPress uptime monitoring: what a check sees and what it misses: https://wpministry.co/blog/wordpress-uptime-monitoring/
- Glossary term .htaccess: https://wpministry.co/glossary/htaccess/
- Guide Locked out of WordPress admin: find which lockout you have and get back in: https://wpministry.co/blog/locked-out-of-wordpress-admin/
- Glossary term Must-use plugin (mu-plugin): https://wpministry.co/glossary/must-use-plugin/
- Glossary term Permalink: https://wpministry.co/glossary/permalink/

## Would you rather we fixed it?

Emergency Fix is $99. Site down or checkout broken. Goes to the front of the queue. No fix, no fee. 30-day warranty.

More about this work: Emergency WordPress support (https://wpministry.co/services/emergency-support/)

May we measure how this site is used?

A yes notes the pages of this visit and loads Google Analytics. A no keeps and loads nothing. See the cookies page (https://wpministry.co/legal/cookies/).

If you say yes, we note the pages you look at during this visit and load Google Analytics. If you say no, nothing is kept and nothing is loaded. The site works the same either way. The cookies page (https://wpministry.co/legal/cookies/) has the details.

## Structured data

```json
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://wpministry.co/#organization",
      "name": "WP Ministry",
      "url": "https://wpministry.co/",
      "logo": "https://wpministry.co/brand/logo.png",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "1309 Coffeen Ave STE 1200",
        "addressLocality": "Sheridan",
        "addressRegion": "WY",
        "postalCode": "82801",
        "addressCountry": "US"
      },
      "sameAs": [
        "https://www.linkedin.com/company/wp-ministry/",
        "https://x.com/wpministryco",
        "https://www.instagram.com/wpministryco/",
        "https://www.facebook.com/wpministryco",
        "https://www.tiktok.com/@wpministryco",
        "https://www.pinterest.com/wpministryco/",
        "https://www.youtube.com/channel/UCOZRuAukk5QSTRPG6BaHl3Q"
      ]
    },
    {
      "@type": "WebSite",
      "@id": "https://wpministry.co/#website",
      "name": "WP Ministry",
      "url": "https://wpministry.co/",
      "inLanguage": "en-US",
      "publisher": {
        "@id": "https://wpministry.co/#organization"
      }
    },
    {
      "@type": "TechArticle",
      "@id": "https://wpministry.co/errors/500-internal-server-error/#article",
      "headline": "How to fix the 500 Internal Server Error in WordPress",
      "description": "A 500 error says something failed without saying what. On WordPress it is usually a damaged .htaccess file or a PHP error in a plugin or the theme.",
      "url": "https://wpministry.co/errors/500-internal-server-error/",
      "mainEntityOfPage": "https://wpministry.co/errors/500-internal-server-error/",
      "inLanguage": "en-US",
      "image": "https://wpministry.co/og/errors/500-internal-server-error.png",
      "author": {
        "@id": "https://wpministry.co/#organization"
      },
      "publisher": {
        "@id": "https://wpministry.co/#organization"
      },
      "datePublished": "2026-10-06T00:00:00.000Z",
      "dateModified": "2026-10-06T00:00:00.000Z"
    },
    {
      "@type": "BreadcrumbList",
      "itemListElement": [
        {
          "@type": "ListItem",
          "position": 1,
          "name": "Home",
          "item": "https://wpministry.co/"
        },
        {
          "@type": "ListItem",
          "position": 2,
          "name": "Error fixes",
          "item": "https://wpministry.co/errors/"
        },
        {
          "@type": "ListItem",
          "position": 3,
          "name": "How to fix the 500 Internal Server Error in WordPress"
        }
      ]
    }
  ]
}
```