How to Use Laravel on Plesk

Laravel is a powerful PHP framework, and Plesk supports all the necessary tools — PHP, Composer, SSH, and custom document root — to run it smoothly.


✅ Requirements

Before you start, make sure your Plesk server has:

  • PHP 8.x installed (Laravel 9+ requires PHP 8.0 or newer)

  • SSH access or File Manager

  • Composer (Plesk CLI or manually)

  • A domain or subdomain ready

  • Laravel app (either new or uploaded project)


Option 1: Install a New Laravel Project via SSH

Step 1: Log in via SSH

Use your Plesk credentials or SSH key to connect:

ssh [email protected]

Navigate to the web root:

cd httpdocs

Step 2: Install Laravel Using Composer

composer create-project laravel/laravel .

This installs Laravel in the current directory (httpdocs).


Option 2: Upload an Existing Laravel Project

Step 1: Zip Your Laravel App

On your local PC, zip your Laravel project folder (excluding vendor if needed).

Step 2: Upload to Plesk

  • Go to Websites & Domains > File Manager

  • Upload and extract your ZIP into the httpdocs folder

Step 3: Install Dependencies

Open SSH or use the Plesk Composer tool, then run:

composer install

Make sure your .env file exists. If not, copy:

cp .env.example .env

Generate the app key:

php artisan key:generate

Step 3: Set the Correct Document Root

Laravel’s public/ folder must be the web root.

To configure this in Plesk:

  • Go to Domains > Hosting Settings

  • Set Document Root to:

    httpdocs/public
    
  • Click OK or Apply


Step 4: Set Folder Permissions

Make sure these folders are writable:

chmod -R 775 storage
chmod -R 775 bootstrap/cache

You can do this via SSH or Plesk File Manager (set permissions via UI).


Step 5: Configure .env File

Set up your database and app environment:

APP_NAME=MikyApp
APP_ENV=production
APP_KEY=base64:XXXXXXXX
APP_URL=https://yourdomain.com

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=your_db
DB_USERNAME=your_user
DB_PASSWORD=your_pass

Step 6: Run Migrations (If Needed)

php artisan migrate

Step 7: Access Your Laravel App

Now visit:

https://yourdomain.com

You should see your Laravel homepage!


Summary

Step Action
Install Laravel SSH: composer create-project
Upload project File Manager or FTP
Set document root httpdocs/public
Install dependencies composer install
Configure .env Set DB and app settings
Fix permissions storage/ and cache/ folders
Migrate database php artisan migrate

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)