You may execute arbitrary Bash commands from the Commands panel. Commands are executed from within the site's root directory, e.g. /home/forge/site.com
. If you need to run commands within another directory you may prefix the command with a cd
operation:
cd bin && ./run-command.sh
Commands can be executed from the Site's Commands panel.
Sites that were created with the General PHP / Laravel project type will automatically suggest common Laravel Artisan commands.
Command Input
Commands are not executed within a tty, which means that input / passwords cannot be provided.
The last 10 previously executed commands will be shown within the Command History table. Alongside the command that was run, Forge will also display:
From the Command History table, it's also possible to view the output of the command and re-run the command.
While Recipes also allow you to run arbitrary Bash scripts on your servers, Commands differ in a few, but important ways:
root
user. Commands only run as the site's user, which in most cases will be forge
unless the site is "isolated".php artisan config:cache
.You may grant a circle member authority to run arbitrary commands in a site's directory by granting the site:manage-commands
permission.