Home / Snippets / How to Upgrade Composer to Version 2 in Laravel Forge
How to Upgrade Composer to Version 2 in Laravel Forge cover

How to Upgrade Composer to Version 2 in Laravel Forge

1.3K

3 years ago

0 comments

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

notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

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

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this