How to set up PHP error logging

Reviewing your PHP error logs can be useful if you want to see exactly how or why an error occurred. Before setting this up, you should backup your site first as it will involve altering the coding.

Please note: this process applies to our Web Hosting and Premium Hosting products.

Step 1 of 4

Locate your PHP initialisation file (.user.ini)


Step 2 of 4

Edit the file by placing the following sentence within it:

error_log = /home/your-username/public_html/php_error.log

Ensure that you replace the ‘your-username’ part with your actual hosting account details and that this sentence is in fact the actual path that your account uses.


Step 3 of 4

Set up a file titled php_error.log in the webroot of your hosting account.


Step 4 of 4

Once done, end the PHP process