Here we explain how to troubleshoot and attempt resolving White screen (Firefox) or 500 HTTP Errors (Chrome) on WordPress sites using File Manager and SSH connection.
This involves enabling debugging for WordPress to help identify the error. We also explain how to reinstall WordPress core files which can help resolve the issue depending on the cause of the error.
500 Error is a very common error and known as a Blanket Error that browsers display when it can not load the website from the origin server.
Turning on Debug Mode
- Log into cPanel for your website
CAUTION: Make a cPanel backup or a backup of the site and database before proceeding with any of the following changes. - Locate the Document Root (website files) of the Domain
- An easy way to do this, is by clicking on Domains. This will show you the domain name and the Document Root (Doc Root) of the website
- Click on the Document Root next to websites name. This takes you directly to that folder in File Manager
- An easy way to do this, is by clicking on Domains. This will show you the domain name and the Document Root (Doc Root) of the website
- Locate the wp-config.php file
- Right click the file and click Edit
NOTE: A Pop-up will appear, advising to take a backup if changing Character Sets. This is only for foreign language developers. Click Edit to proceed. - Scroll down to find Debug located near the bottom of the wp-config.php file
- Change
define('WP_DEBUG', false);
todefine('WP_DEBUG', true);
- Change
- Save the File
Checking Errors
NOTE: Errors will have paths to theme or plugin files with errors and on which line the error is found on.
EXAMPLE:
Fatal Error: /home/userna5/public_html/wp-content/plugins/nameofplugin/filename.php on line ###
Fatal Error: /home/userna5/public_html/wp-content/themes/nameoftheme/filename.php on line ###
- Go back to the website and Refresh the website page to see if the site displays an error
- Results are viewed best if trying to access WordPress dashboard
- If none are displayed, you may also want to try enabling PHP error display and logging
- The error will likely be either a plugin or a theme, so you'll want to try disabling the plugin that is mentioned in the error messages or changing to a different theme, based on the error messages generated
CAUTION: Switching the theme can cause the site styling to break even if the theme is switched back. This is the last resort and if the theme is causing fatal errors, we recommend reaching out to the developer of the theme before trying to switch to a default theme or other theme.
Suspected Website Compromise (Hack)
CAUTION: Though replacing core files is very often harmless, there are rare instances where custom changes to WordPress core files have been made intentionally, and replacing the core files using the method below will overwrite those custom changes. It's always recommended that a backup be generated before these changes are made.
NOTE: Re-installing core files is more of a bandaid fix after a hack until a security professional is able to work on the site. It may restore the site to working order, but there's no guarantee that any hacks will be completely removed.
- Issues like these can also be caused by hacked or corrupt core WordPress files, which you'll find by reviewing the above errors and checking for any mentions of wp-includes
- To re-install Core files, ssh into the appropriate user for the domain
- Locate the Document Root of the domain and navigate to that location
- Run the following command
IMPORTANT: When done troubleshooting remember to go back and turn Debugging back OFF by changingwp core download --version=$(wp core version) --force
define('WP_DEBUG', true);
todefine('WP_DEBUG', false);
and saving the file again. - If troubleshooting up to this point has not led to a resolution, reach out to our Technical Support team and we'll be happy to assist you further