Setup PHP error logging

When troubleshooting PHP errors, you will want to review your PHP logs. If you don't have PHP logs to review, use the following process to set up logging:

  1. You should always backup your site before making any changes to your site.
  2. Locate your PHP initialization file.
  3. Edit the file. (cPanel / Plesk / Managed WordPress / VPS)
  4. Place the following line in your initialization file:
    error_log = /path/to/your/webroot/php_error.log
    • error_log is the PHP function that will tell the web server to output your logs to a new file.
    • /path/to/your/webroot/php_error.log is the path to your new log.
      • Make sure to replace /path/to/your/webroot with the actual path your hosting account uses.
      • What is my absolute path? (cPanel / Plesk).
  5. Create the a file named php_error.log in the in the webroot of your hosting.
  6. Restart your PHP processes.(cPanel / Plesk).

Next Steps:

More info


Hjalp denne artikel?
Tak for din feedback. Benyt telefonnummeret til support eller chat-funktionen ovenfor, hvis du vil tale med en kundeservicerepræsentant.
Det glæder os, at vi kunne hjælpe! Er der andet, vi kan gøre for dig?
Beklager. Fortæl os, hvad du fandt forvirrende, eller hvorfor løsningen ikke løste dit problem.