{"id":17912,"date":"2015-10-19T09:20:13","date_gmt":"2015-10-19T14:20:13","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=17912"},"modified":"2022-12-16T04:37:12","modified_gmt":"2022-12-16T10:37:12","slug":"install-php-composer-on-a-linux-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/","title":{"rendered":"Install PHP Composer on a Linux VPS"},"content":{"rendered":"
<\/div>

\"composer\"PHP is one of the most widely used programming languages for building web applications. Sometimes, when building complex web applications, the developers may found it difficult to manage all the application dependencies as well as the required libraries for the same application. However, PHP will not be such widely used if there is not an appropriate solution for this problem. Like in many programming languages, in PHP one can manage the application dependencies and the required libraries by using Composer. Today we will show you how to install Composer on a Linux VPS<\/a>.
\n<\/p>\n

Before we start, let’s explain what exactly Composer is.
\nComposer is an application-level package manager for the PHP programming language. It is similar for PHP like npm for Node.js and bundle for Ruby. To install the required dependencies for an application, you need to run Composer through the command line. It also provides features like installing applications which are listed at
https:\/\/packagist.org\/<\/a>. Many PHP-based open-source projects, like Laravel for example, use Composer.<\/p>\n

The installation of Composer is fairly easy and straightforward. All you need to have is a Linux VPS with an SSH access and few minutes of your time. First, connect to your virtual server via SSH<\/a>. Then, download and install Composer by executing the following command:<\/p>\n

curl -sS https:\/\/getcomposer.org\/installer | php<\/pre>\n

This should take few seconds. Once the process completes, you can make the ‘composer.phar’ file executable by running the following command:<\/p>\n

chmod +x composer.phar<\/pre>\n

Now, to make Composer globally available for all system users, you can execute the command below:<\/p>\n

mv composer.phar \/usr\/local\/bin\/composer<\/pre>\n

That’s it. You have successfully installed Composer on your system and have made it available for global use. To check the Composer version and verify that the installation was successful, you can run the following command:<\/p>\n

composer -V<\/pre>\n

The output of the command should be similar to this:<\/p>\n

Composer version 1.0-dev (7a9eb02190d334513e99a479510f87eed18cf958) 2015-10-07 10:05:33<\/pre>\n

Having this tool installed on your system means you do not have to search for each dependency for your project written in PHP. In other words, you can use Composer to achieve this and facilitate the process of building a web application. Also, by using Composer, you can easily keep you applications up to date by upgrading the dependencies (e.g. libraries) to the latest version available.<\/p>\n

To learn more about Composer and find out how to get started with using this package manager, our recommendation is to read the official documentation at https:\/\/getcomposer.org\/doc\/<\/a>.<\/p>\n

Also, if you like to start building your first PHP application by using Composer you can check our guide about how to install CakePHP on a Linux VPS<\/a>. There you can find practical use of Composer in PHP-based projects.<\/p>\n

Of course you don\u2019t have to do any of this if you use one of our Linux VPS hosting<\/a> services, in which case you can simply ask our expert Linux admins to install Composer for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"

PHP is one of the most widely used programming languages for building web applications. Sometimes, when building complex web applications, … <\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":17913,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,13,1712],"tags":[932,933],"yoast_head":"\nInstall PHP Composer on a Linux VPS - RoseHosting<\/title>\n<meta name=\"description\" content=\"Install PHP Composer on a Linux VPS - RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install PHP Composer on a Linux VPS - RoseHosting\" \/>\n<meta property=\"og:description\" content=\"Install PHP Composer on a Linux VPS - RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-19T14:20:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-16T10:37:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"356\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Install PHP Composer on a Linux VPS\",\"datePublished\":\"2015-10-19T14:20:13+00:00\",\"dateModified\":\"2022-12-16T10:37:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/\"},\"wordCount\":518,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png\",\"keywords\":[\"composer linux vps\",\"install composer linux\"],\"articleSection\":[\"Tips and Tricks\",\"Tutorials\",\"Web Frameworks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/\",\"name\":\"Install PHP Composer on a Linux VPS - RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png\",\"datePublished\":\"2015-10-19T14:20:13+00:00\",\"dateModified\":\"2022-12-16T10:37:12+00:00\",\"description\":\"Install PHP Composer on a Linux VPS - RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png\",\"width\":300,\"height\":356},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install PHP Composer on a Linux VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install PHP Composer on a Linux VPS - RoseHosting","description":"Install PHP Composer on a Linux VPS - RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/","og_locale":"en_US","og_type":"article","og_title":"Install PHP Composer on a Linux VPS - RoseHosting","og_description":"Install PHP Composer on a Linux VPS - RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2015-10-19T14:20:13+00:00","article_modified_time":"2022-12-16T10:37:12+00:00","og_image":[{"width":300,"height":356,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png","type":"image\/png"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Install PHP Composer on a Linux VPS","datePublished":"2015-10-19T14:20:13+00:00","dateModified":"2022-12-16T10:37:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/"},"wordCount":518,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png","keywords":["composer linux vps","install composer linux"],"articleSection":["Tips and Tricks","Tutorials","Web Frameworks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/","url":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/","name":"Install PHP Composer on a Linux VPS - RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png","datePublished":"2015-10-19T14:20:13+00:00","dateModified":"2022-12-16T10:37:12+00:00","description":"Install PHP Composer on a Linux VPS - RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2015\/10\/composer.png","width":300,"height":356},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/install-php-composer-on-a-linux-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Install PHP Composer on a Linux VPS"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"]},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/17912"}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=17912"}],"version-history":[{"count":4,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/17912\/revisions"}],"predecessor-version":[{"id":44343,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/17912\/revisions\/44343"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/17913"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=17912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=17912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=17912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}