Skip to content
Trellis

Roots and WP Packages are independent open source projects, supported only by developers like you. We’ve been improving the WordPress developer experience since 2011, and your support keeps it independent.

Accessing Server Logs in Trellis

View as Markdown:

Accessing logs

Trellis CLI includes a logs command for quickly accessing logs. It automatically integrates with GoAccess when the --goaccess option is used.

$ trellis logs [options] ENVIRONMENT [SITE]
Description Command
View production logs trellis logs production
View access logs only trellis logs --access production
View error logs only trellis logs --error production
View logs in GoAccess trellis logs --goaccess production
View the last 50 log lines trellis logs -n 50 production

Run trellis logs --help for further information.

Location of logs

Server logs for Trellis sites can be found at /srv/www/example.com/logs/:

  • /srv/www/example.com/logs/access.log
  • /srv/www/example.com/logs/error.log

Any server 500 errors or white screen issues should be debugged by viewing the error logs in the /srv/www/example.com/logs/ directory.

Trellis uses the ansible-logrotate role to install and configure logrotate for sites and can be configured by editing group_vars/all/logrotate.yml.

Last updated

Getting Started