Posts Learn Components Snippets Categories Tags Tools About
/

How to Upgrade Composer to Version 2 in Laravel Forge

Learn how to upgrade Composer to Version 2 in Laravel Forge easily using 1 single command

Created on Nov 18, 2021

1321 views

To upgrade your Composer to Version 2 in Laravel Forge you can follow these 4 very simple steps.

Step 1: SSH into Laravel Forge


First, you will have to SSH into your Laravel Forge by using the SSH command line.
ssh forge@YOUR_IP_ADDRESS_HERE

Step 2: Change to Super User


Now that you have logged in you will have to change to the superuser (You will need to have your root password to run this).
sudo su

Step 3: Upgrade Composer Version


Now to update the composer you can run the self-update command.
composer self-update --2
Do note that you can downgrade to version 1 by using the --1 flag.
composer self-update --1

Step 4: Check New Composer Version


Now to check the new composer version you can use the --version flag on the command line.
composer --version

Other Reads

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

)