Wednesday, April 13, 2016

How To Fix A Frustrating 500 Internal Server Error

Errors are an integral part of the website development process. 500 internal server error mostly occurs in the root directory, where your main WordPress files reside. What’s more, this problem can also occur due to any problem on the host’s server.

Experienced developers don’t bother much about 500 internal server errors as it is a generic error and shows up when no other message is suitable. But, if you are new to web development, then this error might bother you a lot as it is considered as one of the most irritating errors that occur in WordPress.

Don’t worry as I told you, errors are quite natural and everyone faces it. All you need to do is to take a deep breath to relax and read this write-up to understand how you can resolve this fixable issue.

However, as a word of caution, this error doesn’t have a simple and straightforward solution, but to save your valuable time and efforts; here I am trying to provide you some techniques to overcome this problem as quickly as possible.

Before jumping into the solution section, try to understand the reason behind this error:

 

Reason behind 500 internal server error

500 internal server errors are not a new thing to WordPress, and they often happen if anything else runs on your server along with your website. For its generic nature, it leaves developers in a state of confusion and doesn’t reveal any clue or idea as to how to overcome this issue. Most developers fail to identify the reason behind this error.

In WordPress, 500 internal server error often happen due to badly coded plugins and/or theme functions. Other possible reasons could be corrupted .htaccess file and/or PHP memory limit.

The unique thing about this error is that it shows up only when you attempt to access the admin area; otherwise, you won’t get any clue as you will see the site working perfectly fine.

Let’s see, how to get rid of this 500 internal server error.

 

Check for corrupt .htaccess file

Whenever you encounter 500 internal server errors, you first ought to check for corrupted .htaccess file.

Start it with the renaming of the file. For instance, you can rename it to .htaccess_err. To get that going, you need to access the file. So, log in to your site using FTP. Once you’re logged in, find your file in the directory where you have folders like WP-admin, WP-content, and WP-includes.

Once you find it, rename it, the reload your website to check if it solved the problem. If yes, then remember to hit the Save button by visiting Settings -> Permalinks. Doing so will generate a new .htaccess file along with proper rewrite rules that protect you from encountering a 404 error.

In a case in which this method fails, try the next step.

 

Increase your PHP memory limit

Another way to fix 500 internal server errors is by increasing the PHP memory limit. This method is used when you encounter an internal server error while accessing your WordPress admin or trying to upload any image after login.

Follow these steps to increase the memory limit:

  1. Create a text file “ini
  2. Paste “memory=64MB” in that file
  3. Save the file
  4. Upload the file in wp-admin folder using FTP

This method, however, is a temporary solution to overcome the problem as you need to identify what exhausted your memory limit in the first place. Maybe this issue happened due to some badly written plugin or a theme function.

If the suggested trick doesn’t work, eventually, you will be left with only one option, and that is to contact your WordPress hosting company to help you find the exact solution to this problem.

 

Disable plugins

If you can easily access your Admin area, then you should deactivate your plugins one by one but keep refreshing your site after each deactivation to check if there is a change. Doing so will let you know which plugin was creating trouble for you.

Once you deleted the plugin, find some other alternative to replace it, if it was crucial for your website.

Now, in the case where you are not able to access your admin area, login to your FTP client. Once you are in, access root directory to explore the WP-content folder. Through this folder, you can access your plugins and other resources. Simply rename your plugins to deactivate/disable them and refresh your site to check for change. If the error disappeared, then the problem was occurring due to a faulty plugin.

 

Re-uploading core files

What if you tried all of the above but the problem still persists? No worries, I’ve got a tip or two more for you. If you’re still having problems, it is advised to re-upload the core files. But before executing this method, first, make a backup of your site, and get a new version of WordPress from their main website.

Once you finished uploading the core files, refresh your site and check for changes. If the error has gone, then it will be confirmed that it was occurring due to some corrupted core file. So, if all else fails, it is always a good idea to re-upload core files to try to fix a 500 internal server error.

 

Contact your host

Unfortunately sometimes even re-uploading won’t help! If nothing works, then you should get in touch with your hosting provider. Keep patience because every problem has a solution. Your hosting provider can help you in several ways. Ask them, to check server logs to notice the issue.

Above all, the steps mentioned above will ensure you that the problem is not occurring in your root directory, which should spark a lightbulb at your hosts end.

 

Wrapping Up

500 internal server errors provide an incredibly irritating experience for WordPress developers and users. On top of that, this issue doesn’t give any clue, reason, or solution. Therefore, it is often rectified through hit and trial methods as mentioned above. I hope that some of my pointers may prove beneficial and will, in the end, reduce your labor and frustration.

Have you ever encountered ever this error? We would love to hear about your experience! Don’t forget to drop your valuable comments below

The post How To Fix A Frustrating 500 Internal Server Error appeared first on GetResponse Blog - Email Marketing Tips.

No comments:

Post a Comment