Home / Hosting / How To Fix The 500 Internal Server Error On Your WordPress Website

How To Fix The 500 Internal Server Error On Your WordPress Website

500 internal server error

The 500 internal server error can be very frustrating as it doesn’t always have a straightforward solution and it requires a lot of troubleshooting that can waste your time and eat up your patience. Although the internal server error is not specific to WordPress as it can happen with anything else running on a server as well, in WordPress is often caused by plugins or theme functions. There are other possible causes of 500 internal server error in WordPress that are well known like a corrupted .htaccess file or a PHP memory limit. This error might show up only when you are trying to access the administrator area while the rest of your website is working fine. Luckily I am here to help you troubleshoot the internal server error in WordPress.

Be safe: Back up your website

The methods that I present to troubleshoot this error require making a lot of changes in your site’s root directory, thus, in case something goes wrong, it’s highly recommended that you backup your website before you try any of the solutions that I am suggesting.

 

Use an FTP Client

In case you had past experiences using an FTP client, you can skip this part because I’m going to go over how to install and configure one as some methods of troubleshooting the internal server error require it. Of course, you can use the File Manager your host uses, but an FTP client that you embrace is often easier to use and more practical. In case you didn’t know, an FTP client lets you access and edits your site’s files.

There are a lot of FTP clients, but in this case, I am going to use FileZilla. Go to FileZilla’s homepage and click Download FileZilla Client to download the version that works with your operating system.

filezilla download button

Once you’ve downloaded the installer and have installed it on your system, open the client, click File and go to Site Manager. After you’ve done that, click New Site and enter the name of your website.

filezilla_setup

The settings that you need to configure are: Host[your domain name], Port[leave it blank], Protocol[FTP-File Transfer Protocol], Encryption[Only use plain FPT] and Logon Type[Normal].

If your host is using cPanel use the username and password you use to access cPanel. If that’s not the case, just use the login information you use to access your host’s file manager.

Go to Transfer Settings and select the Limit Number of Simultaneous Connections checkbox because you need to set the Maximum Number of Connections to 8 as this keeps your site’s server from blocking your IP address. After you’ve done that, just click Connect to connect to your site’s server.

 

Check if the .htaccess file is corrupted

The first thing you should try when facing this internal server error in WordPress is checking if the .htaccess file is corrupted. You can achieve that by renaming your .htaccess file to something like “.htaccess-old” or “.htaccess.bak”. To rename your .htaccess file, you need to open your WordPress root directory in your FTP client. That’s usually called public_html and if you see folders like wp-includes or wp-admin and wp-content, you know you’re in the right place.

htaccess-rename

Renaming this file is the equivalent of deleting it, therefore, we need to create a new one. You need to go in the administrator area of WordPress and hover over Settings, select Permalinks, scroll down to the bottom of the page and click Save Changes.

If after checking your website the internal server error is gone, then it was caused by a corrupted .htaccess file. This kind of error can also be produced by naming the file improperly, so you better make sure that “.htaccess” is the exact name of the file. In case this didn’t solve your problem, you should check the other solutions that I present.

 

Increase the PHP Memory Limit

Another possible cause of the 500 internal server error is the PHP memory limit. To increase the PHP memory limit, you need to find your wp-config.php file that’s located in your root directory, download it, open the file and add this code under the opening PHP label: define(‘WP_MEMORY_LIMIT’, ’64M’); and upload it back to the server.

memory_limit

If this works, you shouldn’t be too happy because you only fixed the problem temporarily. There’s still something that drains your website’s memory limit, and this should be fixed. It might be a lousy coded plugin or theme function. You should ask your host company to look into the server logs to help you find the cause of the problem.

 

Try deactivating all plugins

If the solutions that I presented above didn’t work, you could try disabling all plugins because, in this case, the 500 internal server error is most likely produced by a plugin. It is also possible that the error is caused by a combination of plugins that don’t work well together. Unfortunately, there are no easy solutions to this problem, so you have to deactivate all your plugins. This can be done by renaming the plugin directory. You can find this folder in the root>wp-content directory.

wordpress plugin folder

 

If deactivating all plugins fixed the error that means that the internal server error is caused by a plugin or by an unfortunate combination of plugins. You should simply try and reactivate each plugin to see where the error comes up. In this way, you will be able to spot the cause of the problem and afterwards you can delete it. You can try replacing the plugin, in case it’s functionalities are especially needed, with a different one. It may be possible that the plugin that you were using was causing the problem, and a replacement might solve the issue.

 

Conclusion

Although this 500 error can be very frustrating and time wasting, it has some efficient solutions. In case nothing that I presented solved the problem you can always ask your hosting provider to look at the server logs to get to the core of the problem. Having that said, make sure you always back up your website and update your plugins regularly to avoid errors.

About Nikhil S

He is one of the co-founders of TBT. He loves to write about WordPress & SEO tutorials also he is a Computer Science Engineering Student.

3 comments

  1. bookmarked!!, I really like your website!

  2. Hello! I’ve been reading your web site for a while now and finally got
    the courage to go ahead and give you a shout out from Huffman Tx!
    Just wanted to tell you keep up the fantastic work!

Leave a Reply

Your email address will not be published. Required fields are marked *