Deploy laravel project on cpanle

Published 1 week ago by mustafaabdujalil

I want to deploy laravel project on cpanle but i want push updates in project by git ???

Any help please


1 week ago (27,110 XP)

First of all getting a Laravel app to work right in cpanel is going to take some extra configuration to make it work, and work securely. You can do a simple google search on "deploy laravel on cpanel" and you will have a plethora of information around this.

Not only that but you want to be able to push updates by git?

I would recommend if your going that route to rethink you deployment. It would be a lot easier to just use forge + digital ocean / linode but you might try

My head hurts just thinking about maintaining something like this....

1 week ago (175,095 XP)

Thanks @tisuchi and @codenex


This is how i do it

put all your laravel files one directory above the public_html.

so that public_html and your project files are siblings (on the same level) than remove your public html

rm -rf public_html/

now lookup your project working parth (pwd) so

pwd //output should be similar to /home/<username>/<domainname> or something like that

copy that route to your clipboard and make a symlink like this:

ln -s <pwd path>/<laravel project files folder>/public/ <pwd path>/public_html

and that's it

Sign In or create a forum account to participate in this discussion.