---
title: "Installing Laravel"
date: "2016-01-07"
category: "php"
slug: "installing-laravel"
---

Laravel is a PHP framework built around abstraction, enabling you to do more with less code. It runs on PHP and MySQL and works best with a package that includes [[is-terminal-access-available]] access.

## Installation

1. Login to the [[accessing-terminal]]

2. **Prerequisite:** Install [[using-composer]] if not already available.

3. Install Laravel using Composer:

    cd /var/www
    composer create-project laravel/laravel laravel

    Note: "laravel" appears 3 times -- the format is `composer create-project channel/package directory`

4. Set permissions on Laravel's writable directories to permit [[writing-to-files]] for logs, compiled views, and temporary storage:

    cd laravel/
    chmod -R 777 storage bootstrap/cache

5. Connect Laravel to a [[creating-subdomain]] or [[creating-addon-domain]] within the control panel under **Web** > **Subdomains**. Set the [[where-is-site-content-served-from]] to `public/` (e.g., `/var/www/laravel/public`).

### Troubleshooting: Empty Output

Some combinations of Laravel and PHP may produce a blank page. Add the following to the [[htaccess-guide]] file in `public/` via [[changing-php-settings]]:

php\_value output\_buffering 0

## See Also

- [Laravel documentation](https://laravel.com/docs/)
- [[working-laravel-config-cache]]
