How to Fix HTTP 500 Internal Server Error in WordPress – Complete Guide
Are you trying to resolve the HTTP 500 internal server error on WordPress?
Encountering a 500 Internal Server Error on your WordPress website can be very frustrating, especially since it disrupts the entire site and make the user experience terrible.
This server-side issue is often due to misconfigurations, corrupted files, or resource limitations, which makes identifying the exact cause challenging.
In this guide, we’ll explore what the HTTP 500 error means, its common triggers, and step-by-step methods to resolve it and restore your WordPress site quickly.
What Is the HTTP 500 Internal Server Error?
The HTTP 500 error indicates a general server failure, meaning the server encountered an unexpected condition preventing it from fulfilling a request. Unlike client-side errors, this one typically involves server settings or software configurations, making it more complex to address.
The 500 error is a server-side issue
” The HyperText Transfer Protocol (HTTP) 500 Internal Server Error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. This error response is a generic “catch-all” response. Usually, this indicates the server cannot find a better 5xx error code to response. “
Source : Mozilla Dev Blog
Secure your website with automated backups, comprehensive monitoring and secured updates.
Install WP Umbrella on your websites in a minute and discover a new way to manage multiple WordPress sites.
Get Started for freeCommon Causes of the HTTP 500 Error in WordPress
Before diving into solutions, it’s helpful to know what usually triggers this error. Common causes include:
- New Plugin or Theme Installations: Incompatible plugins or themes can cause server conflicts.
- Corrupt .htaccess File: A corrupted or misconfigured .htaccess file can interrupt server operations.
- PHP Memory Limit: If your WordPress site exceeds the PHP memory limit set by your hosting provider, it may trigger a 500 error.
- Server Configuration Changes: Modifying PHP versions or other server settings can create incompatibilities.
Use WP Umbrella Safe Update Feature to Avoid Error 500
WP Umbrella offers a safe update feature, that prevent WordPress errors to happen during plugins or themes updates.
Fixing HTTP Error 500 on WordPress
Fixing this issue can be challenging since the 500 error never points to a clear cause. However, here’s my troubleshooting checklist:
Method 1: Manually Remove plugins and themes
It is likely that the 500 error you are encountering is a consequence of the last theme or plugin you installed or updated. So, the first thing to do is to remove them.
How to manually remove a plugin or theme if my website is down?
Easier said than done because your site is down and you can’t access the WordPress Admin Dashboard so how do you do that?
You first need an FTP Client. I personally use Filezilla. The software if free and safe.
To use Filezilla and connect to your website, you will need to enter your FTP address, username, and password.
If you don’t know your credential, then check the first emails your hosting company sent you when you signed up. It usually contains your FTP username and password. If you don’t find it, reach out to your hosting support.
Once you are connected, you need to go to /www/wp-content/plugins/ folder.
Then click right on your plugin, and click on delete. Erase one plugin, go back to your browser web, and open a private navigation window.
If this doesn’t work, go to the next step!
Method 2: Restore Corrupted .htaccess File
Sometimes, plugins and themes can also corrupt your .htaccess file, causing the 500 Internal Server Error.
In order to restore your .htaccess file your need to access your WordPress Root directory with your FTP Client (see above).
Then, download the file named .htaccess and open it with your favorite HTML editor.
Delete the contents of the file and copy/paste the code below instead.
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Save the file upload it, and reload your website to see if the issue is fixed. If it is not, then navigate to the next step.
Method 3: Increase PHP Memory Limit
Another way of fixing the 500 internal server error is by increasing the PHP Memory Limit in WordPress.
To increase your PHP Memory Limit in WordPress you need to edit the function.php file by adding these 3 lines of code:
@ini_set(‘upload_max_size’ , ’64M’);
@ini_set(‘post_max_size’, ’64M’);
@ini_set(‘max_execution_time’, ‘300’);
Function.php is also located in WordPress Root Directory.
You can access and edit the file with your FTP client in the same way as the .htaccess file (see above).
Resolving The 500 Internal Server Error on WordPress: Final Thoughts
This problem is really annoying because it affects every page of your website, so you need to fix it quickly. Yet, the 500 Server Error code is vague and not helping much.
If the tips I provided you in this article don’t work, reach out to your hosting provider ASAP.
Also, keep in mind that you are always better safe than sorry and one of the best not to trigger 500 internal server errors is to monitor WordPress PHP error logs and get rid of the plugins that are not strictly essential to your website!