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

commandantp's avatar

How To Run Composer Update ?

Hey guys, I am completely new to de production world - so far was only working locally so pardon my dumb questions

I added a require in my composer.json localy and pushed it to forge. How do I run composer update on the server now? Tried from the terminal in the default folder but it says there is no composer.phar...

what am I missing there?

Thanks!

0 likes
4 replies
hettiger's avatar
Level 4

Did you ssh into that forge server and run

composer.phar update

?

if so try

composer update
commandantp's avatar

Ummm!! That was "easy", the composer update worked. Need to read the post about the memory issue because it stopped but thanks!

sitesense's avatar

I have this saved as a recipe. Add it to your own recipes and run, simples :)

if [ -f /swapfile ]; then
 echo "Swap file already exists."
else
 sudo fallocate -l 1G /swapfile
  sudo chmod 600 /swapfile
  sudo mkswap /swapfile
  sudo swapon /swapfile
  echo "/swapfile none swap sw 0 0" >> /etc/fstab
  echo "vm.swappiness=30" >> /etc/sysctl.conf
  echo "vm.vfs_cache_pressure=50" >> /etc/sysctl.conf
  echo "Swap created and added to /etc/fstab for boot up."
fi
1 like
tobyallen's avatar

Another very simple possible solution to this is to clear the view cache.

php artisan view:cache

Please or to participate in this conversation.