Plesk

Host a Laravel application with Plesk Laravel Toolkit

Install the Laravel Toolkit in Plesk, deploy a Laravel app from Git, set the public document root and .env, run Composer, migrations, the scheduler and queues.

AdvancedPlesk2 min read

Laravel apps need a few things a plain PHP site does not: the document root must point to the public folder, Composer and artisan commands must run on deploy, and the scheduler and queue workers must run continuously. Plesk's free Laravel Toolkit handles all of this from one screen.

Before you start

  • Administrators: install Laravel Toolkit from Extensions → Extensions Catalog. Git and Composer support come with it.
  • A domain or subdomain in Plesk with a PHP version your Laravel release requires (for example PHP 8.2+).
  • Your Laravel code in a Git repository, without vendor and without your .env file.
  • A MySQL database created; see Plesk databases.

Install the application

  1. Go to Laravel in the left menu (or the domain's dashboard) and click Install Application.
  2. Choose the domain and installation path.
  3. Choose the source: Git repository (remote URL with deploy key) or Laravel skeleton for a fresh project.
  4. Click Install. The toolkit clones the code, runs composer install and sets the document root to the public folder automatically.

For private repositories, add the shown SSH key as a deploy key in GitHub or GitLab, as described in deploy from Git in Plesk.

Configure the environment

  1. Open the application's dashboard in Laravel Toolkit.
  2. Open the Environment (or .env) tab and set APP_ENV=production, APP_DEBUG=false, APP_URL and the database credentials.
  3. Generate an application key if needed with the Artisan tab: key:generate.

Run artisan commands

The Artisan tab lists commands you can run with one click, such as migrate --force, config:cache, route:cache and storage:link. Run migrations after the first install and after each deploy that changes the database.

Deployment

  • Enable Quick deployment (webhook) so each push to your branch deploys automatically.
  • Configure deployment scripts: Composer install, NPM build, migrations and cache commands run in order.
  • Use Maintenance mode during deploys that need downtime.

Scheduler and queues

  • Scheduled Tasks tab: enable the Laravel scheduler. The toolkit adds a cron running php artisan schedule:run every minute. See scheduled tasks.
  • Queues tab: enable queue workers. Plesk keeps queue:work running and restarts it after deploys.

Logs

The toolkit's Logs tab shows storage/logs/laravel.log. Web server and PHP errors are in the domain's Log Browser.

Troubleshooting

  • 500 error after deploy: missing APP_KEY, wrong database credentials or a cached config. Run config:clear and check the log.
  • Storage files not found: run storage:link.
  • Composer runs out of memory: raise the PHP memory limit for CLI or run Composer over SSH.
  • Queued jobs never run: queue workers disabled or the queue connection set to sync.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.