500 Internal Server Error in WordPress – causes and solutions

A 500 Internal Server Error can take your WordPress site offline instantly, but the cause is usually traceable and fixable.

A 500 Internal Server Error is one of the most feared error messages in WordPress. The moment your site goes offline because of it, you immediately lose visitors and customers. Visitors only see a blank page or the message “500 Internal Server Error” — not exactly professional. In other words: your website is down and nobody can see or do anything. HTTP status code 500 is a general server error that indicates something unexpected went wrong on the server. Don’t panic: you’re not the only one with this issue, and it’s usually fixable. In this article I explain what the error means, what the common causes are, and—most importantly—how to fix it quickly.

I use a clear problem → solution structure. First I cover the main causes, followed by concrete steps to fix them. The most common causes of a 500 Internal Server Error in WordPress are:

  • A corrupted .htaccess file (damaged server configuration file)
  • A faulty plugin or theme (e.g., a plugin conflict or poorly coded theme)
  • Insufficient PHP memory (memory limit)
  • Server issues such as timeouts or configuration errors (e.g., wrong file permissions or PHP version)
  • Problems after WordPress core updates (errors during or after updating WordPress)

I’ll go through these causes one by one. Follow the steps and test after each step whether the site works again. Important: if possible, make a backup of your site before making major changes. That way you can always roll back if something goes wrong.

1. Fix a corrupted .htaccess file

One of the best-known causes of the 500 Internal Server Error is a corrupted .htaccess file. The .htaccess file (a configuration file for Apache web servers) controls important server settings such as redirects and WordPress permalinks. If this file is damaged or contains incorrect rules, the server can’t load pages correctly and you get a 500 error.

Solution: usually you can fix this by temporarily disabling the .htaccess file and generating a clean one. Follow these steps:

  1. Rename the .htaccess file: use an FTP program or your hosting file manager to go to the root folder of your WordPress site (often the public_html or www folder). Find the file named .htaccess. Rename it to something like .htaccess_old to deactivate it. (By renaming it, the server no longer sees the file, so the corrupt rules are ignored.)
  2. Generate a new .htaccess file: now try to reload your website or log in to your WordPress dashboard. In WordPress go to Settings → Permalinks and click Save without changing anything. WordPress will try to automatically create a new default .htaccess file with the correct standard rules.
  3. Manual method (if needed): if the above step doesn’t work or you can’t log in to WordPress, create a new .htaccess file yourself. Open a text editor and copy the standard WordPress .htaccess content (available in the official WordPress documentation). Upload this new file to the root folder and replace the old file. Make sure the file name is exactly .htaccess (no extension).
  4. Check the site: refresh your website. In many cases the 500 error disappears if a corrupt .htaccess was the culprit. WordPress now uses a clean configuration file.

Tip: keep the old renamed file for now. If this fixes the issue, you can delete the old file. If it wasn’t the cause, you can rename it back to .htaccess and continue troubleshooting.

2. Disable a faulty plugin or theme (plugin/theme conflict)

Another common cause is an error in a plugin or theme. Plugins and themes extend WordPress, but they can also contain code errors or conflicts. Installing a new plugin or updating a theme can suddenly cause a 500 Internal Server Error. For example, you update a plugin and from that moment the site breaks. Incompatibility between a plugin/theme and the rest of the site is likely the culprit.

Solution: to find out whether a plugin or theme causes the error, temporarily disable them. The goal is to isolate which extension is causing the issue.

A) Check plugins

Follow these steps to find a problematic plugin:

  1. Deactivate all plugins at once: if you still have access to your WordPress dashboard, go to Plugins and deactivate all active plugins. (You can select all plugins in the list and choose Deactivate.) This disables all plugins. Can’t log in to WordPress? No problem: log in to your hosting control panel (hPanel, cPanel, DirectAdmin, etc.) and rename the wp-content/plugins folder to something like plugins_off via the File Manager. This also disables all plugins.
  2. Check the site: reload the site. If the 500 error is gone, the cause was one of the plugins. If not, rename the plugin folder back to plugins (or re‑enable plugins in WordPress) and continue to the theme step.
  3. Identify the culprit plugin: if the site works with all plugins disabled, you need to find which plugin caused the error. Re‑enable plugins one by one, testing the site after each activation. Repeat until the site crashes again—the last plugin enabled is likely causing the 500 error.
  4. Remove or update the problem plugin: deactivate or remove the faulty plugin. Look for an alternative with similar functionality, or see if there’s an update/fix from the developer. The key is to get your site stable again without this plugin.

B) Check the theme

If plugins don’t seem to be the cause, your active theme may be the issue—especially if the error started right after a theme update or change. Themes can contain code errors or be incompatible with your WordPress version.

  • Switch to a default theme: try activating a standard theme. If you can access Appearance → Themes in the dashboard, temporarily activate a WordPress default theme such as Twenty Twenty-*. If you can’t access wp-admin, do it via files: in your file manager go to wp-content/themes and rename your current theme folder (e.g., mythememytheme_old). WordPress will automatically fall back to a default theme (if available; otherwise upload one).
  • Test the site again: does the site load with the default theme? Then the problem was in your previous theme. The theme may be incompatible with your WordPress version or contain a bug. Contact the theme developer or temporarily use another theme. If the site still shows a 500 error even with a default theme, the theme wasn’t the cause—rename your original theme folder back and continue with other causes (e.g., PHP memory or server issues).

By systematically checking plugins and themes, you can find most errors caused by extensions. In practice, a plugin conflict is the #1 cause of 500 errors in WordPress. Take the time to rule this out before moving on.

3. Increase an insufficient PHP memory limit

WordPress and its plugins run on PHP. Every site has a PHP memory limit—the maximum amount of memory scripts can use. If your site reaches that limit (for example due to a heavy script or too many plugins), it can cause an “Allowed memory size exhausted” error or a 500 Internal Server Error. In other words: the server runs out of memory to load the page and aborts the process.

Solution: you can fix this by increasing the PHP memory limit. Do this via one of the following methods:

  • Edit wp-config.php: log in to your server via FTP or File Manager and find wp-config.php in the WordPress root folder. Open the file for editing. Add the following line (preferably just before /* That's all, stop editing! */):
define( 'WP_MEMORY_LIMIT', '256M' );

This asks WordPress to use up to 256 MB of memory. Save the file and reload the site. (Tip: 256M is a generous value; you can also try 128M as a first step. Many hosts default to 64M or less.)

  • Alternative via .htaccess (for Apache servers): you can also increase the PHP memory limit via .htaccess. Add this line to .htaccess:
php_value memory_limit 256M

Save the file and test the site again. Hostinger, for example, recommends 256M as a new limit. Note: this only works if your host allows overriding PHP settings in .htaccess.

  • Alternative via php.ini (for advanced users): depending on your hosting, you may be able to edit a php.ini file. Find memory_limit and set it to 256M or higher. Not all shared hosts allow this, so it’s mainly useful on VPS or dedicated servers.

After increasing the memory limit, refresh your website and see if the error is resolved. If the 500 error was caused by a memory shortage, the site should load again. If not, the cause lies elsewhere or a higher limit is needed. Note: if you must raise the limit significantly, it can indicate inefficient code (e.g., a leaky plugin). In that case it’s wise to investigate why so much memory is needed instead of just increasing limits.

Tip: communicate with your hosting provider if you keep hitting memory limits. Some hosts enforce hard limits; they can advise you or upgrade your plan if your site consistently needs more resources.

4. Fix server timeouts or configuration errors

Not all 500 Internal Server Errors are directly caused by WordPress itself. Sometimes the issue lies in the server environment or settings. Examples:

  • Server timeout: this happens when a request takes too long and the server terminates the process. For example, a script that hangs or an external API that doesn’t respond can cause a timeout. Sometimes you’ll see a specific 504 Timeout error, but it can also appear as a 500 error. On shared hosting, high load (too many concurrent requests) can also cause processes to be killed.
  • File or folder permissions: incorrect file permissions can cause WordPress files to be blocked from running by the server, which can trigger an Internal Server Error. For example, if PHP files don’t have the right read/execute permissions (often 644 for files, 755 for folders in WordPress), the server refuses access and you get a 500 message.
  • PHP configuration and version: an incorrect PHP version or missing extensions can also cause issues. For example, an outdated PHP version that’s incompatible with a newer plugin or WordPress itself can lead to a 500 error. Conversely, a too‑new PHP version can cause problems with very old plugins. Specific PHP settings (e.g., disabled modules or a low max_execution_time) can also trigger errors.
  • Database or server configuration errors: in some cases a database problem (such as a database server crash) can lead to a 500 error, although that often shows a separate message (“Error establishing a database connection”). A misconfiguration in the web server (Apache/Nginx) can also be the culprit, but on managed hosting this is usually outside your control.

Solution: because these issues vary, the approach here is troubleshooting and eliminating causes. Tips for diagnosing and resolving server-related issues:

  • Check error logs: with a 500 error, there is almost always an entry in the server error logs. Log in to your hosting panel and look for “Error logs” or “Foutenlogboek”. For example in DirectAdmin you go to System Info & Files → Statistics and Logs. Review the latest entries around the time of the error. The log may indicate which file or resource caused the issue. These messages can look technical, but often include hints such as a file name, plugin name, or specific function that failed. Example: a log line might say “PHP Fatal error: Allowed memory size of 64M exhausted in /home/user/public_html/wp-content/plugins/example-plugin/x.php on line 123” — this points to a memory issue caused by that plugin. Or a message like “Permission denied in /wp-admin/…” indicates incorrect file permissions. Use that information to take targeted action (e.g., increase memory, remove a plugin, fix permissions).
  • Enable WordPress debugging: WordPress has a built‑in debug mode. Enabling it often shows the actual PHP error instead of only a 500 message. Enable debug mode by adding define('WP_DEBUG', true); to wp-config.php (or set it to true if it’s already there), and add define('WP_DEBUG_LOG', true); so errors are written to a log file. Reload the site—you should see the PHP error message on screen or in wp-content/debug.log. Disable debug mode again (set it to false) once you’re done, because visitors shouldn’t see these errors on a live site.
  • Check (and change) the PHP version: see which PHP version your hosting uses. In modern hosting panels you can often set this yourself. Try switching to a newer version (e.g., PHP 8.1 or 8.2) or to a slightly lower stable version and see if it changes anything. An “Incompatible PHP version” is often cited as a cause of 500 errors, especially if plugins use functions only available in newer PHP versions. Make sure your PHP version matches WordPress recommendations (currently at least PHP 7.4, preferably 8.x).
  • Fix file permissions: check whether WordPress files and folders have the correct permissions. You can often do this via the hosting control panel (some panels have a “Fix permissions” option). Standard permissions are usually 755 for wp-content, wp-includes, wp-admin folders and 644 for most files. Adjust if needed and test again.
  • Temporarily disable heavy processes: if you suspect a timeout caused by a heavy plugin (e.g., a backup plugin or security scan), disable it temporarily and see if the error goes away. Optimize your site with caching and avoid unnecessary plugins so the server is less likely to overload. If timeouts are structural, you may need to upgrade to a more powerful hosting plan. A 500 error caused by heavy load is a sign that your website is hitting the limits of the current server—more CPU, memory, or better configuration can prevent this.

In short, server-related 500 errors require monitoring and fine-tuning. Use logs and debugging to find the exact cause and fix it specifically. If you’re stuck, don’t hesitate to contact your hosting support—they can often check server logs and tell you exactly what went wrong.

5. Fix problems after a WordPress core update

Sometimes the 500 Internal Server Error appears right after a WordPress update. You update WordPress to the latest version and suddenly the site no longer works. This is frustrating. Often it happens because one of your plugins or your theme isn’t compatible with the new WordPress version, or because something went wrong during the update. It’s known that some plugins can stop working after a WordPress update and cause a 500 error.

Solution: take these steps when your site crashes after a WordPress core update:

  • Repeat step 2 (check plugins/themes): the first suspect after an update crash is a plugin or theme conflict. Follow the earlier procedure: deactivate all plugins and switch to a default theme. This tests whether the error disappears when the update runs “alone”. If so, one of the plugins or the theme isn’t compatible with the new WP version. Update that plugin/theme to the latest version, or look for an alternative if there’s no update yet. Many plugin developers release updates quickly once incompatibilities with a new WP version appear.
  • Restore core files: if the problem isn’t a plugin or theme, the update may have corrupted core files or not applied correctly. In that case you can replace WordPress core files manually without touching your content. Download the latest WordPress package (zip) from wordpress.org and extract it. Remove the wp-content folder (so you don’t overwrite uploads/plugins) and the wp-config-sample.php file. Upload all remaining files and folders to your server via FTP, overwriting the existing WordPress files. This refreshes the core to a clean version. Important: do not overwrite the wp-content folder and do not touch wp-config.php on the server! Only core files such as everything in wp-includes and wp-admin and the root files (except wp-config.php) should be replaced. After this, reload the site. Many update-related issues are solved this way. (Always make a backup first just in case, although your content and settings usually remain intact.)
  • Run the database update: sometimes a WordPress update also requires a database upgrade. If the front‑end shows a 500 error but you can access wp-admin, check if there’s a prompt to update the database, or go manually to http://your-site.com/wp-admin/upgrade.php. Run the upgrade if requested.
  • Roll back as a last resort: in very rare cases nothing works and your site is unusable right after the update. If you have a backup from before the update, you can consider a rollback—restore the backup so you’re back on the old WP version. This gives you time to diagnose the issue (e.g., in a staging environment) before updating again. A quick fix when your site must be live is to roll back, but remember it’s temporary; you still want to be up to date for security.

The key with update problems is to find what exactly breaks because of the update. In many cases it’s still a plugin or theme incompatibility (fixed by updates or replacements). In other cases the update itself failed, which you can fix by reinstalling WordPress. Always keep a recent backup before doing core updates so you can roll back in emergencies.

Tips to prevent 500 errors in the future

Prevention is better than cure. While you can’t 100% rule out issues, you can greatly reduce the chance of a 500 Internal Server Error in WordPress by following these best practices:

  • Keep WordPress, themes, and plugins up to date: outdated software is a common cause of errors. Updates contain bug fixes and improvements that prevent these problems. Update with care: read changelogs and update one by one so you know what caused an error if it happens. Use a staging environment to test updates before applying them to your live site.
  • Choose reliable plugins and themes: install plugins/themes from official or reputable sources, with good reviews and regular updates. Too many obscure plugins increase conflict risk. Also avoid using more plugins than needed; the more complex your site, the more can go wrong.
  • Monitor your site: use monitoring tools that alert you when your site goes down (e.g., an uptime monitor that checks every minute). That way you know immediately if there’s a problem, even if you’re not constantly checking. You can intervene quickly before visitors leave. Kinsta, for example, recommends using monitoring tools to get immediate downtime notifications.
  • Use built‑in Site Health features: WordPress has a Site Health feature under Tools → Site Health. It checks your site for known issues and provides recommendations. For example, it warns you if you’re running an old PHP version or if there are security issues. Take these recommendations seriously—they can prevent errors.
  • Make regular backups: maintain a solid backup routine (daily or weekly depending on how often your site changes). With recent backups you can quickly return to a working version after a serious error. This reduces downtime and stress. There are many reliable backup plugins, or use your host’s backup feature if available. Occasionally test restoring backups to make sure they work.
  • Upgrade hosting in time: if your site consistently hits server limits (e.g., high memory or CPU usage), consider upgrading to a more powerful plan or a better host. Many 500 errors caused by peak load or long‑running processes can be fixed by more server resources or a more efficient hosting setup.

Finally, don’t be afraid to ask for help. A good host will help you troubleshoot stubborn server errors. Prefer prevention? That’s where the conclusion comes in.

Summary and next step

A 500 Internal Server Error in WordPress is annoying but usually fixable. I’ve seen that the cause is often a corrupted .htaccess file, a bad plugin or theme, a low PHP memory limit, server configuration problems, or a failed update. By applying the step‑by‑step solutions above, you can get your site back online in most cases.

The key is to troubleshoot calmly: change one thing at a time and test whether the site comes back. That way you can identify the culprit and take targeted action.

If you’d like help without the hassle, you can also take a look at my managed WordPress hosting. Otherwise, I hope the steps above get you unstuck.

Want this to stop being your problem?

If outages or errors keep repeating, the fix is often consistency: updates, backups and monitoring that don’t get skipped.

See managed WordPress hosting