X
  1. Home
  2. Developer tools
  3. How do I manage Laravel workers via cPanel?

How do I manage Laravel workers via cPanel?

The feature for managing Laravel workers is available on our Premium and Deluxe web hosting accounts, Agency services, and Managed Servers. If you currently have a Standard web hosting account, you need to upgrade to gain access to the feature.

If you have a website utilising the Laravel framework, you may need to set up workers to manage automated jobs with queues or Horizon. We’ve developed a plugin for cPanel where you can manage those workers, and these instructions detail how.

Access settings for workers

To access the settings for your workers, do as follows:

  1. Begin by logging on to cPanel.
  2. Click the icon Laravel Worker under Advanced.
  3. You will now be able to configure up to two Laravel workers, one for your production environment, and one for staging/development.

Managing workers

Once you accessed the settings for your workers (as described above), you have the following configurable options (settings for production and for staging/development are set up in the same manner):

  • Status: Here you’ll see whether or not the worker is active.
  • Type: What type of worker you’ve set up (Horizon or Queue).
  • Artisan path: The path to the project’s artisan file.
  • Actions: Here you can Start or Stop your worker.

If you deploy new code, you should restart the worker on the server. This can be done via various command through SSH, such as:

For Horizon: php artisan horizon:terminate
For Queue: php artisan queue:restart

It may be a good idea to enter these commands into your post-deploy script, so they are run automatically upon deploy.

Was this article helpful?

Related Articles