git use with a Plesk hosting account
If you use our Web Hosting, WordPress Hosting, Superfast WordPress Hosting or Reseller Hosting services, you can make use of an easy integration with Git in the Plesk control panel we use. You can manage Git repositories and automatically deploy websites. In other words, you can use Git as a system for initial publishing and subsequent updates to your application or Web site.
to the Git administration screen
- Login to the Plesk control panel
- Click on ‘Websites & domains’
- Click on the “Git” button
Add an external Git repository
You can choose a repository with a cloud service such as GitHub, GitLab, Bitbucket or an in-house server.
- Click “Add Storage” to add a Git repository.
- make sure ‘External repository’ is selected
- URL of repository: for example https://github.com/WordPress/wordpress-develop
- if the repository is secured you can now enter a Username and Password
- Name of storage: is filled in automatically
- Search path server: for example, /httpdocs or /httpdocs/subfolder
Note that the folder must exist and its contents will be overwritten!
- URL of repository: for example https://github.com/WordPress/wordpress-develop
After you click ‘Create’ the Repository will be added and cloned.
adjust branch
- Login to the Plesk control panel
- Click on ‘Websites & domains’
- Click on the “Git” button
- Under ‘Branch’, choose another branch in the external repository
After the new branch is selected, it will be published immediately.
adjust deployment path
- Login to the Plesk control panel
- Click on ‘Websites & domains’
- Click on the “Git” button
- Then click on ‘Repository settings’ (see this image)
- At the bottom of the page, change ‘Search path server’ to, for example, /httpdocs/subfolder
Note that the folder must exist and its contents will be overwritten! - Click ‘Apply’ to save the changes and then ‘ Publish Now’ to make the changes active immediately.