G
G
Garguly Magnievich2020-06-29 11:24:18
Composer
Garguly Magnievich, 2020-06-29 11:24:18

How to install and configure Composer on hosting step by step?

I make the command:

composer init

Next, the installer asks to configure the configuration:

Package name (<vendor>/<name>) [.../public_html]:

What should I enter in this case? I tried to leave all the steps by default, then the installer offered to install the dependencies. I needed a phpWord package, I entered:

Define your dependencies.
Would you like to define your dependencies (require) interactively [yes]?
Search for a package: phpWord


He asked for the version, I indicated the latest one, at the last step the stopper:

Composer could not find a composer.json file in <МОЙ-ПУТЬ>/public_html
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section


Tell me how to do it right or maybe there is a step-by-step instruction for beginners.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nokimaro, 2020-06-29
@chuanyurug

If you enter the command composer initand see a response, then composer is already installed and available for use.
It remains to study the documentation on the use of https://getcomposer.org/doc/01-basic-usage.md

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question