-
Notifications
You must be signed in to change notification settings - Fork 0
push command overwrites local changes (implicit pull before push) #38
Copy link
Copy link
Open
Description
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-rootSuggested Fix
Either:
- Remove the implicit pull before push
- Add a
--forceor--no-pullflag to skip the pull step - Add a
--dry-runflag 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels