Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Looking for .git advice with cPanel

Discussion in 'General Discussion' started by Tom Flanagan, Mar 10, 2016.

  1. Tom Flanagan

    Tom Flanagan Registered

    Mar 10, 2016
    Likes Received:
    Trophy Points:
    Bridgeview IL
    cPanel Access Level:
    Reseller Owner

    I have a cPanel installation with git installed on the server and I am able to clone/checkout/pull ok but I manually have to copy/rsync files to public_html which feels very cumbersome. On past servers I believe that we set up our git project directory like project_name->docroot. We then checked out our project above public_html and then we had a symlink in public_html that pointed to our docroot folder in the .git repository. I would think that we just make public_html->symlink the docroot but our hosting company is very skittish about doing anything with public_html. Am I just thinking about this the wrong way? The hosting company has not been able to provide any insight on best practices for this.

  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hello :)

    The following third-party URL offers a useful guide on this: Knowledgebase • How to deal with Git on our shared servers (SSH Access)

    Rather than creating a symbolic link from the public_html directory, it might be easier to simply change the document root of the account. Your hosting provider can do this by modifying the configuration file for the account in the /var/cpanel/userdata/$username directory.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice