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

madala's avatar

Do not run Composer as root/super user! See https://getcomposer.org/root for details

when i tried to run as root user it shows the following message

Do not run Composer as root/super user! See https://getcomposer.org/root for details

0 likes
4 replies
nezarfadle's avatar

You can allow composer to run as root by copy and paste this line into your terminal:

export COMPOSER_ALLOW_SUPERUSER=1

Becasue running composer as root is not advisable, try to use this option with caution

2 likes

Please or to participate in this conversation.