Using the Laravel Toolkit with Plesk to Deploy and Host Laravel Apps Print

  • 0

What can you do with the Laravel Toolkit?

  • Install Your Laravel application
  • Configure Your Laravel Application
  • Manage Your Laravel Application
  • Troubleshoot Your Laravel Application
  • Deploy Your Laravel Application
  • Create a simple Laravel application with just a few clicks.
  • No need to install anything else. Get required PHP versions, Composer, Artisan, npm, MySQL database, and Git with one click.
  • No SSH access? No problem! Manage your applications from the Plesk interface. Run Artisan, npm, and Composer commands, manage the .env file and database, review logs – it’s that easy!
  • Pull updates for your Laravel applications from remote Git repositories and configure deployment options.
  • Get your application up and running, hosted, and secured with SSL with no hassle – Plesk takes care of everything.

 

Let us give you a guided tour and walk you through the process of creating your first Laravel application in Plesk.

Install Your Laravel application

First, create a new domain in Plesk by clicking the ‘Add Domain‘ button and then selecting ‘Laravel site’ from the list of available options.

install-laravel-app

 

Don’t worry if you don’t have a domain name for the website yet. For now, you can use a temporary domain name, courtesy of Plesk.

 

install-laravel-website-2

Once the website has been created, Plesk will ask you to choose between installing a default skeleton Laravel application and pulling the application from a remote Git repository. For now, let’s install the skeleton to see the Laravel Toolkit features.

install-laravel-app3

 

Wait a little bit…

laravel-install-app3

 

…and it’s ready!

 

install-laravel-app4

 

…and it’s ready!

 

laravel-app-deployed

 

 

Configure Your Laravel Application

If you gave a mouse a Laravel application, it would ask for a database… or so we suppose. Anyway, let’s carry on and add one for your application.

  1. First, on the Laravel ‘Information‘ dashboard, click the ‘Manage domain‘ button. This will take you to the ‘Hosting‘ dashboard.
  2. Once there, click ‘Databases‘, and then ‘Add Database‘.

 

laravel-config-database1

 

Once the database is created, you need to update the Laravel application configuration file with the information on how to connect to the created database.

  1. On the ‘Hosting‘ dashboard, click the ‘Manage Laravel Application‘ button. This will take you to the Laravel card.
  2. Once there, open the .env file and add the database credentials.

laravel-config-environment

edit-env-laravel

 

The last step: run the ‘artisan migrate‘ command to create a database.
And yes, you can run the ‘artisan‘ utility straight from the Plesk interface. Switch to the ‘Artisan‘ tab, and then choose the ‘migrate‘ command from the list of preloaded commands.

 

laravel-migrate

Manage Your Laravel Application

But wait, there’s more! Specifically, let’s take a look at a few more features that save your time when hosting Laravel applications.

It is worth mentioning that you can quickly call ‘composer‘ and ‘npm‘ commands by simply choosing them from the list of preloaded commands (which I found to be indispensable):

 

 lar-composer

 

If your Laravel application uses Laravel Task Scheduling, so besides the usual ‘artisan schedule:list‘ command, you can quickly review all scheduled jobs on a separate tab.

 

lar-scheduled-tasks

 

Troubleshoot Your Laravel Application

If you configured your application to write its log to a separate file (‘single‘ mode), you can easily access it with using the Plesk Log Browser (click the ‘Logs‘ button on the Laravel ‘Information‘ dashboard).

 

lar-logging

 

Deploy Your Laravel Application

You can easily deploy and update your Laravel application from a remote Git repository.
To do so, switch to the ‘Deployment‘ tab, and then click the ‘Update‘ button. This will pull the latest changes from the repository, and also install the required Composer dependencies.

laravel-deploy

Such a workflow might not be everyone’s first choice, however. What if you need to specify a custom deployment process for the application? Well, as long as you have SSH access, you can add your own deployment script that will be run every time the application is updated.
 
laravel-deploy-2
 

 I hope you’re as excited to try the Laravel Toolkit as we are!


Was this answer helpful?

« Back