Connect with us

How-To

How to fix the WordPress 500 internal server error

Keep getting the elusive Wordpress 500 internal server error on your site? Here’s how to fix it.

wordpress 500 internal server error
Image: CodeEnlightened

WordPress is the most popular CMS out there, but it isn’t completely free of problems, although the cause at times may be a faulty server setup, URL issues or something else from your own side.

Even though most errors are self-descriptive, such as 404-Page not Found, 503- Temporary Server Error etc.

But in other cases, such as with the 500 Internal Error, it’s not so simple, so throughout this piece, I’ll simply walk you through how to fix the problem.

What is the 500 Internal Server Error?

wordpress error

That’s just the thing, it’s nothing “specific”, and that’s the reason why you don’t exactly get a “description” of what’s wrong.

Because the server is too confused and unable to locate the exact cause of the problem.

And without knowing what to fix, it’s pretty hard to fix anything, don’t you agree?

Even though it’s not specific, over time we’ve figured out that it’s caused by some common problems most of the time, fixing one or all of them generally solves the problems.

Here are the elements or issues which cause the 500 Internal Server Error to reveal itself:

  • Issue with your .htaccess File
  • Lower PHP Memory Limit.
  • Theme issues.
  • Plugin Issues.

Doesn’t matter if the Error is showing up only on your back-end (WpAdmin), or the complete site, here’s how to fix it regardless.

Checking and Solving if it’s a Plugin Issue

Plugins are third-party codes for your WordPress sites which aren’t always as stable, neat or well built as they claim.

As a result, things like the server error can happen. First, you need to determine that it actually is a plugin causing the issue.

To do so, simply disable all your plugins and check the site. If your backend is fine, and only the main site is having the issue, in that case, you can simply log in to your admin panel, and disable the plugins.

wordpress plugin

If you can’t access your Admin dashboard, in that case, login to your Host (Cpanel), or use an FTP client to access your WordPress files.

Then navigate to Wp-Content > Plugins, and simply rename the “Plugins” folder to something else, such as “Checking Plugins”, or anything else.

Once you’ve renamed it, all your plugins get automatically disabled. If the issue really was with plugins, your site should be fine now, so you can manually log in to your Wp Admin dashboard, and start activating these plugins one by one.

Keep doing so till you again get the error, once you do you’ll know that the last plugin you activated caused this issue.

If disabling the plugins (either from the WpAdmin panel, or using FTP/Cpanel) didn’t fix your site, it means the issue isn’t with your plugins, so you can simply rename the folder back to “Plugins”, or activate all the plugins from the admin panel and move on to the next solution.

Fixing a PHP Memory Issue

Let me first give you an idea of what exactly this issue means or why it occurs. Like on a normal computer, your system needs “memory” (RAM) to run various software, doesn’t it?

Similarly, on a WordPress blog too, the blog needs the proper amount of memory to function, and if it’s less than what’s needed, errors show up.

Well no, it’s not rocket-science fixing these problems, all you’ve got to do is, simply open your Wp-config.php file, which you can find in the directory where you’ve installed WordPress.

And copy-paste the following line just before the final line-

define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

Save the file, go back to your site, hit the refresh button, if the internet gods favor you everything should be back to normal.

Theme Issue

A theme too alike a plugin can be responsible for causing the issue. Although the difference is that, unlike a plugin, you only use “one” theme at a time, so either the theme being used is causing the problem, or it isn’t.

The simplest way to know for sure is to simply disable your theme, and choose a different theme.

If that solves your problem well then you just have to either settle for the newer theme or contact the theme provider and ask the issue to be fixed.

If you’re using a “Child theme”, in that case, you can try to delete the child theme, and set the Permalinks structure to “Postname” some users have reported this method solving the issue for them.

If it didn’t for you, and you’ve already tried the other three options listed above, there’s yet hope for you in the final solution below.

.Htaccess File Fix

The .htaccess file is one of the smallest, yet most important files in your WordPress installation.

It can be located in the same directory where you installed your WordPress and can be accessed by simply logging in to your Cpanel or using an FTP client.

All you’ve got to do is, rename the .htaccess file to something like .htaccess_error or anything else.

This will render the .htaccess file useless. So now you need to refresh your site. If the site loads up fine, meaning it was the .htaccess file causing the issue.

But wait, you still need a proper .htaccess file to make sure things run properly, so simply go to your WpAdmin area > Settings > Permalinks, and click on the “Save” button without changing anything.

It’ll auto-generate a new .htaccess file for you and you’re all done.

I believe that’s all the options you’ll ever need to fix your 500 Internal server error folks, although there’s a more detailed post on how to fix the 500 Internet server error on 000Webhost, which you can check out if your problem still isn’t solved.

Final Words

So that’s a wrap folks. Most often than not, these fixes do work out and help you fix the error.

In case it still isn’t fixed, feel free to drop a comment in the comments section and I’ll try to answer to the best of my knowledge to your exact problem.

Comments

More in How-To