Troubleshooting
This page covers the most common problems when running Unpress.
First checks
Before diving into edge cases, verify these basics:
- you are running from the same directory as your
.env .envis named exactly.envWP_URL,WP_USER, andWP_APP_PASSWORDare present- your WordPress Application Password is still valid
Authentication failures
401 Unauthorized or 403 Forbidden
Usually this means one of three things:
- the WordPress username is wrong
- the Application Password is wrong or revoked
- the WordPress site blocks or customizes the REST API
Try these checks:
- open
https://your-site.com/wp-json/in a browser - verify you are using your WordPress username, not your email address
- create a fresh Application Password and update
.env
.env is ignored
Unpress calls dotenv.config() during config loading, so .env should work automatically.
If it is not working:
- run the command from the directory that contains
.env - remove extra quotes around the full assignment line
- make sure the keys are uppercase
Correct example:
dotenv
WP_URL=https://example.com
WP_USER=admin
WP_APP_PASSWORD=your-app-passwordNo posts were generated
If site/content/posts is empty:
- confirm the source actually contains posts
- for API mode, verify published posts exist in WordPress
- for XML mode, confirm the export file contains post items
- check whether your
types.ymlmaps the content types you expect
Media was not downloaded or rewritten
If images still point at old WordPress URLs or show as broken:
- confirm you used
--download-mediaor a reupload config - verify the original media URLs still work
- confirm the generated
site/mediafolder exists when using local download - confirm S3 or SFTP credentials are valid when using reupload mode
XML migration stopped partway through
Use resume mode:
bash
pnpx @selfagency/unpress --source xml --xml-file ./export.xml --generate-site --resumeIf resume state seems corrupted, delete the checkpoint directory and rerun:
bash
rm -rf ./.unpress/stateAPI migration is slow or rate-limited
Reduce request pressure:
bash
pnpx @selfagency/unpress --concurrency 1 --intervalCap 2 --interval 1000 --generate-siteThat tells Unpress to back off instead of trying to sprint through a guarded WordPress host.
Meilisearch indexing fails
Check:
- the Meilisearch server is running
MEILI_HOSTpoints at the correct URL- the posts directory exists in the generated site
- the API key is correct if your Meilisearch instance requires one
Still stuck?
Collect these details before opening an issue:
- command used
- whether you ran with
pnpx,npx, or local dev CLI - whether you used API or XML mode
- whether
.envwas present - relevant logs or stack trace
Then open an issue at https://github.com/selfagency/unpress/issues.