Deploy from Git repository directly to your ClickPress-hosted WordPress site in under a minute. Moreover, you can connect GitHub, GitLab, or Bitbucket once and ship code with a single click. Additionally, every push to your chosen branch can deploy automatically through a secure webhook.
In this guide, you will learn exactly how to deploy from Git repository, how to test the connection, and how to keep your deployments safe over time.
Deploy from Git repository in 4 easy steps
Step 1: First, open the website you want to deploy from Git repository to. Then, from your ClickPress dashboard, click the Tools tab. Finally, scroll down to the Git card and click Login.

Step 2: Next, fill in the connection details. Pick your Provider — GitHub, GitLab, or Bitbucket. Afterwards, paste your Repository URL and set the Branch to deploy from (it defaults to main).
Additionally, choose a Sync Path — the folder on your site that mirrors the repo. While the default is wp-content, you can also narrow it to wp-content/themes, wp-content/plugins, or a custom path such as wp-content/themes/my-theme when you only want a subset of files deployed.

Step 3: For private repositories, add a Personal Access Token generated from your Git provider. However, public repos don’t require a token at all. Use one of these links to create one:
- GitHub — Personal access tokens (use the
reposcope for private repos) - GitLab — Personal access tokens (use the
read_repositoryscope) - Bitbucket — App passwords (use repository Read permission)

Step 4: Finally, click Connect. ClickPress verifies the repository, pulls the first commit, and generates a secure webhook URL.
Afterwards, copy the webhook URL and add it as a webhook in your Git provider. As a result, every push to the connected branch will trigger a new deploy automatically.

Deploy from Git repository automatically on every push
Once you deploy from Git repository for the first time, the Git Connection panel gives you full control over future deployments. Furthermore, every action is just one click away:
- Deploy Now — instantly pulls the latest commit and applies it to the sync path. Consequently, it’s perfect for ad-hoc pushes.
- Test Connection — confirms that ClickPress can reach the repository and authenticate. In short, a green Connection successful! means credentials, URL, and branch are all valid.
- Auto Deploy on Push — when enabled, every push to the branch deploys automatically through the webhook. Alternatively, switch it off for deploy-on-demand only.
- Branch switcher — swap the active branch at any time. For example, test a feature branch on staging before merging to
main. - Deploy History — every deployment is logged with commit hash, message, and status. Therefore, you can roll back or audit changes easily.

Disconnect a Git repository
If you stop using the integration — for example, when you migrate to a different repository or edit files directly — simply click Disconnect and confirm in the modal.
Your site’s existing files stay exactly as they were after the last deploy from Git. In other words, nothing is removed from your WordPress install. Only the link to the repository is dropped. Moreover, you can reconnect to the same repository, or to a different one, at any time through the same Tools tab.

Best practices to deploy from Git repository safely
Follow these guidelines to keep every deploy from Git repository predictable and recoverable:
- Firstly, keep a cloned staging copy of your site so you can test deploys before pointing Auto Deploy at your production branch.
- Secondly, narrow the Sync Path to just your custom theme or plugin folder. Consequently, a bad deploy can’t overwrite other files.
- Additionally, scope your Personal Access Token to read-only access. After all, ClickPress never needs to write back to your repository.
- Furthermore, if a deploy reports conflicts, ClickPress lists the changed files. Then you can decide whether to force the deploy or reconcile locally first.
- Finally, name your branches clearly (
main,staging,feature/xyz). Also, only enable Auto Deploy on the branch your site actually serves.
In conclusion, if you hit a snag setting up the connection or generating a token, our support team is always available through live chat or by opening a support ticket inside your site management dashboard.