Ubuntu - Create a Laravel Project

Create folder for your project and navigate into it.


Install composer if you haven't already.

Initialize the project through composer.

composer create-project laravel/laravel . 4.2 --prefer-dist  

You should now have the Laravel framework in place. I would recommend taking a look at the composer.json file (below) and adding your own packages under require at this point.

        "name": "laravel/laravel",
        "description": "The Laravel Framework.",
        "keywords": ["framework", "laravel"],
        "license": "MIT",
        "require": {
                "laravel/framework": "4.2.*"
        "autoload": {
                "classmap": [
        "scripts": {
                "post-install-cmd": [
                        "php artisan clear-compiled",
                        "php artisan optimize"
                "post-update-cmd": [
                        "php artisan clear-compiled",
                        "php artisan optimize"
                "post-create-project-cmd": [
                        "php artisan key:generate"
        "config": {
                "preferred-install": "dist"
        "minimum-stability": "stable"


Now you just need to deploy your webserver, or you could use docker to take care of this for you as shown below:

git clone https://github.com/programster/dockerized-laravel.git
cd dockerized-laravel
composer update
cd docker
bash build.sh

Wait for it to finish building before running the container.

bash run-container.sh  


Laravel Docs - Installation



Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites. More info.