There was a problem loading the comments.

How to Fix the HTTP 500 Internal Server Error in WordPress

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Quick answer: The WordPress 500 error is a PHP fatal error, usually from a corrupted .htaccess, exhausted memory, or a broken plugin, theme, or core file. Enable debug logging to read the cause, regenerate .htaccess, raise the memory limit, deactivate plugins, or re-upload fresh core files.

An HTTP 500 internal server error shows a blank or generic error page with no detail, because the real cause is written to a log rather than the screen. In WordPress it is almost always a corrupted .htaccess file, a PHP memory limit, or a broken plugin, theme, or core file. Work through these in order.

1. See the real error

Turn on logging by adding this to wp-config.php:

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

Reload the page, then open wp-content/debug.log - it names the file and line causing the failure. Also check your server's error log in the control panel. Set these back to false when done.

2. Regenerate the .htaccess file

A corrupted .htaccess is a frequent cause. Rename it to .htaccess_old via FTP or File Manager, then reload the site. If it returns, go to Settings > Permalinks in wp-admin and click Save to generate a fresh, valid file.

3. Raise the PHP memory limit

If the log shows "memory exhausted", increase the limit (see the memory-limit guide) - add define('WP_MEMORY_LIMIT', '256M'); to wp-config.php.

4. Rule out a plugin or theme

Deactivate all plugins - if you cannot reach admin, rename wp-content/plugins to disable them at once. If the error clears, reactivate one at a time to find the culprit. Then switch to a default theme to rule the theme out.

5. Replace core files

If nothing above works, re-upload fresh wp-admin and wp-includes folders from a clean copy of the same WordPress version, leaving wp-content and wp-config.php untouched. This repairs a corrupted core file without losing content.

Frequently asked questions

How do I regenerate .htaccess?
Rename the file, then go to Settings, Permalinks and click Save to create a fresh one.

What if nothing else works?
Re-upload clean wp-admin and wp-includes folders from the same WordPress version, leaving wp-content and wp-config.php alone.

On SoftSys managed WordPress hosting the server logs are readily available and our team will trace and fix a 500 error for you, so you are not left guessing at a blank page.


Share via
Did you find this article useful?  

Related Articles

Tags

© Softsys Hosting