Knowledge Base
MilesWeb / cPanel

Learn to Turn Off PHP Error Reporting

Approx. read time : 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.

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

Pallavi Godse
Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.