Environment variables reference
Unpress automatically loads .env from the current working directory.
Common .env example
dotenv
WP_URL=https://your-site.com
WP_USER=your-username
WP_APP_PASSWORD=your-app-password
DOWNLOAD_MEDIA=false
MEILI_HOST=http://127.0.0.1:7700
MEILI_API_KEY=
MEILI_INDEX=postsWordPress variables
WP_URL- WordPress site URLWP_USER- WordPress usernameWP_APP_PASSWORD- WordPress Application Password
Optional migration variables
DOWNLOAD_MEDIA- set totrueto enable media download by default
S3 reupload variables
These are used when media.mode is reupload with driver: s3 and no explicit credentials in unpress.yml:
S3_ENDPOINT- Custom S3 endpoint (for S3-compatible storage like MinIO, Wasabi)AWS_REGION- AWS region (default:us-east-1)AWS_ACCESS_KEY_IDorS3_ACCESS_KEY- Access keyAWS_SECRET_ACCESS_KEYorS3_SECRET_KEY- Secret keyS3_FORCE_PATH_STYLE- Set totrueto use path-style addressing
SFTP reupload variables
These are used when media.mode is reupload with driver: sftp and no explicit credentials in unpress.yml:
SFTP_HOST- SFTP server hostnameSFTP_PORT- SFTP port (default:22)SFTP_USER- SFTP usernameSFTP_PASSWORD- SFTP passwordSFTP_PRIVATE_KEY- Path to SSH private key
SCP reupload variables
These are used when media.mode is reupload with driver: scp and no explicit credentials in unpress.yml:
SCP_HOST- SCP server hostnameSCP_PORT- SCP port (default:22)SCP_USER- SCP usernameSCP_PASSWORD- SCP password (when using password authentication)SCP_PRIVATE_KEY- Path to SSH private keySCP_PORT- SCP port (default:22)
Optional Meilisearch variables
MEILI_HOST- Meilisearch base URLMEILI_API_KEY- API key when requiredMEILI_INDEX- target index name
Notes
- flags override
.env .envshould stay local and never be committed- if you use
pnpxornpxfrom another directory, Unpress will read the.envin that directory instead