Complete reference for all Movepress commands.
Push files and/or database from a source environment to a destination environment.
movepress push <source> <destination> [options]source- Source environment name (e.g., "local")destination- Destination environment name (e.g., "production")
Sync Options:
--db- Sync database only--files- Sync files (uploads, caches, etc.), excluding git-tracked files by default--include-git-tracked- Include git-tracked files during file syncs
Safety Options:
--dry-run- Preview changes without executing them--no-backup- Skip database backup before import (not recommended)--delete- Delete destination files that don't exist on the source when syncing files (destructive)
Output Options:
-v, --verbose- Show detailed output including rsync/database commands
Note: Tracked files (themes, plugins, WordPress core) should be deployed via Git. For file syncs, Movepress auto-excludes git-tracked files from the local repo; if Git isn’t available, it falls back to excluding common code patterns. Use --include-git-tracked to override and include everything not covered by your movefile excludes. See git-setup command below.
# Push database and files to production
movepress push local production --db --files
# Push database only
movepress push local staging --db
# Push only files (uploads, etc.)
movepress push local production --files
# Preview changes without executing
movepress push local production --db --files --dry-run
# Push with verbose output
movepress push local production --files -v- If no flags are specified, both
--dband--filesare synced by default - Database operations automatically perform search-replace for URLs
- File syncs use a staged workflow: Files are first copied to a temporary directory via silent rsync with excludes written to a temporary
--exclude-fromfile (avoids argument-length issues), URL replacements are applied to the staged files, then you see a preview with counts before confirming the final transfer. Temp dirs and exclude files are cleaned up automatically. - The preview shows directories and file counts based on the staged files. The
wp-content/uploads/directory is collapsed to a single entry with a total file count for readability. - Search-replace happens during staging for both push and pull operations, before the final sync, so the preview reflects the final content
- WordPress core paths are always excluded for safety (
wp-admin/,wp-includes/,wp-content/plugins/,wp-content/mu-plugins/,wp-content/themes/,index.php,wp-*.php,license.txt,readme.html,wp-config-sample.php) - A backup is created before database import unless
--no-backupis used, and the backup path is shown after creation - File syncs are non-destructive by default. Use
--deleteto remove destination files that don't exist on the source. - You'll be prompted to confirm destructive operations (
--deleteor--no-backup) and all file syncs (after seeing the preview) - For tracked files (themes, plugins), use
git push <environment> <branch>after runninggit-setup
Pull files and/or database from a source environment to a destination environment.
movepress pull <source> <destination> [options]source- Source environment name (e.g., "production")destination- Destination environment name (e.g., "local")
Same options as push command (see above).
# Pull database and uploads from production
movepress pull production local --db --files
# Pull database only
movepress pull staging local --db
# Pull only files (uploads, etc.)
movepress pull production local --files
# Preview changes without executing
movepress pull production local --db --files --dry-run- Works exactly like
pushbut in reverse direction - Uses the same staged workflow: Remote files are downloaded to a temporary directory via silent rsync with a temporary
--exclude-fromfile, URLs are updated, you see a preview, then confirm before files are copied to the local destination - Same safety features, backup logging, confirmation prompts, and preview as
push - Search-replace runs on staged files before you confirm the sync; previews come from the staged files
- Remember to use
git pullorgit fetchfor tracked code files
Set up Git-based deployment for a remote environment. This is a one-time setup command that configures a bare Git repository on the remote server with automatic deployment hooks.
movepress git-setup <environment>environment- Remote environment name (e.g., "staging", "production")
- Creates a bare Git repository on the remote server
- Installs a post-receive hook that automatically deploys code to your WordPress directory
- Adds a Git remote to your local repository
# Set up Git deployment for production
movepress git-setup production
# Set up Git deployment for staging
movepress git-setup stagingOnce configured, deploy code changes using standard Git commands:
# Deploy to production
git push production master
# Deploy specific branch to staging
git push staging develop- Only works with remote environments (requires SSH configuration)
- The Git repository path defaults to
/var/repos/{site-name}.gitbut can be customized inmovefile.ymlundergit.repo_path - This command is idempotent - safe to run multiple times
- Requires Git to be installed on both local and remote systems
Initialize a new Movepress configuration by creating template files.
movepress initmovefile.yml- Main configuration file with example environments.env- Environment variables file for sensitive credentials
# Initialize configuration in current directory
movepress init
# Edit the generated files
vim movefile.yml
vim .env- Won't overwrite existing files
- Creates example configuration with local and production environments
- Includes comments explaining each option
Show system tools availability and configured environments.
movepress status [environment]environment(optional) - Show detailed information for specific environment
# Show all environments and tool availability
movepress status
# Show detailed information for production environment
movepress status productionDisplays:
- System tools availability (rsync, mysql, mysqldump)
- List of configured environments
- Environment details (when specific environment is provided)
Validate your movefile.yml configuration file.
movepress validate- YAML syntax errors
- Required fields for each environment
- Database configuration completeness
- SSH configuration (for remote environments)
- URL format validation
- Path accessibility
# Validate configuration
movepress validate- Lists all validation errors with specific details
- Warnings for potential issues
- Success message if no problems found
Test SSH connectivity to a remote environment.
movepress ssh <environment>environment- Environment name to test (must be a remote environment)
# Test SSH connection to production
movepress ssh production
# Test SSH connection to staging
movepress ssh stagingDisplays:
- SSH configuration details (host, user, port, key)
- Connection test result
- Troubleshooting tips if connection fails
- Only works for remote environments with SSH configuration
- Local environments will show an error
- Helps diagnose SSH issues before attempting sync operations
Create a database backup for an environment.
movepress backup < environment > [--output= < directory > ]environment- Environment name to backup
--outputor-o- Directory where backup should be saved (overridesbackup_pathfrom config)
# Backup local database (uses backup_path from movefile.yml or <wordpress_path>/backups)
movepress backup local
# Backup production database (via SSH)
movepress backup production
# Save backup to specific directory
movepress backup production --output=/backups/critical- Shows backup file location
- Displays file size after creation (local environments only)
- Confirms successful backup
- Works for both local and remote (SSH) environments
- Backups are created in the format:
backup_{database_name}_YYYY-MM-DD_HH-mm-ss.sql.gz - You'll be prompted to confirm before creating the backup
- Backup location priority:
--outputflag >backup_pathin config ><wordpress_path>/backups> system temp directory - Configure default backup location in
movefile.yml:production: backup_path: /var/backups/movepress
Run the file-level search/replace manually. Normally Movepress invokes this automatically after syncing files, but you can execute it yourself (locally or remotely) for ad-hoc replacements.
movepress post-files <old-url> <new-url> [--path=<subdir>]- Should be executed from your WordPress root (Movepress scans the current working directory by default)
- Scans the working directory by default;
--pathlets you target a subdirectory such aswp-content/uploads - Only processes known text extensions and skips files that appear binary
# Update theme files remotely (requires movepress installed on the server)
ssh deploy@example.com 'cd /var/www/html && movepress post-files https://example.com https://staging.example.com --path=wp-content/themes/mytheme'- Remote manual runs require the Movepress PHAR installed on the server (default
/usr/local/bin/movepress) - Manual runs are optional;
push/pullalready call this command locally when--filesis used - Untracked file syncs require at least one local endpoint so replacements happen on the machine running Movepress. For remote→remote replacements, run
post-filesmanually on the destination after syncing via other tooling.
These options work with all commands:
-h, --help- Display help for the command-V, --version- Display Movepress version-q, --quiet- Suppress output messages-v, --verbose- Increase verbosity of messages-n, --no-interaction- Do not ask any interactive question--ansi- Force ANSI output--no-ansi- Disable ANSI output
# Show version
movepress --version
# Get help for push command
movepress push --help
# Run without any prompts
movepress push local production --db --no-interactionThese options work with all commands:
-h, --help- Display help for the command-V, --version- Display Movepress version-q, --quiet- Suppress output messages-v, --verbose- Increase verbosity of messages-n, --no-interaction- Do not ask any interactive question--ansi- Force ANSI output--no-ansi- Disable ANSI output
# Show version
movepress --version
# Get help for push command
movepress push --help
# Run without any prompts
movepress push local production --db --no-interactionMovepress uses standard exit codes:
0- Success1- General error2- Validation error (configuration issues)
You can use environment variables in your movefile.yml:
production:
database:
user: ${DB_USER}
password: ${DB_PASSWORD}
port: ${DB_PORT}Define them in your .env file:
DB_USER=production_user
DB_PASSWORD=secret123
DB_PORT=3306