In this article we will be walking you through the steps required to successfully diagnose and debug a 500 error. 500 errors can be a pain but if you go through this guide you will be able to address them and that will give you enough information to fix them. Before are the three things that you will be needing to accomplishing this.

  1. SFTP credentials
  2. SFTP client
  3. Text Editor 

500 errors can trigger on  both on the frontend as well as the backend. The first thing you need to know about 500 errors is that it is an indicator of some error in code. The debug log provides you specific details of the error, we are going to be looking for “fatal” errors.

Below is a sample of what a 500 error may look like in your browser.

1

In order to access your debug log you will need to first turn on the debugging and then access the debug log. If you don’t already have access to your site via SFTP, log into your my.pressable.com accout, there your will find a tab named “Users/FTP”

2

Once you are on that page, you will see something similar to what you see below. Note the information you will need is as follows: the URL, Port, Username, and Password (to get password, click on the Reset Password). This information will be needed if to access your site via SFTP.

Pressable_-_My_Site_s_Collaborators

If order to acess your site via SFTP you will need an FTP client, we recommend using Filezilla, this is on both windows and OS X, you can find it here https://filezilla-project.org/. Once you install it you will see something like you see below. When you see that, enter the information you got from your my.pressable.com page and Click Quickconnect.

4

Once you have logged in you will see the directory on the right that will be the folder structure of your website and will look like what you see below. Click on the folder “htdocs”

5

Once you are in that folder you will need to access the file called “wp-config.php”. You will need to right-click on it and select “View/Edit”. This will download the file. After that it should open the wp-config file in your defualt text editor. You will need scroll down and find the section that is pictured below. By default your debug log will be set to false. You will need to change that text to “true”. Be sure to NOT edit anything else in that document as it can render your site unusable. Once you have saved the file, upload it to the same directory by just dragging that file in the directory to overwrite the previous one.

 6

When this happens, this tells WordPress to start logging any errors in code as they happen.  At this point you want to go and recreate the behavior that caused this 500 error. Once you do this, that error is immediately logged to the debug file. To view it, go back to your FTP client and navigate to a folder called “wp-content”.

7

Assuming the error was successfully logged, it will create a file called “debug.log”. This is where you will find the errors. Right-click on this file and hit “View/Edit” which will download that the text file to your computer.

8

Once you have the file open you will see something like you see below. You are going to look for errors that will contain the word “Fatal”.

A fatal error is very likely to cause the functionality of your website to be affected. You will likely see other errors like “notices” or “warnings”, they will not necessarily cause a the functionality of your website to be affected, but they should still be addressed.

9

The above is an example of a debug.log file, the two things that you should really keep an eye out in order to really diagnose the problems are as follows: The arrow on the left shows the kind of error, this is where you would see a fatal error if you are having a grave problem. The arrow on the right is the location of the file that contains the error. Most of the times, it will be an error with either a plugin or a theme. At that point you want to fix that. If you are not sure how to, contact the developer who created that plugin or theme and they should be able to help you out. In the meantime, it would be a good idea to deactivate that plugin and/or theme till you get it resolve.

Hopefully this will help you diagnose those pesky 500 errors. If you have any further questions, please submit a ticket via your my.pressable.com control panel.

1 Star2 Stars (+12 rating, 8 votes)
Loading...

Would you like to find out more about Pressable? Click on the Get Started button below!

Get Started