What's new

Welcome to WebForum | Zimbabwe Web Hosting Forum.

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask question

Ask questions and get answers from our community

Answer

Answer questions and become an expert on all topics.

Contact us

Get in touch with the site administrator directly.

Forum Group

Join the Forum Whatsapp group for daily updates.
  • Thanks for participating in our community, Discuss and Learn. All Forum members are allowed to create threads and posts. Resources posted here should be CLEAN and SAFE. Do not post “offensive” posts, links, or images. Remain respectful of other members at all times.

How to solve 500 Internal Server Error?

The 500 Internal Server Error is a very vague error. In addition to that, there are actually several different issues that can cause the 500 error message to appear. The error will appear to be as follows.

inernal-server-500-error.png

What Causes a 500 Internal Server Error?

If you’re seeing the above error message it means that the server wasn’t able to fulfill a request properly. The Error Code 500 is a general error message and is caused by a mistake in the configuration somewhere on your site or a script that you’re using. It doesn’t tell you specifically what the issue is, as it’s a general error. The most common reasons for a 500 Internal Server Error are:

  • Invalid or Incorrect php.ini file
  • Invalid lines in the .htaccess file
  • Invalid File permissions
  • Invalid script requests
  • Invalid ownership
  • Misconfiguration in the web server configuration.

How to fix a 500 Internal Server Error?

There are several reasons as to what could be causing a 500 Internal Server Error, however, in this guide we will troubleshoot and fix the most common ones. At any step, if you are not able to follow the outlined steps, please get in touch with our support team and they will be happy to assist.

Remove any php.ini files​

The way our cPanel hosting infrastructure is set up does not require you to create your own php.ini files in order to edit or adjust your PHP settings. If you have a php.ini file within the directory of your website, please either remove it or rename it to something like php.ini.bak and try refreshing your website.

Correct your .htaccess file​

This is by far the most common reason for 500 Internal Server Errors. Follow the steps below to troubleshoot this.

Go to the File Manager in your cPanel

file-manager-in-cpanel-1.png

Set your File Manager to show hidden files

show-hidden-files.png

Rename your .htaccess file to something like .htaccess.bak

rename-htaccess-768x433.png


Refresh and check if the error still appears.


If the error no longer appears, then it’s a problem with your .htaccess file. Change it back to the original name (.htaccess) and start removing pieces of the code within the .htaccess file to identify which line is the problem. To do this easily and safely just put a number sign (#) without the parenthesis at the start of one line.

This will “comment out” that line so it’s not “read” when your site is loaded.

Do one line, then check to see if the error persists. If it does, add it to the next line and check again. Once you’ve found the problem line and fixed or removed it, remember to uncomment all the other lines.

If you check all the lines and the problem persists, move on to the next section.

Fix your File Permissions​

Files and folders should have specific permissions set for them. You can see what they’re set to and change them by going to the File Manager in your cPanel and look for “Permissions.” The most common permission for folders should be 0755 and for files it should be 0644. To change the file permissions do as follows.

Login to your cPanel and Open the File Manager

file-manager-in-cpanel-1 (1).png

Change the Permissions as follows

change-file-permission.png

Problems With WordPress Themes And/Or Plugins

Sometimes a 500 error can be caused by WordPress plugin or theme.

If the error shows up after you’ve installed a new plugin:

  • Go to your File Manager
  • Go to the public_html/wp-content/plugins folder
  • Rename the folder for each plugin one at a time
If the error shows after you’ve installed a new theme:

  • Go to your File Manager
  • Go to the public_html/wp-content/themes folder
  • Rename the folder for the theme
If that fixes the site, try reinstalling the theme or plugin. If it throws the error again, simply change the name and leave it.
 

Forum statistics

Threads
115
Messages
176
Members
89
Latest member
denzel
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top