{"id":701,"date":"2020-10-01T15:13:12","date_gmt":"2020-10-01T09:13:12","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=701"},"modified":"2020-10-01T15:13:12","modified_gmt":"2020-10-01T09:13:12","slug":"how-to-install-laravel-in-plesk-using-ssh","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/how-to-install-laravel-in-plesk-using-ssh.html","title":{"rendered":"How to Install Laravel in Plesk using SSH"},"content":{"rendered":"\n<p>In plesk, to install laravel, we need to do two prerequisites first. <\/p>\n\n\n\n<ol><li>Enable SSH for the Plesk User:<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-mellowhost-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"fJtDPfmCw7\"><a href=\"https:\/\/mellowhost.com\/blog\/how-to-enable-ssh-in-plesk-user-domain.html\">How to Enable SSH in Plesk User Domain<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to Enable SSH in Plesk User Domain&#8221; &#8212; Mellowhost Blog\" src=\"https:\/\/mellowhost.com\/blog\/how-to-enable-ssh-in-plesk-user-domain.html\/embed#?secret=fJtDPfmCw7\" data-secret=\"fJtDPfmCw7\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>2. Add default PHP binary to Plesk Shell to allow using Composer:<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-mellowhost-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"XYZzcUh93w\"><a href=\"https:\/\/mellowhost.com\/blog\/how-to-run-composer-in-plesk-user-shell-plesk-php.html\">How to run Composer in Plesk User Shell \/ Plesk PHP<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to run Composer in Plesk User Shell \/ Plesk PHP&#8221; &#8212; Mellowhost Blog\" src=\"https:\/\/mellowhost.com\/blog\/how-to-run-composer-in-plesk-user-shell-plesk-php.html\/embed#?secret=XYZzcUh93w\" data-secret=\"XYZzcUh93w\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-mellowhost-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"Es49Ws7ZVp\"><a href=\"https:\/\/mellowhost.com\/blog\/how-to-add-php-in-default-path-for-plesk-how-to-fix-bash-php-command-not-found-for-plesk-user.html\">How to Add PHP in Default Path for Plesk \/ How to Fix -bash: php: command not found for Plesk User<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to Add PHP in Default Path for Plesk \/ How to Fix -bash: php: command not found for Plesk User&#8221; &#8212; Mellowhost Blog\" src=\"https:\/\/mellowhost.com\/blog\/how-to-add-php-in-default-path-for-plesk-how-to-fix-bash-php-command-not-found-for-plesk-user.html\/embed#?secret=Es49Ws7ZVp\" data-secret=\"Es49Ws7ZVp\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Once the above steps are done, now, you may install the laravel installer with the following:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[elastic-keldysh@pl1 ~]$ composer global require laravel\/installer\nChanged current directory to \/var\/www\/vhosts\/elastic-keldysh.139-99-24-82.plesk.page\/.composer\nUsing version ^4.0 for laravel\/installer\n.\/composer.json has been created\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\nPackage operations: 12 installs, 0 updates, 0 removals\n  - Installing symfony\/polyfill-php80 (v1.18.1): Downloading (100%)\n  - Installing symfony\/process (v5.1.6): Downloading (100%)\n  - Installing symfony\/polyfill-mbstring (v1.18.1): Downloading (100%)\n  - Installing symfony\/polyfill-intl-normalizer (v1.18.1): Downloading (100%)\n  - Installing symfony\/polyfill-intl-grapheme (v1.18.1): Downloading (100%)\n  - Installing symfony\/polyfill-ctype (v1.18.1): Downloading (100%)\n  - Installing symfony\/string (v5.1.6): Downloading (100%)\n  - Installing psr\/container (1.0.0): Downloading (100%)\n  - Installing symfony\/service-contracts (v2.2.0): Downloading (100%)\n  - Installing symfony\/polyfill-php73 (v1.18.1): Downloading (100%)\n  - Installing symfony\/console (v5.1.6): Downloading (100%)\n  - Installing laravel\/installer (v4.0.5): Downloading (100%)\nsymfony\/service-contracts suggests installing symfony\/service-implementation\nsymfony\/console suggests installing symfony\/event-dispatcher\nsymfony\/console suggests installing symfony\/lock\nsymfony\/console suggests installing psr\/log (For using the console logger)\nWriting lock file\nGenerating autoload files\n10 packages you are using are looking for funding.\nUse the `composer fund` command to find out more!\n[elastic-keldysh@pl1 ~]$\n<\/pre>\n\n\n\n<p>Once this is done, you may try to install laravel using the laravel command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[elastic-keldysh@pl1 ~]$ laravel new blog\n-bash: laravel: command not found<\/pre>\n\n\n\n<p>But, as you can see it is failed. It&#8217;s because the laravel binary is installed in the following path:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/vhosts\/elastic-keldysh.139-99-24-82.plesk.page\/.composer\/vendor\/bin<\/pre>\n\n\n\n<p>which doesn&#8217;t exist in our $PATH variable. Now you may add the above command to your PATH variable using the following tutorial:<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-mellowhost-blog\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"UZ3zYxUPWJ\"><a href=\"https:\/\/mellowhost.com\/blog\/how-to-update-path-variable-in-linux.html\">How to Update PATH Variable in Linux<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to Update PATH Variable in Linux&#8221; &#8212; Mellowhost Blog\" src=\"https:\/\/mellowhost.com\/blog\/how-to-update-path-variable-in-linux.html\/embed#?secret=UZ3zYxUPWJ\" data-secret=\"UZ3zYxUPWJ\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>I believe, you have already figured it out, it is as simple as the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">PATH=$PATH:\/var\/www\/vhosts\/elastic-keldysh.139-99-24-82.plesk.page\/.composer\/vendor\/bin<\/pre>\n\n\n\n<p>Now, you may run the following to install laravel:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[elastic-keldysh@pl1 ~]$ laravel new blog\n\n _                               _\n| |                             | |\n| |     __ _ _ __ __ ___   _____| |\n| |    \/ _` | '__\/ _` \\ \\ \/ \/ _ \\ |\n| |___| (_| | | | (_| |\\ V \/  __\/ |\n|______\\__,_|_|  \\__,_| \\_\/ \\___|_|\n\nCreating a \"laravel\/laravel\" project at \".\/blog\"\nInstalling laravel\/laravel (v8.0.3)\n  - Installing laravel\/laravel (v8.0.3): Downloading (100%)\n<\/pre>\n\n\n\n<p>So, yeah, as laravel says, Application ready! Build something amazing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In plesk, to install laravel, we need to do two prerequisites first. Enable SSH for the Plesk User: 2. Add default PHP binary to Plesk Shell to allow using Composer: Once the above steps are done, now, you may install the laravel installer with the following: Once this is done, you may try to install &hellip; <a href=\"https:\/\/mellowhost.com\/blog\/how-to-install-laravel-in-plesk-using-ssh.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install Laravel in Plesk using SSH&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[144,272,273,509,150],"tags":[515,481,319,510],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/701"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=701"}],"version-history":[{"count":1,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/701\/revisions"}],"predecessor-version":[{"id":702,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/701\/revisions\/702"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}