Zero downtime deployments on WP Engine
WP Engine is a managed WordPress hosting platform that provides a secure and optimized environment. However, their SFTP implementation has certain restrictions that can prevent zero downtime (atomic) deployments from working correctly with traditional SSH/SFTP protocols.
The Problem
When attempting to use zero downtime deployments with SSH/SFTP on WP Engine, you may encounter errors during the atomic symlink switching process. This is because WP Engine's SFTP implementation restricts certain file operations required for atomic deployments.
The Solution: Use Rsync Protocol
The Rsync protocol bypasses these SFTP restrictions by using SSH commands directly for all file operations, while still using rsync for efficient file transfers. This allows zero downtime deployments to work correctly on WP Engine.
Configuration Steps
- Navigate to your project's Servers & Groups page
- Click New Server or edit an existing WP Engine server
- Select Rsync as the protocol type
- Enter your WP Engine server details:
- Hostname: Your WP Engine SSH hostname (e.g.,
yoursite.ssh.wpengine.net
) - Port: Leave as default (22)
- Username: Your WP Engine environment name
- SSH Key: Add your DeployHQ project's public key to your WP Engine SSH keys
- Hostname: Your WP Engine SSH hostname (e.g.,
- Enter the deployment path (typically the root of your WordPress installation)
- Enable Zero downtime (atomic) deployment option
- Click Create Server to test the connection
Adding Your SSH Key to WP Engine
- Copy your DeployHQ project's public SSH key from the server configuration page
- Log in to your WP Engine User Portal
- Navigate to your user profile settings
- Go to the SSH Keys section
- Click Add SSH Key
- Paste your DeployHQ public key and save
Benefits of Rsync on WP Engine
- Zero downtime deployments: Atomic symlink switching works correctly
- Efficient transfers: Only changed files are transferred
- Faster deployments: Delta-transfer algorithm minimizes bandwidth usage
- No SFTP restrictions: Uses SSH commands directly, avoiding WP Engine's SFTP limitations
Additional Notes
- Rsync requires SSH key authentication. Password authentication is not supported.
- Rsync is currently a beta feature. Contact support if you need it enabled for your account.
- All other DeployHQ features (build commands, SSH commands, notifications) work normally with Rsync servers.
For more general information about Rsync servers, see Configuring an Rsync server.