WordPress can encounter issues for a variety of reasons. When it breaks, you will typically experience one of a few symptoms:
- An HTTP error message
- A blank page
- Broken functionality
This guide will focus on troubleshooting one of the most common issues: the HTTP Error 500, which signifies an internal server error. While this error can have multiple causes, four common culprits are:
- Exhausted allocated memory
- A corrupted
.htaccess
file - A corrupted PHP file
- A problematic plugin
1. Allocated Memory Has Been Exhausted
When your WordPress site exhausts the memory allocated to it, you may encounter the HTTP Error 500. To resolve this, you can increase the maximum memory allocation by modifying your wp-config.php
file, located in the root folder of your WordPress installation.
Add the following line of code anywhere within the <?php>
tag:
define('WP_MEMORY_LIMIT', '64M');
After making this change, try reloading your site. If this resolves the issue, investigate which plugins, themes, or processes are consuming excessive memory to prevent future problems.
2. Corrupted .htaccess File
A corrupted .htaccess
file can also trigger the HTTP Error 500. To fix this, you can recreate the file:
- Connect to your site via FTP or your hosting provider’s file manager.
- Locate the
.htaccess
file in the root directory. - Rename the existing file to something like
.htaccess_old
to back it up. - Create a new
.htaccess
file and add the default WordPress configuration:
# 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
- Save the file and reload your site.
If this resolves the issue, the old .htaccess
file was likely corrupted. You can leave the new file in place.
3. Bad Plugin
Faulty or incompatible plugins are one of the most common causes of WordPress errors, including HTTP Error 500. If you can’t log into your WordPress admin panel to disable plugins, follow these steps:
- Connect to your site via FTP.
- Navigate to the
wp-content
folder. - Rename the
plugins
folder toplugins.old
. - Try loading your site again.
If this resolves the issue, all your plugins have been disabled. To identify the problematic plugin:
- Rename
plugins.old
back toplugins
. - Open the
plugins
folder and rename each plugin folder individually (e.g.,pluginname
topluginname.old
), testing your site after each change. - Once the site loads properly, you’ve identified the faulty plugin. Update, replace, or remove it to prevent future errors.
4. Corrupted PHP File
A corrupted PHP file in your WordPress installation or theme can also lead to HTTP Error 500. While this is less common, you can:
- Review recent changes you’ve made to your theme or plugin files.
- Revert those changes if you suspect they’re causing the issue.
- Use FTP to replace corrupted files with fresh versions from WordPress core, your theme, or plugin repositories.
Conclusion
The HTTP Error 500 in WordPress can be frustrating, but identifying the cause is key to resolving the issue quickly. By systematically addressing these four common problems, you can restore your site and prevent future occurrences. If the issue persists, consider consulting your hosting provider or a WordPress expert for further assistance.