Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  cPanel  >  Learn to Turn Off PHP Error Reporting
Top Scroll

Learn to Turn Off PHP Error Reporting

 2 min

Websites generate PHP errors and log in error_log files in the directory where your PHP files are placed. In case you don’t require the error_log file, PHP error logging can be disabled using a simple code.

Steps to Turn Off PHP Error Reporting

Login into your cPanel account and go to the Files section and click on the File Manager.

In the File Manager, click on Settings.

Check the box for the field “Show hidden files” and click on Save.

Select the .htaccess file and click on Edit from the above section.

Now, just add the below code and click on Save Changes.

php_flag display_errors off

Congrats! You have now learned to turn off the PHP error reporting using the .htaccess file.

Also Read:
Steps to Enable PHP Error Logging & Automation

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.