Setup PHP error logging

This article will show you how to set up PHP error logging on your Virtual Private Server.

If you’re experiencing any PHP errors, you can follow the steps below to set up an error log within your server.

Please note: the following article was originally created for our current generation of Virtual Private Servers. As such, these instructions may not be relevant to our previous generation of Virtual Private Servers.

Important: we recommend that you create a backup of your website before getting started.

Step 1 of 4

Find and access your PHP initialisation file (.user.ini).

Step 2 of 4

Enter the following line in your file:

error_log = /your/webroot/path/php_error.log

Be sure to change /your/webroot/path to reflect the actual path that exists in your server.

Step 3 of 4

Once you’ve done this, save and close your file.

Step 4 of 4

A new file will appear within the webroot of your account, which will be called log. Open this file to learn more about these errors.