WordPress environments: staging, push and pull

staging, environments, clone, push, pull, copy data, woocommerce, rollback · 0 found this helpful

The Environments tab shows your live WordPress site and its staging copies side by side. A staging copy is a private clone of your site where you can try a new plugin, theme or layout. When it works, you push it to live. Live gets a restore point first, so you can undo the push in one click.

Staging copies come with Business and Pro.

Create a staging copy

  1. Open your site's dashboard and choose the Environments tab.
  2. Click Create staging copy.
  3. Keep the suggested address, such as staging.example.ca, or pick stage, dev or test. You can add a number, such as staging2.
  4. Click Create staging copy.

The copy takes a few minutes. Follow it in the task list at the top of the panel; you can keep working or leave the page. When it's ready, a Staging card appears next to Live.

Every new copy starts private:

  • It's password protected. Click New password to get a password you can share with a reviewer. We show it once.
  • It's hidden from search engines, so it never competes with your live site.

Important: A staging copy holds a full copy of your live data, including customer accounts and orders. Keep the password on, and switch off payment gateways and order emails in the copy before you test a checkout.

Open the copy

Click Open on the Staging card to view the copy. Click WordPress admin to sign in to its dashboard without typing your WordPress login. The copy's own password still applies, so enter it when your browser asks. Both buttons show once the copy's address works.

If your domain's DNS is managed somewhere other than Barbrick, the copy's address won't open until you add one record. The Staging card shows it:

Type Name Value
A staging.example.ca The address shown on the card

Add the record where you manage DNS. It usually works within an hour; allow up to 24. Until then, the card shows no Open button.

Push staging to live

  1. On the Staging card, click Push to live.
  2. Choose what to copy:
Option Copies Use when
Files only Themes, plugins and uploads You changed a theme, a plugin or images
Database only Posts, pages and settings You changed content or settings
Files and database Everything A redesign or a big change
Chosen tables Only the database tables you tick You know exactly which data changed
  1. Click the push button. Its label matches your choice, such as Push database.

Before anything changes, we take a restore point of live. After the push, we clear the site's cache and measure its speed, so you can see the push didn't slow it down.

Important: Pushing the database replaces content added on live since you made the copy, such as comments and form entries. If your live site changes every day, push files only, or use Chosen tables.

Online shops

When the site runs WooCommerce, Shop safe mode is on for database pushes. It keeps live orders, customers, accounts and comments, and still copies products, pages and settings. Turn it off only when you mean to replace live orders with the copy's.

Older shops that store orders with their pages keep posts and pages on live too. For design changes on those shops, push files.

Roll back a push

On the Live card, click Roll back. Live goes back to how it was at the restore point. Changes made on live since then are lost.

Live keeps one restore point. The next push replaces it, and so do updates that take a restore point first. The Live card shows when the current one was taken, so check the time before you roll back.

To undo a pull, click Roll back on the Staging card. A pull takes its restore point of the copy, so live's restore point isn't touched.

Pull from live

To refresh the copy with the latest content from live, click Pull from live on the Staging card and choose Files and database, Database only or Files only. The copy gets a restore point first. Afterwards we hide it from search engines and check its password again. If a pull removed the password, we set a new one, and you can get it with New password.

Delete a staging copy

On the Staging card, click Delete and confirm. We remove the copy's files, database and address. Live isn't touched. Changes you haven't pushed are lost.

If something goes wrong

  • "That address is already in use": another site or subdomain uses that name. Pick another, such as staging2.
  • "Not enough disk space": a copy needs about as much space as your live site. Delete old copies or files, or move to a larger plan.
  • The buttons are greyed out: a copy, push or pull is still running. Wait for it to finish in the task list.
  • The copy shows the live site: a redirect plugin or cache is sending visitors to live. Clear the copy's cache, then check Settings → General in the copy's WordPress admin.
  • A push broke live: click Roll back on the Live card. If the restore point is gone, restore a backup. See Back up and restore WordPress.

Was this helpful?

Still stuck? Ask us and we'll walk you through it.