Composer installs the PHP libraries a project needs. Where you run it depends on your service.

Shared web hosting and WordPress hosting

SSH is not open on our shared hosting server at the moment, so you cannot run Composer on the server itself. Run it on your own computer and upload the result:

  1. On your computer, in your project folder, run composer install --no-dev --optimize-autoloader. Use the same PHP version as your website.
  2. Put the whole project, including the vendor folder, in one .zip file.
  3. Upload the zip with cPanel File Manager and extract it there. Our guide How do I upload a large file via FTP? shows the steps.

If you are not sure which PHP version your website uses, open a support ticket. We answer within one working hour, Monday to Friday, 08:30 to 17:30 (Lagos time).

Linux VPS

On your VPS you have root access, so you can install Composer yourself. Follow the instructions on the official site, getcomposer.org, then run composer install in your project folder.

Composer warns you if you run it as root. For a website, it is better to run it as the user that owns the site's files.

Was this answer helpful? 0 Users Found This Useful (0 Votes)