Search code examples
ubuntusshcomposer-phpsymfony4

Composer installs new project in root folder


i connect via terminal to my ubuntu server with my root account. I want to install symfony project. My problem is, that this installs in my /root folder. But i want to install the project in the /var/html/ folder.

How must i do this?

TELLO


Solution

  • according to composer manual:

    -d, --working-dir=WORKING-DIR
              If specified, use the given directory as working directory.
    

    BUT if you're using Symfony installer (as described in https://symfony.com/doc/current/setup.html) then:

    composer create-project symfony/website-skeleton /var/html

    should do nicely

    However! ubuntu default www root dir is: /var/www/html/ , not /var/html so check that first.