Update installation dependencies
We use Composer to resolve dependencies before you install the Magento software and extensions.
Composer is a separate application that manages PHP dependencies. Before you can install the Magento software, you must perform the following tasks in the order shown:
- Install the Composer software.
- Create the file system owner so Composer can write files to the web server docroot as the correct user.
- Update dependencies in your local root project directory (for example,
/var/www/magento2/).
The Magento root directory is a subdirectory of your web server's docroot.
If the following error displays, see troubleshooting:
file_get_contents(app/etc/NonComposerComponentRegistration.php): failed to open stream: No such file or directory
For you to be able to run the Magento application, make sure you perform all tasks as a user with privileges to write to the web server docroot. One way to do this is to log in as or switch to the switch to the file system owner.
Update dependencies
Update installation dependencies as follows:
-
Log in to your Magento server as the file system owner or switch to that user.
-
Change to the Magento installation directory and run
composer install. Examples:CentOS:
cd /var/www/html/magento2 && composer installUbuntu:
cd /var/www/magento2 && composer installThis command updates package dependencies and can take a few minutes to complete.
The following error might display:
[Composer\Downloader\TransportException]
The "https://repo.magento.com/archives/magento/composer/magento-composer-1.0.2.0.zip" file could not be downloaded (HTTP/1.1 404 Not Found)
If so, create auth.json in the file system owner's <home>/.composer directory and run composer install again.
Set file ownership and permissions
You must set read and write permissions for the web server group before you install Adobe Commerce or Magento Open Source. It is necessary so that the command line can write to the file system. See file ownership and permissions.
data-variant=success
data-slots=text