Stage to live

Build a change on a test site, then copy design and structure to the live site of your client. Live notices what changed there in the meantime and never overwrites it without asking you.

For agencies · Pro Agency or Pro Agency Unlimited · Administrators · Checked with Leitvia Studio 1.3.65 and Leitvia Pro 0.8.55

The whole way in one minute

From the connection to the applied package on the live site Tidepost. The video has no sound; the transcript below has the text of every step.
Transcript of the video
  1. On the live site, open Leitvia Studio, Pro, tab Stage to live.
  2. Enter the address of the stage and the connection key created there.
  3. Compare with stage lists every object that differs, with its status.
  4. Changed on both sides: you decide, Keep live or Take stage.
  5. Create change package puts every change into one package.
  6. In the Inbox, the package shows the difference for each object.
  7. Apply writes the changes, after a snapshot of each object.
  8. Roll back returns the site to the state before the package.

Before you start

  • Both sites run Leitvia Studio and Leitvia Pro with an active license of Pro Agency or Pro Agency Unlimited. Without one of these plans the tab Stage to live is missing.
  • You are an administrator on both sites.
  • The live site reaches the stage over HTTPS. A stage behind a login of the web server, or in a private network, cannot answer.
  • Both sites use the same theme. Templates and template parts travel for the active theme only.

What travels and what stays

Travels from stage to liveNever travels
Token setsPosts, pages and their content
Global styles, with the style variationMedia
Edited templates and template partsOrders, customers and users
Navigation menusSettings of the site
Patterns saved in the Pattern LabAny personal data
The content model (types, fields, relations)Deletions: an object only live has stays

So the usual workflow is: content is edited on live by your client, design and structure are built on stage by you. Neither gets in the way of the other.

Connect the two sites

  1. On the stage, open Leitvia Studio › Pro, tab Stage to live, and choose Create connection key. The key appears in the field Connection key of this stage. Copy it.
  2. On the live site, open the same tab. Under This site as live site, enter the Address of the stage (starting with https://) and paste the key into Connection key.
  3. Choose Save connection.

The live site now knows its stage and shows the button Compare with stage.

The tab Stage to live on the live site: under This site as live site the fields Address of the stage and Connection key, the button Save connection and the button Compare with stage.
The live site with the address and key of its stage.
The tab Stage to live of the screen Leitvia Pro in Leitvia Studio. Under This site as stage a connection key of 48 characters in a read-only field, below it the buttons Replace key and Stop serving as stage.
The stage after Create connection key. Copy the key from here.

Replace key makes a new key; the old one stops working at once. Stop serving as stage switches the stage off. Do this once a project is live and the test site is no longer needed.

Compare and decide

On the live site, choose Compare with stage. The table Comparison lists every object that differs and what will happen to it. Nothing changes yet.

The table Comparison on the live site Tidepost with four rows: the token set SaaS and software and the template part Header, both changed on stage and to be updated; the template part Footer, changed on stage and on live, with the choice Keep live; the pattern Pricing FAQ, new on stage. Below it the note that nothing changes until the package is applied, and the button Create change package.
The comparison names each object and what will happen to it. Only the footer needs a decision.
StatusWhat happens
New on stageLive gets it.
Changed on stageLive is updated.
Changed on live onlyStays as it is on live, even if live deleted it.
Changed on stage and on liveA conflict. You choose Keep live (the default) or Take stage.
The sameNothing. The row is not listed, only counted.

At the first comparison of two sites, every difference counts as changed on both sides, and you decide each one once.

Apply the package

  1. Choose Create change package. Nothing on the site changes yet: the package lands in the Inbox, named Stage to live with date and time.
  2. Open Leitvia Studio › Inbox and the package. Each object shows its difference to live: block by block for templates, parts, menus and patterns, field by field for styles, token sets and the content model.
  3. Leave the objects you want ticked and choose Apply selected.
The Inbox of Leitvia Studio with the package Stage to live. A list of the changed objects with a check box each, the difference of the header below, and the button Apply selected.
The package in the Inbox, before applying. Every object can be left out.

The changes are live. Leitvia Studio saved a copy of each object before. If an object changed on live between creating and applying the package, the Inbox names it and leaves it alone.

Undo

An applied package shows Roll back in the Inbox. It restores every object, and the next comparison offers the same changes again. A package you reject changes nothing. A choice of Keep live counts at once: the next comparison lists that object as changed on live only.

The package Stage to live in the Inbox after applying, marked as applied, with the button Roll back.
After applying, the package offers Roll back.

With WP-CLI

The package is an ordinary change package of Leitvia Studio. Once it exists, WP-CLI lists, applies and rolls it back like any other. Each command runs as a user, so add --user with an administrator:

wp leitvia package list --user=admin
wp leitvia package apply <id> --user=admin
wp leitvia package rollback <id> --user=admin

The comparison itself runs on this screen only, because a person decides the conflicts. AI agents see the package in the Inbox, but cannot start a comparison.

Limits and error messages

You seeCause and fix
The tab Stage to live is missingNo active license of Pro Agency or Pro Agency Unlimited on this site. Check under Leitvia Studio › Pro.
Too many requests. Try again in a minute.The stage hands out at most 10 packages per minute to all live sites together. Wait a minute.
The package is larger than 2 MB, or The package holds too many objects.A package holds at most 2 MB and 500 objects. Remove unused patterns or menus on the stage.
An object is named as left outIt holds content the checks never write, such as scripts or a Custom HTML block. Remove it on the stage.
A menu or pattern is missing in a template part after applyingThe part points to an object that came with the same package. Compare again and choose Take stage for that part.
An image in a template is goneMedia IDs in templates are not translated between sites. Choose the image on live once.

Security and privacy

The two sites talk directly; Leitvia sees nothing of it. Requests are signed with the connection key, and the key itself is never sent. A package never contains personal data, so no data processing agreement is needed for the transfer itself.