Posts Learn Snippets Categories Tags About

How to Install Laravel in the Current Directory

Learn how to install laravel in the current directory using the command line interface

Created on Jun 27, 2021


Although it's not common you might wonder how to init/install Laravel into the current directory that you have already created. One that I can think of is that you might have created a repository online and when you clone the directory locally there's nothing inside.

To install Laravel in the current directory you can do the following steps. Do imagine you are inside the directory of where you want to place Laravel.
$ laravel new temp

Once the Laravel is created, move out all the content of the "temp" into the current directory.
$ mv temp/* .

Now you can remove the empty "temp" directory.
$ rm temp

Now the current directory will have the newly created Laravel installation and you can git commit and push to the repository.

Created by

PostSrc poster


Full stack developer mainly focusing on the front end side of the web. The main author of PostSrc and loves writing tutorial and guides online.