🕺
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
  • Importing personal key
  • Mac OS / Windows
  • Create a shortcut / alias
  1. SiteGround Shared Hosting

SSH access to SiteGround space

Generate a local SSH private / public key pair

PreviousAdd a hosting accountNextSetup a mysql database

Last updated 2 years ago

This step will give you command line access to your new hosting account over the very secure SSH protocol. This will be essential for the deployment method we are going to use.

If you already have personal SSH key, you can import this into your Siteground account.

Importing personal key

Under the Devs section of Site Tools, Choose SSH Keys Manager and then click the greyed Import tab.

Give your imported key a name (for your info only).

Navigate to the folder containing your public key and import it.

Optionally, you can restrict access to your server via SSH using specific IPs.

Mac OS / Windows

Follow Siteground SSH instructions

Create a shortcut / alias

You cannot just SSH into your server name, you need to check the credentials within the Siteground control panel

Establishing an SSH tunnel takes the form;

ssh username@hostname -p18765

Probably best to create an alias or shortcut for this!

After SSH into the server from your terminal, type ll to review the directory structure

Our Laravel website will be deployed to the www/ folder. CD to that folder and ll

Our website will be deployed to the folder named after your host, in this example marks364.sg-host.com/

https://www.siteground.co.uk/tutorials/ssh/