laravel

How to install Laravel without Composer on your host machine.

Sometimes you need to start a new Laravel project, but you don’t have a composer installed on your computer. It may seem irrelevant but it’s a very common scenario if you work with docker, and you prefer to have everything installed inside the container.

Some projects may require different module management systems and having them all installed would change your hard drive to one big mess. So with some amount of experience of handling multiple projects at once you will come up with a need of having everything installed on the container side instead globally on your host machine.

The best solution is to use Git.

git cliSimply install GIT Cli on your host machine – every programmer needs git installed anyways so you probably have one already.

If you are on Linux:

sudo apt-get install git

If you are on Linux Arch:

sudo pacman -S git

If you are on Windows:

https://cli.github.com/

Time to utilize git and install the Laravel app

laravel

Open terminal, and navigate to the destination directory where Laravel should be installed.

Then just run this command:

git clone https://github.com/laravel/laravel.git .

The dot at the end, just after space that is just after the repository URL is required. It means to clone a repository to the current folder.

That’s all!

Remember to change remote repository to your own using command:

git remote set-url origin <your-repo-url>

otherwise you will be still connected to the official Laravel github repository.

Leave a Reply