Here we explain how to debug and troubleshoot 500 HTTP Errors sites using File Manager and SSH connection. This involves enabling debugging for PHP and WordPress to help identify the error.
500 Error is a very common error and known as a Blanket Error that browsers display when they can not load the website from the origin server. Identifying the underlying error is the most important first step.
The error message may display as:
500 error Internal Server Request
Related Articles
White Screen/500 HTTP Error on WordPress Website
Create Default WordPress .htaccess
Find Error in Apache
IMPORTANT: This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
NOTE: A 500 error Internal Server Request can happen for a multitude of different reasons. In order to narrow down these reasons, the root user can check the Apache logs to see what errors, if any, are present. In order to check the Apache logs, one must access the server via terminal in either Root WHM using Terminal or using SSH.
- Log into Root WHM
- Navigate to Terminal, located under Server Configuration
NOTE: If this is the first time using this feature, you will be asked to acknowledge understanding of root access in the command line. - Run the following command to view Apache logs:
cat /usr/local/apache/logs/error_log | grep domain.com
REPLACE: Replace domain.com with the specific domain experiencing 500 errors. - To watch the logs live, run the following command:
tail -f /usr/local/apache/logs/error_log | grep domain.com
REPLACE: Replace domain.com with the specific domain experiencing 500 errors.
TIP: This will log any entries live as the server is running. This is done to see if any errors are produced at that time by trying to load the page from a web browser and watching the error log.- To get the error to show in the log, refresh the page with the error
- If the error appears in the log read the error to determine what is causing the issue
TIP: Typically, the file path will give insight as to if that is a plugin issue and which one is a theme issue or something with PHP.
Find Error without Apache
- If the error does not appear in the Apache log, it could be a PHP error issue, and it may help to enable PHP error logging
- If the site is a WordPress Site, it may help to enable WP_DEBUG in the wp-config.php file in the Document Root of the site
CAUTION: When done troubleshooting, remember to disable WP_DEBUG and PHP Error Logging. - If the site is a WordPress site, it can be helpful to test a default .htaccess file or try further troubleshooting steps
Comments
0 comments
Article is closed for comments.