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
/htdocsto deploy TO .deployignoreFile: Which files or folders to exclude from deployment
By default, the integration syncs your repository as-is. Files in your repository are deployed to the server, and files not in your repository are deleted from the server.
WordPress core files cannot be included. Those files are already symlinked into Pressable sites as read-only.
Getting Started
Prerequisites
- A GitHub account with repository access
- A Pressable site with the GitHub integration enabled (Account Settings → Sites → GitHub Integration click here to go to your Account Settings)
Accounts created after December 10, 2025 use our newest GitHub integration by default, accounts created prior to that date can contact customer support to request a site be moved to the new integration
Initial Configuration
- Navigate to your site’s GitHub Integration settings in MyPressable Control Panel (MPCP) under Advanced → GitHub Integration
- Connect your GitHub account and select your repository
- Choose your deployment branch (typically main or master)
- Configure your deployment paths (see below)
- Create a
.deployignorefile 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 folderwp-content/themes: Deploy only themeswp-content/plugins: Deploy only pluginswordpress/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
- Create a file named
.deployignoreat the root of your repository - Add your exclusion rules using the syntax above
- Commit and push to your repository:
git add .deployignore
git commit -m "Add deployment exclusion rules"
git push origin main
Ensure your .deployignore file is committed and pushed BEFORE activating the integration or triggering a deployment.
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
- Configure your deployment paths
- Click “Save Deployment Paths” and wait for confirmation
- Create and push your
.deployignorefile if needed - Create a backup of your site (recommended)
- Click “Set and Deploy” to trigger your first deployment
Monitoring Deployments
- Check the Git History section in your GitHub Integration settings
- Successful deployments show “deployed” status
- Review your site to verify files deployed correctly (see our guides on connecting to Pressable via SSH and connecting to Pressable via SFTP)
- If issues occur, restore from backup or contact support
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
.deployignorefile 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
.deployignoreconfiguration - Contact Pressable support for assistance
Files are being deleted unexpectedly:
- Add appropriate rules to your
.deployignorefile - 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.