Are you trying to resolve the HTTP 500 internal server error on WordPress?
The 500 internal server error on WordPress is probably one of the worst you can get because your entire site is down. The 500 internal server errors are very often the consequence of an error in the PHP code.
But you never wrote a single line of code, so how could an error like that happen?
Every time you add a theme or plugin to your WordPress, you are actually adding lines of code. This can, among other things, crash your entire WordPress Website.
In this article, I’ll explain you what is the 500 internal server error and explain you how to fix it!
Table of contents
” 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
The 500 internal serveur error belong to the 5xx status code family.
This category of status Code refers to internal server errors. They occur when a server is not able to accomplish an apparently valid request.
That means something has gone wrong on the web site’s server but the server could not be more specific on what the problem is about.
The 500 Internal Server Error is a server-side issue that can be triggered by:
The 500 internal server error is a frustrating issue because it rarely have a clear cause. Troubleshooting it, might requires a lot of attempts. Here is what I always do when I want to fix the 500 Internal Server Error.
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!
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 500 internal server error is fixed. If it is not, then navigate to the next step.
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).
The 500 internal server error 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!
The White Screen of Death is a common WordPress error that can be easily fixed. Throughout this post, you’ll learn what the White Screen of Death is and how to quickly troubleshoot it.
In this article, I’ll explain you why Facebook might not be showing the correct thumbnail image properly and how to fix this common WordPress issue.
In this article, I’ll show you how to easily turn off PHP errors in WordPress.