Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

OstapBrehin's avatar

When deploying on Forge with Laravel Octane, do I need to cache the views & routes as well?

When using Laravel Octane, do I still need to run the following commands?

php artisan config:cache
php artisan route:cache

If so, I'll add them to my deployment script. Here is how my deployment script looks now:

cd /home/forge/some-of-my-apps.com
git pull origin $FORGE_SITE_BRANCH
$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader

if [ -f artisan ]; then
    $FORGE_PHP artisan migrate --force

    ! $FORGE_PHP artisan octane:status || $FORGE_PHP artisan octane:reload
fi

pnpm install
pnpm production

Thanks!

0 likes
1 reply
bugsysha's avatar
bugsysha
Best Answer
Level 61

No, you don't need to run those commands. And make sure that if you want to cache something to use Octane cache.

1 like

Please or to participate in this conversation.