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

Ivymaster97's avatar

How to create CD with laravel on cPanel?

I am new to the whole deployment process. On my job, we use shared hosting with cPanel, all the time. We would like to create a CD environment for the dev team.

The goal is to have 2 long-lasting branches (main and staging). Pushing on the main branch would also set up the project on the main, production, server, Pushing on the staging branch would set up the project on the staging, testing, server.

How would you approach this problem?

It is required to pull the public folder from GitHub, to the public_html folder on the server. Then pull the rest of the folders from Github, and place them in a separate file, outside the public_html file. Then the paths from the "index.php" file would need to be altered. And the standard processes, like running the migration, would also have to take place.

Any article, video, or answer is greatly appreciated.

0 likes
1 reply

Please or to participate in this conversation.