Deploy From GitHub

Last modified: February 11, 2026

Ask Your Favorite AI

Copy the link to a markdown format of this article for ChatGPT, Claude, Gemini, or your favorite AI.

The GitHub integration enables automatic deployment of your code directly from your GitHub repository to your Pressable site. This guide explains how the integration works and how to configure it for your workflow.

How It Works

The GitHub integration synchronizes code from your repository to your site’s server. You can configure:

  • Repository Subdirectory: Which folder in your repository to deploy FROM
  • Destination Path: Where under /htdocs to deploy TO
  • .deployignore File: Which files or folders to exclude from deployment

Getting Started

Prerequisites

Initial Configuration

  1. Navigate to your site’s GitHub Integration settings in MyPressable Control Panel (MPCP) under Advanced → GitHub Integration
  2. Connect your GitHub account and select your repository
  3. Choose your deployment branch (typically main or master)
  4. Configure your deployment paths (see below)
  5. Create a .deployignore file if needed (see below)

Deployment Paths

Repository Subdirectory

The path within your repository to deploy FROM. This tells the system which folder’s contents should be synchronized.

Common Examples:

  • Leave blank: Deploy from repository root
  • wp-content: Deploy only the wp-content folder
  • wp-content/themes: Deploy only themes
  • wp-content/plugins: Deploy only plugins
  • wordpress/wp-content: Deploy from wp-content inside a wordpress subfolder

Destination Path

The path under /htdocs to deploy TO. This tells the system where on your Pressable site’s server the files should be placed.

Common Examples:

  • Leave blank: Deploy to /htdocs (full site)
  • wp-content: Deploy to /htdocs/wp-content/
  • wp-content/themes: Deploy to /htdocs/wp-content/themes/
  • wp-content/plugins: Deploy to /htdocs/wp-content/plugins/

Common Configuration Scenarios

Standard Setup (wp-content folder in repo syncs to wp-content on server):

  • Repository Subdirectory: wp-content/
  • Destination Path: wp-content/

wp-content as Repository Root (your entire repo is just wp-content):

  • Repository Subdirectory: (leave blank)
  • Destination Path: wp-content/

Full WordPress in Repository (entire WordPress installation):

  • Repository Subdirectory: (leave blank)
  • Destination Path: (leave blank)

Themes Only:

  • Repository Subdirectory: wp-content/themes/
  • Destination Path: wp-content/themes/

Plugins Only:

  • Repository Subdirectory: wp-content/plugins/
  • Destination Path: wp-content/plugins/

Using .deployignore

A .deployignore file allows you to control which files and folders are excluded from deployment. The syntax is similar to .gitignore.

When You Need .deployignore

You need a .deployignore file if:

  • You want to preserve existing server files that aren’t in your repository
  • You want to exclude specific files or directories from deployment
  • You need to prevent certain content from being deleted during sync

You do NOT need a .deployignore file if:

  • You want to sync your repository as-is (everything in Git gets deployed, everything else gets deleted)
  • Your repository contains exactly what should be on the server

Syntax Examples

Exclude specific files:

README.md

LICENSE

Exclude by file extension (all levels):

**/*.log

**/*.env

Exclude directories:

node_modules/

.github/

Exclude with wildcards:

wp-content/themes/twenty*/

Allowlist exceptions (exclude everything in a directory except specific items):

Exclude the themes directory:

wp-content/themes/

BUT include your custom theme:

!wp-content/themes/my-custom-theme/

This example excludes all themes but allows my-custom-theme to deploy, preserving other server themes while deploying your custom theme from Git.

Creating and Deploying .deployignore

  1. Create a file named .deployignore at the root of your repository
  2. Add your exclusion rules using the syntax above
  3. Commit and push to your repository:
git add .deployignore

git commit -m "Add deployment exclusion rules"

git push origin main

Automatic Protections

The system automatically protects critical server-managed content, regardless of your repository or .deployignore configuration:

  • WordPress core files (wp-admin/, wp-includes/, wp-*.php)
  • Server-managed content (uploads/, cache/, upgrade/)
  • Managed plugins (pressable-onepress-login, jetpack, akismet)
  • Default themes (twenty*)
  • Critical configuration files (wp-config.php, advanced-cache.php, object-cache.php)

These protections adapt based on your deployment paths.

Deployment Process

Activating Your First Deployment

  1. Configure your deployment paths
  2. Click “Save Deployment Paths” and wait for confirmation
  3. Create and push your .deployignore file if needed
  4. Create a backup of your site (recommended)
  5. Click “Set and Deploy” to trigger your first deployment

Monitoring Deployments

Automatic Deployments

After initial setup, deployments trigger automatically when you push to your configured branch. Each push creates a new deployment in your Git History.

Important Warnings

The integration syncs your repository as-is by default:

  • Files in your repository are deployed to the server
  • Files NOT in your repository are deleted from the server

Before activating:

  • Ensure your .deployignore file is committed if you need one
  • Create a backup if you’re unsure about your configuration
  • Review your deployment paths carefully
  • Test with a staging site if possible

Troubleshooting

Site is broken after deployment:

  • Restore from your pre-deployment backup
  • Review your deployment paths and .deployignore configuration
  • Contact Pressable support for assistance

Files are being deleted unexpectedly:

  • Add appropriate rules to your .deployignore file
  • Commit and push the changes
  • Trigger a new deployment

Deployment shows as failed:

  • Check Git History for error details
  • Verify your repository structure matches your configured paths
  • Contact Pressable support with your deployment ID

Additional Resources

For more information about managing your Pressable site, visit our Knowledge Base.