Step-by-Step Guide To Fix The 500 Internal Server Error On WordPress5 min read

Step-by-Step Guide To Fix The 500 Internal Server Error On WordPress

Few things can be more shocking and frustrating than getting some weird-looking error when you try to access your own site.

The 500 internal server error is one of those common WordPress errors that make you feel locked out of your own house.

What’s worse is that this particular error gives no information about what’s causing the error and how to solve it. It’s like being locked out of your home with no clue how to get in.

If you’re facing the dreaded 500 internal server error on WordPress, you’ve landed on the right page. We’ll help you break in your own site and get your site up and running again.

Step-by-Step Guide To Fix The 500 Internal Server Error On WordPress

First things first, what’s causing the error?

The 500 server error runs on every page of your site and is usually caused by a problem with your host’s server, your site’s file system, or some problem in the root directory.

Because of the generic nature of this problem that can be triggered by various different problems, solving it can be as frustrating as experiencing the error in the first place.

If you don’t know what’s causing the problem exactly, you need to follow different steps to find the culprit first and then bust it.

Hence, fixing the 500 internal server error requires a lot of patience and WordPress security precautions.

With that said, let’s see how we can start our troubleshooting process.

There are three common causes of the 500 internal server error:

  • Corrupted .htaccess file
  • PHP memory limit
  • Problems with plugins

We’ll troubleshoot all three of them and find out which one was causing the problem and then take the steps to fix it.

Checking the .htaccess File

You can access your .htaccess file by logging into your hosting account’s cPanel dashboard and navigating to the File Manager app.

Next, locate your .htaccess file which will be in the same root directory where the folders wp-content and wp-includes are located.

Step-by-Step Guide To Fix The 500 Internal Server Error On WordPress

The .htaccess is a server configuration file that directs the server on how to handle things like redirects and permalinks. To see if this file is causing a problem, you need to troubleshoot by renaming the file to something like .htaccess_old. Just right click on the file and rename it.

Reload your site to see if it’s up and running. If you manage to get your site up, your htaccess file was probably corrupted.

Since you’ve renamed the previous htaccess file, you need to generate a new file now or your post pages will fail to redirect correctly and will give a 404 error.

To do that, simply log into your admin area and go to Settings => Permalinks and without making any changes here, click Save. By doing so, WordPress will automatically create a .htaccess file, which you can see by going to the root directory where you renamed the previous file.

Now, you’ll have two files here: the newly generated .htaccess file and the previous renamed one: .htaccess_old.

You can go ahead and delete the renamed file to keep your directory clean.

If renaming the htaccess file didn’t solve the problem, rename it back to what it was previously and move on to check other problem areas.

Increasing the PHP Memory Limit

PHP Memory limit is another common problem that causes the 500 internal server error. If you’re only facing the problem when trying to access the admin area or trying to upload an image, memory limit is the most probable cause.

So, how do you fix it?

To increase your memory limit, you need to locate the php.ini file in the directory called wp-admin from the file manager app of cPanel.

If you don’t see the file there, you need to create a new blank file and name it php.ini, and then edit it using the Code Editor.

Write the following code in the file:

memory = 128MB

Save the file and then reload your site to see if it solves the problem.

If it did, you need to find out what’s causing your site to use so much memory. It might be some plugin or theme function that’s using it.

If you don’t understand what’s causing the memory drain, you should contact your web hosting provider and ask them to take a look at the logs and see what’s taking up all the memory.

If you think you need more memory like if there is a plugin that requires more memory than what your host provides, you can use the fix above to increase the memory limit.

Still didn’t solve the problem?

Bear with some more troubleshooting.

Check Your Plugins

This troubleshooting is the most time-consuming of all as you need to deactivate all your plugins and then reactivate them one by one to find out which plugin was causing the problem.

Since you don’t have access to the admin area, you need to deactivate your plugins from the file manager app of cPanel.

To do that, locate the plugins folder by navigating to public_html => wp-content => plugins

To deactivate all your plugins at once, simply rename this file to something like plugins_old.

Try reloading your site and see if it’s up and running. If it is, rejoice for a minute as you found the main cause of the problem. The next step is to find out which plugin is actually causing the problem.

To do this, go back to File Manager and rename the plugins file back to what it was previously. And then log into your WordPress admin area and activate all your plugins one by one while keeping an eye on the site to see which one breaks the site.

When you find the plugin that’s causing the error, you need to delete it and find an equivalent or ask their developers to fix it.

And that’s it! Hopefully, these troubleshooting methods helped you find the cause of the frustrating 500 internal server error and fix it as well.

Rate this post

One comment

Leave a Reply