Viewing Website Error Logs from ServerPilot

Sometimes it’s necessary to view the logs of a website, to see if there are any issues with the Plugins, etc.

Both “error” logs and “slow” logs can be useful in troubleshooting any issues.

In particular, the files* that would likely be of interest are:

  • appname_php7.0.error.log
  • appname_php7.0.slow.log
  • Any other error logs that have a filesize larger than 0

Viewing Logs via sFTP

  1. Log into the app via FTP.
  2. Navigate to log > appname.
  3. Grab the log file you want to view.
    • .log files are the most “recent” versions
    • .log.1 are older versions
  4. Open the file in Sublime (or your favorite text editor).

Viewing Logs via SSH

  1. Open PuTTY.
  2. Connect to the IP address of the app’s server.
    • Login as: the System User of the app from ServerPilot.
    • Then, paste the password of that System User (right-click will paste it, even though you won’t visually see it), then hit Enter to submit the password.
  3. Type or paste this code to view a “live” view of the current slow log:
    • tail -f log/appname/appname_php7.0.slow.log
    • Change appname to be your app’s name, and change slow to error if trying to view the PHP* error log
    • Press Enter to submit the line to begin viewing the log
  4. The log will automatically update if/when a new entry is added to it (e.g., when another error occurs).
  5. Press Ctrl + C to leave the log view, and then type exit to leave the terminal.

Note: if using a different version of PHP other than 7.0, then make sure to check for your current version’s files instead (e.g., 5.6 or 7.2).

See our featured website design work

Check out some of the beautiful websites we’ve built for over 2,000 clients.

We offer WordPress support & maintenance

Shake the stress of ongoing maintenance with plans supported by our team of WordPress experts.

Related articles