Push and pull changes
You can copy content in both directions between a live website and its staging copy:
- Pull (refresh staging): live → staging. Start from the latest live content.
- Push live: staging → live. Publish what you changed on staging.
Refresh staging from live
Section titled “Refresh staging from live”- Open the Live website.
- Click Clone to staging (on the overview, or in the More menu).
- Choose what to copy (see below). Destination website is the staging copy.
- Click Clone to staging.
The live website is only read. It stays online the whole time.
Push staging live
Section titled “Push staging live”- Open the Staging tab.
- Click Push to live (on the overview, or in the More menu).
- Choose what to copy. Destination website is the live website.
- Click Push live.
Choose what to copy
Section titled “Choose what to copy”Under What should be synchronized?:
- Website files
- Database, either Full database or Selected tables. With Selected tables, tick the tables to copy.
You need at least one of the two. On a shop or a site with comments, push only the files, or only the tables you changed, so new orders and comments made on live since the last refresh are kept.
Files that exist only on the destination
Section titled “Files that exist only on the destination”Delete destination files that do not exist on the source controls files that are on the destination but not on the source, such as images uploaded to live after staging was made.
- On a push it is off by default. Files that exist only on live are kept.
- On a refresh it is on by default, so staging matches live exactly.
Turn it on for a push only if you really mean to remove those files from live.
What happens during a sync
Section titled “What happens during a sync”- A backup first. Netkeel backs up the destination website. It is listed in the destination’s Backups as “Automatic backup before push” or “Automatic backup before staging refresh”.
- The destination pauses while it is changed. The source keeps running.
- Files and the database are copied. The website addresses stored in the copied database are changed to the destination’s address, including in page-builder content.
- Caches are cleared on the destination.
- The destination is checked. If any step fails, Netkeel puts the destination back as it was.
Some files always stay as they are on the destination and are never copied: the website’s wp-config.php and its object cache files. Each side keeps its own database login and Redis setting.
Pushes and refreshes of the same pair wait for each other; they never run at the same time.
Follow and review
Section titled “Follow and review”The sync runs in the background. Follow it in the activity panel.
On the staging copy’s Staging settings, Staging deployment history lists recent runs: Live to Staging or Staging to Live, what was copied, whether it worked, and whether a destination backup was created. The backup is kept with the destination: the live website for a push, the staging copy for a refresh.
Undo a push
Section titled “Undo a push”Open the live website’s Backups and restore the “Automatic backup before push” backup. See Restore a backup.