Git integration in Plesk makes it easier to deploy code changes directly to your website without relying on manual uploads. This guide explains how to work with Git inside Plesk in a practical, step by step way, covering both remote and local repositories.
Plesk can be installed on servers where you have full administrative access, which is common on environments using Plesk hosting.
Before You Begin
Plesk includes built in support for Git and works with both HTTPS and SSH repository connections. You should already have a domain configured in Plesk and access to the Git repository you plan to use.
Git integration is typically used on VPS or server level setups, including cloud servers and other isolated environments where deployment control is required.
Setting Up a Remote Git Repository
A remote repository is used when your code is hosted on platforms such as GitHub or Bitbucket and you want Plesk to pull updates from it.
Step 1: Open Git for the domain
Log in to the Plesk control panel. From the left sidebar, open Websites & Domains, locate the domain, and click the Git icon.
[Screenshot: Websites & Domains section with Git icon]
Step 2: Add a remote repository
Click Add Repository and make sure the option for a remote Git hosting service is selected.
[Screenshot: Add Git repository screen with remote option selected]
Enter the full repository URL. You can use either HTTPS or SSH, depending on how your repository is configured.
Step 3: Choose deployment settings
Select the deployment mode. Automatic deployment is commonly used so changes are applied immediately after updates.
Choose the deployment directory, such as /httpdocs/ or a specific subdirectory.
[Screenshot: Deployment mode and directory selection]
Click OK. Plesk will clone the repository into the selected directory.
To pull new changes later, use the Pull Updates option from the Git interface.
Creating a Local Git Repository
A local repository is useful when you want to push code from your workstation directly to the server.
Step 1: Add a local repository
In Websites & Domains, click the Git icon for the domain and select Add Repository.
[Screenshot: Add Repository button in Git section]
Choose the option to create a local repository in Plesk and enter a name for it.
[Screenshot: Local repository configuration screen]
Step 2: Configure deployment
Select the deployment mode and the directory where files should be deployed, then click OK.
Plesk will create the repository and provide connection details so you can push code from your local machine.
Editing Repository Settings
If you need to change deployment behavior or repository details, you can edit an existing configuration at any time.
Step 1: Open repository settings
Go to Websites & Domains, click the Git icon, and locate the repository you want to modify.
[Screenshot: Git repository list]
Click Repository Settings, make the required changes, and save them.
Practical Notes
- Automatic deployment is useful for small teams and frequent updates
- Manual deployment gives more control for sensitive production changes
- SSH based repositories are recommended for better security
Git integration in Plesk is commonly used on dedicated server environments where full control over deployment workflows is required.
For detailed Git concepts and commands, refer to the official Git documentation.