Deploying a website with Git
Clone a repository into your account with DirectAdmin’s Git feature and pull updates to deploy, keeping secrets and build artefacts out of the repo.
On this page
DirectAdmin’s Git feature clones a repository into your account and pulls updates on demand.
1. Create the repository in DirectAdmin
Open Advanced Features › Git, create a repository, and enter the clone URL. For private repositories, add the deploy key DirectAdmin generates to your Git host as a read-only deploy key.
2. Clone outside public_html
Clone to a folder such as ~/apps/mysite, then publish only the public files, so .git and configuration are never web-accessible. Deploying a PHP application (Composer, Laravel and frameworks)
3. Deploy updates
Use the pull or deploy action after pushing changes.
Keep out of the repository
.envfiles and credentials Storing configuration and secrets outside public_htmlvendor/andnode_modules/unless you commit built artefacts deliberately
If .git must sit inside public_html
Block it:
RedirectMatch 404 /\.gitNew to Traxio? The PHP hosting page lists the PHP versions, database and tools every account gets.
Common questions
Can I use Git on Traxio?
Yes. Git is available, and over SSH on port 26628 you can clone and pull a repository straight into your account, which is a much tidier deployment route than uploading files by hand.
Keep the repository’s working copy outside public_html where you can, and serve only the built output. That way nothing in .git is ever reachable from the web.
Spotted something out of date or unclear? Tell us and we’ll fix it.