Using Staging: Pushing to Production and Pulling from Production

Using Staging: Pushing to Production and Pulling from Production

This article covers the staging workflow after you have created a staging environment. If you have not set one up yet, see Using Staging Environments first.

The Two Directions

DirectionWhat it doesWhen to use it
Push to ProductionOverwrites your live site with staging contentWhen staging changes are tested and ready to go live
Reset from ProductionOverwrites staging with your current live siteWhen you want a fresh copy of production to test against

Pushing Staging to Production

This replaces your live site with what is on staging.

  1. Go to your site in KPanel and click the Staging tab
  2. Scroll to the Push Staging to Production section (outlined in red as a warning)
  3. Choose what to push using the checkboxes: Files, Database, or both
  4. If pushing the database, keep Rewrite URLs ticked -- this automatically replaces the staging URL with your production URL across the database
  5. Tick the confirmation checkbox: "I understand this modifies my live production site"
  6. Type your production domain name in the confirmation field
  7. Click Push to Production

A pre-push backup is created automatically before any changes are made to production. If the push fails partway through, production is rolled back to that backup.

The push typically takes 30-60 seconds for small sites, longer for large databases or many files.


Resetting Staging from Production

This replaces your staging site with the current live site. Use this to get a fresh copy of production when:

  • Production has had changes made directly (content updates, orders, new users)
  • You want to start a new round of testing from the latest live state
  • Staging has drifted too far from production to be meaningful

Steps:

  1. Go to your site in KPanel and click the Staging tab
  2. Find the Reset from Production section
  3. Choose what to sync: Files, Database, or both
  4. Click Reset from Production

This overwrites staging content. Anything you had on staging that was not pushed to production is lost.


URL Rewriting on Push

WordPress stores its own URL in the database (wp_options table: siteurl and home). It also appears in post content, meta values, and widget settings.

When you push staging to production, the Rewrite URLs option (available when Database is ticked) automatically runs a search-replace across all tables to swap the staging URL for your production URL.

If you push files only, or if the URL rewrite does not catch everything, use the WordPress Search & Replace guide to fix any remaining staging URLs manually.


Checking the Staging URL

Your staging site runs at staging.yourdomain.com. Click Open Staging in the Staging tab to open it in a new tab.

The tab also shows when staging was last synced and when it was last pushed to production.


Staging and WooCommerce

If you are running WooCommerce, avoid pushing the database from staging to production if the live store has received orders since the last reset. Pushing staging's database will overwrite those orders.

Recommended approach for WooCommerce: push files only (theme, plugin changes), and make any database-level changes directly on production using maintenance mode.

Was this article helpful?

Still need help?

Our support team is here on business days, NZT.

Back to Help Centre