Why are errors hidden?
By default, many sites show only a plain message such as "500 Internal Server Error". This is on purpose. Long error text can show private paths and settings to strangers. But when you are fixing a problem, you need the details. Turn them on, find the cause, and then turn them off again.
For PHP sites
PHP is the language behind WordPress and many other sites.
Method 1: Use the .htaccess file
- Open your file manager or an FTP program.
- Turn on hidden files, since the name starts with a dot.
- Open
.htaccessin your site folder, oftenpublic_html. - Add these lines at the top:
php_flag display_errors On
php_value error_reporting E_ALL
This tells PHP to show every error on screen. This only works on some setups. If you get a 500 error after adding them, remove them.

- Save the file and reload your page.
Method 2: Use a PHP file
- Open the page's PHP file.
- Add these lines at the very top, after
<?php:
ini_set('display_errors', 1);
error_reporting(E_ALL);
These two lines switch error display on for that script only.

Method 3: WordPress
- Open
wp-config.php. - Find the line
define('WP_DEBUG', false);. - Change
falsetotrue. - Save and reload.
To write errors to a log file instead of the screen, also add define('WP_DEBUG_LOG', true);. The log appears in wp-content/debug.log.
Using the control panel
Some panels have a PHP settings page. Look for MultiPHP INI Editor or Select PHP Version. Find the display_errors option and switch it on.
Check the error log
Servers also keep an error log. Look for Errors or Logs in your control panel. It lists problems with times and file names.
Turn it off after
- Remove the lines you added, or set the value back.
- Reload your page to confirm the errors are hidden.

Need help reading an error? Open a support ticket with the text.
Quick recap
- Errors are hidden to protect your site.
- Show them temporarily with .htaccess, PHP code or WP_DEBUG.
- Check the error log too.
- Turn the details off when done.