Skip to content

forkpress logs

forkpress logs reads or follows WordPress, PHP, server, and maintenance logs for a ForkPress site.

Use it when a preview request fails, a background server does not start, or branch maintenance needs inspection.

Usage

Terminal window
forkpress logs [options]

Options

OptionDefaultDescription
--work-dir <path>.forkpressSite state directory whose logs should be read.
--file <name>wpLog file to read. Values: wp, php, php-errors, server, forkpress, gc, all.
-n <lines>, --lines <lines>80Number of lines to print before exiting or following.
-f, --followDisabledKeep printing new log output until interrupted. Requires one concrete log file, not --file all.
--pathsDisabledPrint known log paths instead of log contents.

Log Files

NamePathDescription
wp.forkpress/logs/wp-debug.logWordPress debug log. Critical errors and PHP fatals usually land here.
php, php-errors.forkpress/logs/php-errors.logPHP error_log target for the bundled server.
server.forkpress/logs/php-server.logPHP built-in server access and output log.
forkpress.forkpress/logs/forkpress-server.logForkPress background server wrapper log.
gc.forkpress/logs/gc.logBackground branch garbage-collection log.
allAll known logsReads each known log in sequence.

If a log has not been created yet, ForkPress prints a short message instead of failing.

Examples

Show recent WordPress errors:

Terminal window
forkpress logs --file wp

Follow PHP errors:

Terminal window
forkpress logs --file php --follow

Print only the last 20 server lines:

Terminal window
forkpress logs --file server --lines 20

List log paths:

Terminal window
forkpress logs --paths --file all

Notes

Branch previews disable WordPress’ generic fatal-error recovery screen and add a ForkPress shutdown logger. For branch request fatals, wp-debug.log should include the branch name, request URI, PHP file, line, and fatal message.