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

giuseppemastrodonato's avatar

Cache Issue with Forge Auto-Deploy

Hello guys, I'm experiencing an issue with Forge.

Basically when I deploy some code, it looks like it doesn't get updated on the server until i reboot my server from Forge.

The server is hosted on DigitalOcean and I've already tried to do:

  • php artisan cache:clear
  • php artisan view:clear

My Deploy script is:

cd /home/forge/mysite
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader
echo "" | sudo -S service php7.1-fpm reload

if [ -f artisan ]
then
    php artisan migrate --force
fi

What else should I have to do/try?

0 likes
5 replies
bobbybouwmann's avatar

What php version is your server running?

It automatically reloads the FPM from php7.1, but if you run php7.0 or php5.6 you need to update that part of the deploy script

Swaz's avatar

What's not changing, it is just your css?

giuseppemastrodonato's avatar

Nope, I'm referring to changes in PHP classes. Maybe it's something related to OPCache? Anyway I'm updating to PHP 7.2 right now and let's see.

Please or to participate in this conversation.