How to enable PHP error reporting in cPanel is a crucial task for developers and website administrators who want to debug issues, monitor application behavior, and maintain website stability. Enabling PHP error reporting helps identify errors in real-time, making it easier to fix bugs before they affect your visitors.
In this detailed guide, we’ll walk you through simple methods to activate PHP error reporting directly from your cPanel account.
Why Enable PHP Error Reporting?
Enabling PHP error reporting provides several benefits:
- Quick Bug Detection: Identify coding errors immediately.
- Efficient Debugging: Pinpoint exact error messages for faster troubleshooting.
- Performance Monitoring: Detect deprecated functions or syntax issues.
- Prevent Downtime: Resolve issues before they affect users.
Method 1: How to Enable PHP Error Reporting in cPanel Using MultiPHP INI Editor
This is the most user-friendly way to activate error reporting in cPanel.
Step 1: Log into Your cPanel Account
Access your cPanel account provided by your hosting provider. If you are using Hostrago, go to Login in cPanel.
Step 2: Open MultiPHP INI Editor
- Navigate to the “Software” section.
- Click on “MultiPHP INI Editor.”

Step 3: Select Option Menu
- Go to PHP Sector .
- Click on “Option Menu.”

Step 4: Select Domain and Modify Settings
- Select the domain you want to configure.
- Scroll down to locate the “error_reporting” and “display_errors” options.
- Set display_errors to
On
. - Modify error_reporting to
E_ALL
to log all types of errors. - Click Apply to save changes.

Method 2: Enable PHP Error Reporting via .htaccess File
For more control or if you prefer manual editing, you can modify the .htaccess
file.
Step 1: Access File Manager
- Go to File Manager under the “Files” section in cPanel.
- Navigate to your website’s root directory (usually
public_html
).
Step 2: Edit .htaccess File
- Right-click the
.htaccess
file and select Edit. - Add the following lines to enable PHP error reporting:
php_flag display_errors On
php_value error_reporting E_ALL
- Save the file.
Conclusion
How to enable PHP error reporting in cPanel is a simple but powerful way to maintain website stability and identify issues before they escalate. Both methods described above are beginner-friendly and effective for most hosting environments.
If you’re hosting with Hostrago, you benefit from an intuitive cPanel interface, robust error logging, and 24/7 expert support. Learn more about our Hosting Plans or explore more tutorials in our Knowledge Base.