🕺
LaravelSharedHosting
  • Some hints and best practices for deploying laravel on shared hosts
  • SiteGround Shared Hosting
    • Introduction
    • Prepare your Laravel project
    • Add a hosting account
    • SSH access to SiteGround space
    • Setup a mysql database
    • Adding a mail account
    • The master folder
    • Create a .env file
    • Connect your server to git
    • Create a deployment script
    • Link this site into your webserver
    • SSL Certificate
    • Setting up a CRON job
    • Running a Queue Worker
    • On-going deployments
    • Deploy from local development
    • Deploy using GitHub Actions
Powered by GitBook
On this page
  1. SiteGround Shared Hosting

The master folder

Create a master folder which will hold

  • the .env file to be copied into each deployment

  • the storage folder so that it survives deployments

If your website name is example.org then navigate to the ~/www/example.org folder. Then execute the following;

mkdir master && cd master && \
mkdir storage && \
mkdir storage/app && \
mkdir storage/app/public && \
mkdir storage/framework && \
mkdir storage/framework/cache && \
mkdir storage/framework/cache/data && \
mkdir storage/framework/sessions && \
mkdir storage/framework/views && \
mkdir storage/logs && \
cd ..

This will create the required empty folder structure for your laravel project's storage

Files that are stored in this storage folder will persist between deployments and give zero downtime.

Note that this folder structure is within the folder named after your site.

PreviousAdding a mail accountNextCreate a .env file

Last updated 2 years ago