[Solved] How to install LARAVEL 5


Since you have SSH access do this:

Filesystem

  1. SSH into the server
  2. Change directory to the project root
    • cd /home/< username >
  3. delete the public_html folder
    • rm -rf public_html
  4. create a symbolic link from public to public_html
    • ln -s /home/< username >/public /home/< username >/public_html
  5. Install Laravel dependencies
    • composer install
  6. Change permissions
    • chmod -R 755 *
    • chmod -R 777 storage/ bootstrap/cache/

Checklist

  1. Make sure your environment file uploaded and is proper.
  2. If the server is Apache, make sure you uploaded the .htaccess files.
  3. You probably uploaded all the assets, if so you will not need to do bower or npm.
  4. Restart the server.

**In Case of a Limited Shell Environment

  1. Install Laravel dependencies locally and upload the vendor folder with everything else.
  2. Instead of uploading the whole Laravel app to /home/< username >/ upload it to /home/< username >/public_html.
  3. Modify your /home/< username >/public_html/.htaccess to redirect all requests to the public subfolder.

    # /home/< username >/public_html/.htaccess
    
    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options -MultiViews
        </IfModule>
    
        RewriteEngine On
    
        # Redirect All Requests To The Subfolder
        RewriteRule ^ /public
    
    </IfModule>
    
  4. Make sure you have the proper /home/< username >/public_html/public/.htaccess (GitHub).

    # /home/< username >/public_html/public/.htaccess
    
    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options -MultiViews
        </IfModule>
    
        RewriteEngine On
    
        # Redirect Trailing Slashes If Not A Folder...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)/$ /$1 [L,R=301]
    
        # Handle Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
    
        # Handle Authorization Header
        RewriteCond %{HTTP:Authorization} .
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    </IfModule>
    

3

solved How to install LARAVEL 5