# How to Set Up Git Integration for an Existing WordPress or Custom PHP Site

> Learn how to set up Git integration for an existing site in xCloud, from selecting a GitHub provider to enabling push-to-deploy in a few easy steps.

xCloud lets you add Git integration to an existing WordPress or Custom PHP site that is not already connected to Git. From the site’s Git tab, you can select a connected GitHub provider, confirm the repository name, review the generated .gitignore, and start the setup in a single flow.

When the setup runs, xCloud creates a private GitHub repository, pushes the current site contents as the first commit, and configures the deploy key and webhook for you. Instead of wiring up a repository and connecting it by hand, you can set everything up from one page and start using push-to-deploy right away.

## Prerequisites for Git setup:

-   Available site types are WordPress or Custom PHP.
-   At least one connected GitHub provider exists for the team.

## Step 1: Open the Site’s Git Tab

First, go to your existing WordPress site. Then go to the site sidebar and click on Git from the navigation menu.

![Set Up Git Integration](/_landing/docs/set-up-git-integration-for-existing-wordpress-or-php-site-image-80.png)

## Step 2: Select Your Provider and Repository

On this page, select your GitHub account from the Git Provider dropdown menu, then enter the repository name you want to deploy.

![Set Up Git Integration](/_landing/docs/set-up-git-integration-for-existing-wordpress-or-php-site-image-79.png)

If the team has no connected GitHub providers, you need to integrate your GitHub account first. Just click on the Manage Git Providers option and connect your account in a few clicks.

![Set Up Git Integration](/_landing/docs/set-up-git-integration-for-existing-wordpress-or-php-site-image-79.png)

## Step 3: Review the Generated .gitignore & Start the Setup

Below the provider and repository fields, you will find a generated .gitignore. For WordPress sites, xCloud pre-populates entries for WordPress core, config, uploads, cache, backups, and environment files. If a protected default entry is removed, xCloud shows a warning before submission.

Once you have confirmed the provider, repository name, and .gitignore contents, click the Setup Git Integration button to proceed. xCloud begins creating the repository, pushing your site contents, and configuring the deploy key and webhook.

![Set Up Git Integration](/_landing/docs/set-up-git-integration-for-existing-wordpress-or-php-site-image-79-7.jpg)

And that’s it. This is how easily you can set up Git integration for existing WordPress and PHP sites easily. After the setup completes and the page is refreshed, xCloud shows the normal Git Settings page for the site.

Still stuck? Feel free to reach out to our **[support team](https://support.xcloud.host/)**.
