- Server operating system version
- Ubuntu
- Plesk version and microupdate number
- 18.0.73
Hey everyone,
I’m hosting a Laravel 12 app on a VPS with Plesk. Right now I’m using Git auto-deployment for a staging environment that pulls the latest changes from GitHub to a subdomain.
Everything works fine, composer install, cache clearing, etc. The only thing I still do manually after each deploy is php artisan migrate via the Laravel Toolkit in Plesk.
When I try to add the migrate command in the “Additional deployment actions” section, it fails. Plesk runs those scripts in a chrooted web-user context, which doesn’t have access to the PHP CLI or the full environment Artisan needs. I do have root access on the server, just not inside the Git deployment task itself.
So I’m wondering if anyone has found a safe or reliable way to trigger migrations automatically on Plesk for a staging setup, or if it’s actually better to keep migrations manual to review schema changes before applying them. Ideally, I’d like to keep the whole CI/CD flow inside Plesk without external scripts or cron jobs.
Auto-deploy works great otherwise, this migration step is the only missing piece before full automation.
Thanks, Harm
I’m hosting a Laravel 12 app on a VPS with Plesk. Right now I’m using Git auto-deployment for a staging environment that pulls the latest changes from GitHub to a subdomain.
Everything works fine, composer install, cache clearing, etc. The only thing I still do manually after each deploy is php artisan migrate via the Laravel Toolkit in Plesk.
When I try to add the migrate command in the “Additional deployment actions” section, it fails. Plesk runs those scripts in a chrooted web-user context, which doesn’t have access to the PHP CLI or the full environment Artisan needs. I do have root access on the server, just not inside the Git deployment task itself.
So I’m wondering if anyone has found a safe or reliable way to trigger migrations automatically on Plesk for a staging setup, or if it’s actually better to keep migrations manual to review schema changes before applying them. Ideally, I’d like to keep the whole CI/CD flow inside Plesk without external scripts or cron jobs.
Auto-deploy works great otherwise, this migration step is the only missing piece before full automation.
Thanks, Harm