Deploy Laravel project to hosting

Deploy Laravel project to hosting



I downloaded the repo and I am trying to deploy it on the host. I moved files on server. Root looks like this:


ROOT-
--lsapp
---app
---bootstrap
---config
---database
---resources
---routes
---storage
...
--public_html
---css
---fonts
---js
---vendor
---index.php
...



In my public_html/index.php I have:


require __DIR__.'/../lsapp/bootstrap/autoload.php';
$app = require_once __DIR__.'/../lsapp/bootstrap/app.php';



But I have an error:


Warning: require(/home/platne/serwer22093/lsapp/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/platne/serwer22093/lsapp/bootstrap/autoload.php on line 17



Fatal error: require(): Failed opening required '/home/platne/serwer22093/lsapp/bootstrap/../vendor/autoload.php' (include_path='.:/usr/local/php56-fpm/lib/php') in /home/platne/serwer22093/lsapp/bootstrap/autoload.php on line 17



I don't know how to fix it.
Maybe I should use composer update --no-scripts in cmd, but I have an error: 'composer' is not recognized as an internal or external command.
When I type composer install I have Could not open input file: composer


composer update --no-scripts


'composer' is not recognized as an internal or external command


composer install


Could not open input file: composer



Could anyone help me deploy this project?





For some reason you've put vendor in public_html instead of lsapp. As for the second bit, have you installed composer on the server?
– Jon Stirling
Aug 31 at 18:18



vendor


public_html


lsapp





is it necessery to install composer on the server ?
– Mac
Aug 31 at 18:28





If you want to use the composer command then yes, if you don't need to run it on the server, then no.
– Jon Stirling
Aug 31 at 18:31





to deploy project i have to use command composer update --no-scripts. I cant install composer
– Mac
Aug 31 at 18:36





Then you can always upload it with your project, it's only the one file and run that from your project dir or something. The main problem is your vendor folder's location though.
– Jon Stirling
Aug 31 at 18:41


vendor




1 Answer
1



First you need to ssh into your hosting server and install composer, once completed you will be able to run composer commands.



If still can't find composer when trying to run it you may need to add it the PATH variable, also check that your PHP version(php -v) is compatible with your Laravel version server requirements.



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế