Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kokleng's avatar

Laravel with Cpanel

Is it any way to do this directly from code in laravel?

  1. Create Sub domain and directory
  2. Create Database
  3. Create Database User
  4. Create Database User Password
  5. Set all privileges to Database User
  6. Setup Database User to Database
  7. cd to directory > can create some file, write file, git clone , migrate, seeder ......etc.

I am so lazy to manually the same things again and again in cpanel. :p if it possible, Maybe better to make the application to generate those thing :D.

0 likes
1 reply
Braunson's avatar

While I'm sure it's possible in Laravel directly, the better option is to create a custom shell shell script that Laravel executes with parameters.

tip: If you have access you can leverage the cPanel / WHM API

Please or to participate in this conversation.