WordPress 500 Internal Server Error: The Complete Fix Guide for Site Owners

WordPress 500 Internal Server Error: The Complete Fix Guide for Site Owners

You refresh your WordPress site and instead of your homepage, you see a blank white screen or a blunt message: “500 Internal Server Error.” No explanation. No clue where to start. Just a broken site and a rising sense of panic.

This is one of the most common β€” and most frustrating β€” WordPress errors. The good news: it’s almost always fixable. The bad news: “500 error” is a catch-all term that can be caused by a dozen different things, which is why it feels so mysterious.

This guide walks you through every likely cause and every fix, in plain English. Whether you’re comfortable editing files via FTP or prefer to hand the problem to a professional, you’ll know exactly what’s going on by the end.


What Is a 500 Internal Server Error?

An HTTP 500 error means the server encountered an unexpected condition and couldn’t fulfill the request. Crucially, the server doesn’t tell you what the condition was β€” hence the vague, maddening message.

In WordPress, a 500 error almost never means something is wrong with the server itself. It means something in your WordPress installation β€” a plugin, a theme, a misconfigured file, or a resource limit β€” caused the server to give up.

What it looks like:

  • A plain white screen (sometimes called the “White Screen of Death” or WSOD)
  • A browser message saying “500 Internal Server Error”
  • A “This page isn’t working” message with error code 500
  • An “HTTP ERROR 500” message

The entire site may be down, or just specific pages (like the admin area, checkout, or a specific post).


Before You Start: Quick Checklist

Run through these first β€” they take 30 seconds and rule out the obvious:

  1. Hard-refresh your browser β€” Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
  2. Check if it’s just you β€” visit downforeveryoneorjustme.com or use a different device
  3. Check your hosting status page β€” some errors come from the host’s infrastructure, not your site
  4. Note when it started β€” did you just install a plugin? Update WordPress? Edit a file? That’s almost certainly the cause

If none of those resolve it, move to the diagnostics below.


Cause #1: A Corrupted .htaccess File

This is the single most common cause of 500 errors in WordPress on Apache servers. The .htaccess file controls URL rewriting (among other things), and if it gets corrupted β€” by a plugin update, a failed migration, or a manual edit β€” the whole site can go down.

How to fix it:

  1. Connect to your site via FTP (FileZilla is free) or your hosting file manager
  2. Navigate to your WordPress root directory (where wp-config.php lives)
  3. Find .htaccess β€” note: it’s a hidden file, so enable “show hidden files” in your FTP client
  4. Rename it to .htaccess_old (this disables it without deleting it)
  5. Reload your site

If the site comes back, your .htaccess was the problem. Now generate a fresh one:

  1. Log into your WordPress dashboard
  2. Go to Settings β†’ Permalinks
  3. Click Save Changes (without changing anything)

WordPress will regenerate a clean .htaccess file.

What a clean WordPress .htaccess looks like:

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

If you had custom rules in your .htaccess (for caching, security, redirects), carefully add them back one by one and test after each addition.


Cause #2: A Faulty Plugin

Plugins are the #1 cause of WordPress errors in general, and 500 errors are no exception. A plugin with a PHP bug, a conflict with another plugin, or an incompatibility with your current PHP version can bring the whole site down.

How to diagnose:

If you can access your WordPress dashboard:

  1. Go to Plugins β†’ Installed Plugins
  2. Deactivate all plugins at once (select all β†’ Bulk Actions β†’ Deactivate)
  3. Reload your site
  4. If it’s back, reactivate plugins one by one, testing after each one
  5. The plugin that brings the 500 error back is your culprit

If you can’t access the dashboard (most 500 errors):

  1. Connect via FTP
  2. Navigate to /wp-content/plugins/
  3. Rename the plugins folder to plugins_disabled
  4. Reload your site
  5. If it’s back, rename the folder back to plugins and repeat the one-by-one test inside the folder

Once you’ve identified the bad plugin, check if an update is available, contact the plugin developer, or find an alternative.


Cause #3: A Faulty Theme

Themes can cause 500 errors too, especially if the theme has a PHP syntax error in functions.php or a conflict with recent WordPress/PHP updates.

How to diagnose:

Via FTP:

  1. Navigate to /wp-content/themes/
  2. Rename your active theme’s folder (e.g., mytheme β†’ mytheme_disabled)
  3. WordPress will automatically fall back to a default theme (Twenty Twenty-Four or similar)
  4. If the site comes back, the theme is the problem

What to do:

  • Check if a theme update is available
  • Review recent changes to functions.php if you (or a developer) edited it
  • Contact the theme developer or switch themes

Cause #4: PHP Memory Limit Exhausted

WordPress and its plugins are PHP applications, and PHP is given a fixed amount of memory to work with. If your site β€” particularly a plugin doing something complex β€” tries to use more memory than the limit allows, the server throws a 500 error.

How to increase the PHP memory limit:

Option 1: Edit wp-config.php

Open wp-config.php (in your WordPress root) and add this line before the /* That's all, stop editing! */ comment:

php

define('WP_MEMORY_LIMIT', '256M');

Option 2: Edit .htaccess

Add this line to your .htaccess file:

php_value memory_limit 256M

Option 3: Edit php.ini

If your host gives you access to php.ini, find the memory_limit line and set it:

memory_limit = 256M

If 256M doesn’t help, try 512M. If you’re already at 512M or higher and still hitting the limit, the real problem is a plugin or process with a memory leak β€” no amount of limit increase will permanently fix that.


Cause #5: PHP Version Incompatibility

Older plugins and themes may not be compatible with newer versions of PHP, and vice versa. If your host recently upgraded PHP (or you changed it yourself), a plugin written for PHP 7.x may throw fatal errors on PHP 8.x.

How to check:

  1. Log into your hosting control panel (cPanel, Plesk, etc.)
  2. Find the PHP version selector (usually under “Software” or “PHP Manager”)
  3. Check what version you’re running
  4. Compare against your plugin and theme requirements

What to do:

  • If you recently upgraded PHP, try rolling back one version and see if the error clears
  • Check your plugins’ WordPress.org pages for PHP compatibility notes
  • Update plugins to versions that support your PHP version
  • Ideally, aim for the current stable PHP 8.x version and make sure your plugins support it

Cause #6: Timeout Errors on Large Operations

If you were running a large operation β€” importing content, regenerating thumbnails, running a WooCommerce bulk action, or doing a database search-replace β€” the script may have exceeded the server’s max execution time, which can produce a 500 error.

How to increase execution time:

In wp-config.php:

php

set_time_limit(300);

In .htaccess:

php_value max_execution_time 300

In php.ini:

max_execution_time = 300

300 seconds (5 minutes) is usually sufficient. Note that most shared hosting providers cap this regardless of what you set.


Cause #7: File and Folder Permissions

WordPress files and folders need specific permissions to function. If permissions get set too restrictively (or too openly, which some security plugins “fix” in ways that break things), you’ll get 500 errors.

Correct WordPress permissions:

  • Folders: 755
  • Files: 644
  • wp-config.php: 600 (more restrictive for security)

How to fix via FTP:

  1. Right-click on the root folder in FileZilla
  2. Select File Permissions
  3. Set to 755, check “Recurse into subdirectories” β†’ “Apply to directories only”
  4. Repeat for files with 644

Or via SSH (if your host provides it):

bash

find /path/to/wordpress -type d -exec chmod 755 {} \;
find /path/to/wordpress -type f -exec chmod 644 {} \;

Cause #8: Corrupted WordPress Core Files

In rare cases β€” failed updates, malware, or incomplete migrations β€” WordPress core files themselves can become corrupted.

How to fix:

  1. Download a fresh copy of WordPress from wordpress.org
  2. Extract the ZIP
  3. Delete the wp-content folder from the fresh copy (you don’t want to overwrite yours)
  4. Upload everything else via FTP, overwriting the existing files
  5. Your content, plugins, and themes (stored in wp-content) remain untouched

This is safe to do and won’t affect your database or content.


Cause #9: Database Connection Errors

Sometimes a 500 error actually masks a database issue. If WordPress can’t connect to the database, it may display a 500 instead of the more specific “Error Establishing a Database Connection.”

What to check:

  1. Open wp-config.php and verify:
    • DB_NAME β€” correct database name
    • DB_USER β€” correct database username
    • DB_PASSWORD β€” correct password
    • DB_HOST β€” usually localhost, but some hosts use a different value
  2. Log into your hosting panel and check that the database exists and the user has full privileges

How to Find the Exact Error: Check Your Error Logs

All of the above is detective work based on probability. The fastest path to a definitive answer is reading your error log.

Enable WordPress debug mode β€” add these lines to wp-config.php:

php

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

This writes errors to /wp-content/debug.log. Open that file after triggering the error and you’ll see the exact PHP error that’s causing the 500 β€” file name, line number, and description.

Also check your server’s error log:

  • cPanel: Logs β†’ Error Log
  • Hosting file manager: often in /logs/ or /error_log in your root
  • SSH: tail -f /var/log/apache2/error.log (path varies by server)

A typical error log entry for a plugin problem looks like this:

PHP Fatal error: Uncaught Error: Call to undefined function some_plugin_function() in /wp-content/plugins/some-plugin/some-plugin.php:124

That tells you exactly what broke and where. Diagnosis done.

Remember to disable debug mode after fixing the issue β€” WP_DEBUG_DISPLAY set to false prevents errors from showing on the frontend, but it’s still best practice to turn off debug mode on a live site.


When You Can’t Access Your Dashboard At All

A 500 error often locks you out of /wp-admin entirely. Everything above works via FTP or your hosting file manager β€” you don’t need dashboard access for any of the fixes.

If you’re completely locked out and uncomfortable working with files directly, this is a situation where hiring a WordPress professional to diagnose and fix the issue is the smart move. A few hours of expert time is worth far less than hours of frustrated trial and error on a broken live site β€” especially for an ecommerce site where every minute of downtime is lost revenue.

If you need a hand, take a look at the WordPress bug fixing service β€” most 500 errors are diagnosed and resolved within a few hours.


Preventing 500 Errors in the Future

Once your site is back up, take these steps to reduce the chance of this happening again:

1. Keep everything updated

The majority of WordPress errors come from outdated plugins running on updated WordPress core or PHP. Update plugins, themes, and WordPress core regularly β€” but test updates on a staging site first if possible.

2. Use a staging environment

Never test plugin updates, theme changes, or PHP version upgrades directly on a live site. Most quality hosts (and WordPress maintenance services) offer one-click staging environments.

3. Back up before every change

A daily automated backup means that in the worst case, you restore to yesterday’s version. Tools like UpdraftPlus, BackWPup, or your host’s backup service handle this automatically. If you’re on an ongoing WordPress maintenance plan, backups should be included.

4. Monitor your site

Services like UptimeRobot (free tier available) ping your site every few minutes and alert you by email or SMS the moment it goes down. This means you find out immediately β€” not hours later when a customer complains.

5. Use a quality host

Budget shared hosting often has aggressive resource limits (memory, execution time, concurrent connections) that make 500 errors more likely. Managed WordPress hosting or a reliable VPS gives your site more breathing room.

6. Be careful with .htaccess

If you edit .htaccess manually (for caching rules, security headers, redirects), always keep a backup of the previous working version. A single syntax error can take the whole site down.


Summary: 500 Error Causes and Fixes at a Glance

CauseQuick Fix
Corrupted .htaccessRename it, regenerate via Permalinks settings
Faulty pluginDeactivate all via FTP, reactivate one by one
Faulty themeRename theme folder, switch to default
PHP memory limitIncrease to 256M in wp-config.php
PHP version mismatchRoll back PHP version, update plugins
Script timeoutIncrease max_execution_time
Wrong file permissionsSet folders to 755, files to 644
Corrupted core filesRe-upload fresh WordPress core
Database issueVerify credentials in wp-config.php

Still Stuck? Let a Professional Handle It

If you’ve worked through this guide and still can’t identify the problem, or if you’re not comfortable editing server files, there’s no shame in calling in help. Some 500 errors are caused by unusual server configurations, conflicts between multiple plugins, or issues introduced by malware that require more thorough investigation.

The WordPress bug fixing service handles exactly these situations β€” diagnosing hard-to-find errors, fixing them cleanly, and making sure the root cause is addressed, not just patched over. And if you want to avoid this class of problems altogether in the future, an ongoing WordPress maintenance plan keeps your site updated, monitored, and backed up so that 500 errors become rare instead of routine.

If slow performance is also on your radar β€” a sluggish site is the other major issue WordPress owners deal with β€” Core Web Vitals and speed optimization is a separate service worth exploring once your site is stable.


Frequently Asked Questions

How long does it take to fix a WordPress 500 error?

If you follow the steps above and the cause is one of the common ones (.htaccess, plugin, theme), you can often fix it in 15–30 minutes. If the error log shows a clear culprit, it can be even faster. If the cause is unusual or involves a complex server environment, it can take longer β€” which is when professional help pays off.

Will fixing a 500 error delete my content?

No. None of the fixes in this guide touch your database or your wp-content folder (where your media, plugins, and themes live). Your pages, posts, products, and images are safe.

Why does my 500 error only happen on certain pages?

Page-specific 500 errors often point to a plugin that’s active only on certain page types (like WooCommerce on checkout pages), a shortcode with an error, or a custom query on a specific post type. Enable debug mode and reproduce the error on that specific page to capture the exact error message.

Can a hacked site cause 500 errors?

Yes. Malware injected into WordPress files can cause fatal PHP errors. If you’ve ruled out the common causes and your site has other signs of compromise (unfamiliar admin users, strange redirects, spam in Google search results), a security scan and malware removal should be your next step.

My host says it’s not their problem. What do I do?

They’re probably right β€” 500 errors in WordPress are almost always caused by something in the WordPress installation, not the server itself. Work through the checklist above, check your error logs, and if you need help, bring in a WordPress developer rather than continuing back-and-forth with hosting support.

Posted in: guides

Related Posts

WordPress 500 Internal Server Error: The Complete Fix Guide for Site Owners | WordPress & Next.js Expert