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:
- Any other error logs that have a filesize larger than 0
Viewing Logs via sFTP
- Log into the app via FTP.
- Navigate to
log > appname.
- Grab the log file you want to view.
- .log files are the most “recent” versions
- .log.1 are older versions
- Open the file in Sublime (or your favorite text editor).
Viewing Logs via SSH
- Open PuTTY.
- 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.
- 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
- The log will automatically update if/when a new entry is added to it (e.g., when another error occurs).
- 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).