Can I hide errors that appear on my website?
If you use WordPress debugging mode to identify errors on your website, it is possible to hide error messages from visitors to your site.
WP_DEBUG allows debugging mode on your website to better track all possible errors. However, you may not want to post them on the website. If you want to hide errors so that they are only available from the log, you must add a line of code when you enable WP_DEBUG:
Log in to your cPanel account (via your customer account or https://www.bmoname.com:2083).
In the Files section of your control panel, click the File Manager icon.
Then open the root directory (public_html) of your website.
Find and open the Wordpress wp-config.php.
Look for the line 'WP_DEBUG' in the file. You should find it in the following line of code:
define( 'WP_DEBUG', false );
Under this code line, add the following additional line:
define('WP_DEBUG_DISPLAY', false);
WP_DEBUG allows debugging mode on your website to better track all possible errors. However, you may not want to post them on the website. If you want to hide errors so that they are only available from the log, you must add a line of code when you enable WP_DEBUG:
Here are the steps to hide errors that appear on your website
Log in to your cPanel account (via your customer account or https://www.bmoname.com:2083).
In the Files section of your control panel, click the File Manager icon.
Then open the root directory (public_html) of your website.
Find and open the Wordpress wp-config.php.
Look for the line 'WP_DEBUG' in the file. You should find it in the following line of code:
define( 'WP_DEBUG', false );
Under this code line, add the following additional line:
define('WP_DEBUG_DISPLAY', false);
Updated on: 21/04/2023
Thank you!