Setup Laravel On Ubuntu


Updated: 2019-02-24

Installing Laravel


Install Composer

Laravel utilizes Composer to manage its dependencies. Download and install Composer.

Download Composer

Install Composer globally.

Install Composer globally instructions

Test Composer.

Install zip and unzip.

Download the Laravel installer.

Add composer's system-wide vendor bin directory to your $PATH.

Setup New Project

Setup Project

Starting A New Project

I want to put my website files in /var/www/html which is currently owned by root, so I'm gonna change the owner to my user and then change it back. Go to the www directory.

Go into the html directory and create new Laravel project.

Go back to the www directory and change html dir owner back to root.

Set Laravel Permissions

Setting Laravel Directory Permissions

Go to your projects directory /var/www/html/your_project

Change the storage and /bootstrap/cache directories group to www-data.

Change the storage and /bootstrap/cache directories permissions .


Application Key

Set Application Key.


Create cache table.

Laravel Errors

Setup Laravel Error Pages

Publish laravel error pages.