Using PHP Composer on Shared Hosting

Managing dependencies for a large PHP hosting project can become a nightmare. PHP powers some of the web’s most widely-used systems—from Facebook to WordPress and much between. There is now a wide library of PHP code you can merge into your project. But tracking so many libraries can get tedious. This is where PHP Composer comes to the rescue. It’s a powerful dependency manager you can run on any Linux command line. In this article, you will learn the following:

PHP Composer comes pre-installed in every InMotion Hosting Shared Hosting plan. That is great news! If you’re thinking about hosting your PHP app with us, we’ve got everything you need to get started.

SSH Into Shared Hosting

In order to run Composer commands, you must have command line access. In order to log into your server, be sure to follow the steps in the InMotion Hosting guides:

Follow whichever procedure is best for your needs.

Running PHP Composer Commands in Shared Hosting

PHP Composer comes pre-installed in your shared hosting account. Once you log into your server’s command line, you can start running commands right. An easy command to start with checks your PHP Composer version number:

$ composer -V

Make sure to use a capital V. To see more commands, ask for help:

$ composer -h

Well done! You’re now running composer commands in shared hosting. Be sure to leave a comment or question below if you have any difficulties.

Christopher Maiorana Content Writer II

Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.

More Articles by Christopher

Was this article helpful? Let us know!