There was a problem loading the comments.

Git Deployment and Version Control in Plesk

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Keep your code organized and deploy updates with just a few clicks


Step 1: Log in to Your Plesk Control Panel

Go to:

https://yourdomain.com:8443

Log in using your Plesk credentials.

290bb46de49c6ccc4139fa7717c57ac6dd8700f039fca80530972d02fe98e5504a9651c25556a6f7?t=60337742e0e5aa98711d3dd5a720cb9b


Step 2: Go to Your Domain and Open Git

  1. In the left menu, click Websites & Domains

  2. Find the domain or subdomain where you want to set up Git

  3. Click the Git icon (if it's not there, your host may need to enable the Git extension)

52ba319f8ef5588b4d85403bdf2a52a35a5290c063d7df1322a5d872a666e29c1ee45f9b1d8fcfc8?t=4ef6ae2e4f8eb5b56d7dfd20f8b97d75


Step 3: Choose a Deployment Type

Plesk gives you two options:

Option Use When…
Remote Git repository (e.g., GitHub) You push changes from GitHub to Plesk
Local Git repository (on server) You pull changes into Git from your PC using SSH

Choose the one that matches your setup.


Step 4: Connect a Remote Repository (Example: GitHub)

  1. In the Git settings window, choose Remote Git hosting

  2. Paste your repository’s clone URL from GitHub
    Example:

     
    https://github.com/yourusername/your-repo.git
  3. Choose the branch you want to deploy from (usually main or master)

  4. Set the deployment path, e.g., /httpdocs/ if it’s your main site

SSH Key Setup (one-time):

  • Plesk will give you an SSH key

  • Add this key to your GitHub repo’s Deploy Keys section


Step 5: Enable Auto-Deploy (Optional but Recommended)

Check the box:

"Automatically deploy once a push is received"

This way, every time you push changes to your Git repo, Plesk will update your live site automatically.


Step 6: Test Deployment

  1. Make a small change to your code (e.g., update a heading or text)

  2. Push it to your GitHub repo

  3. Go to Websites & Domains > Git, and confirm it deployed

  4. Visit your site and refresh to see the update


Step 7: Manage Deployment Settings

In the Git tab, you can:

  • View commit history

  • Trigger manual deployment

  • Switch branches

  • Disconnect the repo


Why Use Git with Plesk?

Benefit Why It Helps
Version control Track and roll back changes if needed
Automatic deployment No need to manually upload via FTP
Team collaboration Multiple people can work on the same project
Safety Keeps your live site in sync with your codebase

Troubleshooting Tips

  • SSH errors? Make sure you added the public key Plesk shows to GitHub/Bitbucket

  • Deployment not working? Check branch name, repo permissions, and deployment path

  • Scripts not executing? Check file permissions after deployment


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

CAPTCHA

On-Premise Help Desk Software by SupportPal
© Support Portal - WP Lighthost