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
vendorand without your.envfile. - A MySQL database created; see Plesk databases.
Install the application
- Go to Laravel in the left menu (or the domain's dashboard) and click Install Application.
- Choose the domain and installation path.
- Choose the source: Git repository (remote URL with deploy key) or Laravel skeleton for a fresh project.
- Click Install. The toolkit clones the code, runs
composer installand sets the document root to thepublicfolder 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
- Open the application's dashboard in Laravel Toolkit.
- Open the Environment (or .env) tab and set
APP_ENV=production,APP_DEBUG=false,APP_URLand the database credentials. - 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:runevery minute. See scheduled tasks. - Queues tab: enable queue workers. Plesk keeps
queue:workrunning 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. Runconfig:clearand 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.
