Published 5 months ago by mustafaabdujalil
I want to deploy laravel project on cpanle but i want push updates in project by git ???
Any help please
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 http://monkeylogic.com/using-cpanel-to-host-your-git-repository-and-deploy-automatically/
My head hurts just thinking about maintaining something like this....
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