I'd like to know if I can install or use the Laravel PHP framework on any web server without using Composer (PHP package/dependency manager) every time?
I would like to be able to drop my app on to any web server (like a shared server without access to the command line).
If I run composer install
the first time (locally), then all the dependencies should be present, correct?
Then, I should be able to drop it onto any server with all of the files (including the vendor directory)?
If you really wanted to, you could do all the work that Composer does manually, but you definitely should not. Installing Composer is easy, it's just a matter of getting the composer.phar
file and running commands on it.
You do not need to run Composer on your server as well as locally, once you run composer install
or composer update
your project will have all its dependencies available and you can just upload it straight to your server.
You cannot install laravel local without composer in your project.
If you have shared server and you are not able to install composer and run cmd to install a new package or update an existing package.
You can one thing by installing composer on your local machine and install(ex composer require package/name
) or update(ex composer update package/name
) all the packages, then upload your vendor directory on the server with your code. it will work for you same as in your local environment.
NOTE: I strongly recommend that you should use the Laravel with the composer, it is an important part of laravel and you can try to convince your client to provide a server that supports laravel. Please check the link below and you can find the server requirements. https://laravel.com/docs/5.5#installation
On this site you can download everything what you can download also with the composer build tool. But you do not need a composer installation. Of course laravel is also present there: https://php-download.com/package/laravel/laravel
If you don't want to use composer on server then you will have to run composer install/update and download all the libraries locally and then manually upload all those files on the server i.e. Vendor Directory.
In-Case of shared hosting where you can't connect to server with shh there you might have to do that but it will take lot of time to upload all the files on server so I would recommend that you should composer and then download the libraries through composer install/update.
Yes, you can install all project dependencies via composer in your localhost first, and then transfer all the files via FTP to your actual website.
Just download the zip file from github and upload to your htdoc and voilà it will work for you
Success story sharing
exec()
in PHP to run Composer updates but it would be just as easy to run those updates locally and then push the updatedcomposer.lock
andvendor
directory to the server.