Description
When running elementor-cli push <page_id>, the command appears to pull the current state from WordPress before pushing, which overwrites any local changes made to the page JSON file.
Steps to Reproduce
- Pull a page:
elementor-cli pull 2902
- Modify the local JSON file (e.g.,
.elementor-cli/pages/staging/2902/page.json)
- Run
elementor-cli push 2902
- Check the local file - changes are reverted to match WordPress
- Check WordPress - data is unchanged
Expected Behavior
elementor-cli push should push the local JSON to WordPress without first pulling/syncing from WordPress.
Actual Behavior
The push command reports success, but:
- Local file is reverted to match WordPress state
- WordPress data remains unchanged
Workaround
Update WordPress directly via WP-CLI:
cat .elementor-cli/pages/staging/2902/page.json | jq -c '.elementor_data' | \
podman exec -i juki-wp bash -c 'cat > /tmp/data.json && wp post meta update 2902 _elementor_data "$(cat /tmp/data.json)" --allow-root'
podman exec juki-wp wp elementor flush-css --allow-root
Suggested Fix
Either:
- Remove the implicit pull before push
- Add a
--force or --no-pull flag to skip the pull step
- Add a
--dry-run flag to preview what would be pushed
Related
GitHub Actions run: https://github.com/tomatitito/elementor-cli/actions/runs/22023181059/job/63635530677?pr=36
Environment
- elementor-cli version: (please add)
- Node.js version: (please add)
- OS: macOS
Description
When running
elementor-cli push <page_id>, the command appears to pull the current state from WordPress before pushing, which overwrites any local changes made to the page JSON file.Steps to Reproduce
elementor-cli pull 2902.elementor-cli/pages/staging/2902/page.json)elementor-cli push 2902Expected Behavior
elementor-cli pushshould push the local JSON to WordPress without first pulling/syncing from WordPress.Actual Behavior
The push command reports success, but:
Workaround
Update WordPress directly via WP-CLI:
Suggested Fix
Either:
--forceor--no-pullflag to skip the pull step--dry-runflag to preview what would be pushedRelated
GitHub Actions run: https://github.com/tomatitito/elementor-cli/actions/runs/22023181059/job/63635530677?pr=36
Environment