Skip to content

Shiftora Pro is free. Pull or push everything: database, media, plugins, themes and must-use plugins.

Get Pro For Free
Get Pro For Free Sign in

Push WordPress from Staging to Production Safely

Guide 5 min read

To push WordPress from staging to production safely, back up production outside WordPress, freeze content on production, push only the tables and items you tested, then check the table counts on both sides before anyone edits the live site. The backup and the checks carry most of the safety.

What the push needs

A push sends the site you are logged into to a connected site. Shiftora’s free plugin does not push. Pushing needs Shiftora Pro on both sites, and the receiving site must switch on “Accept pushes” before it will take one. Pro is documented at https://shiftora.devsync-agency.com/why-upgrade/.

If you do not have Pro, the free route is to log into production and pull from staging. That writes over production in exactly the same way, so the safety steps below apply to both routes.

Both sites need WordPress 6.8 or newer and PHP 8.1 or newer, with the same plugin and theme versions you tested on staging.

Steps

  1. Confirm the versions on both sides. Check PHP limits on production too, since a push runs the same chunked pipeline as a pull.
  2. Freeze content on production. Ask editors and shop staff to stop writing for the window. Anything written to production after the push starts is lost when the selected tables are overwritten.
  3. Back up production outside WordPress. Take a host snapshot and a database dump. Shiftora saves a restore point before every pull, but a push does not write one, so the backup you take yourself is the only way back.
  4. On production, switch on “Accept pushes”. Keep it on only for the window, then switch it off.
  5. Pair the two sites with the “Connection Info” line if they are not paired already.
  6. On staging, log in and start a push to production. Choose the target site.
  7. Pick the tables. All tables are ticked by default. Untick tables that must stay as they are on production, such as form submissions, order records or a logging table that only production writes to.
  8. Pick the items. Themes, plugins and must-use plugins are chosen separately, with all, only active, or individual selection. Push only what changed. Pushing every plugin can change versions on production you did not test.
  9. Run the push and watch the log. The pipeline is chunked and resumable, so a stopped run can resume. Do not start a second push while the first is still running.
  10. Check the verification results. Shiftora counts every table on both sides as it lands. If a count differs, stop. Do not edit production. Read the log for that table, then decide whether to resume or to restore from your backup.
  11. Check the address rewrite. Staging links should now point at the production domain. Load a few pages and look for staging addresses in the content and in the browser console.
  12. Test production. Log in, load the front page, a post, a form and any checkout or member area. Flush the page cache and any CDN cache. Check that email from forms still sends.
  13. Switch off “Accept pushes” on production, and switch off any pull switch you turned on for the job.

Write the rollback plan first

Write the rollback down before you start, while nothing is on fire. The rollback is to restore production from the backup you took in step 3, put back the theme and plugin versions you recorded, and switch off Accept pushes. Name the person who makes each call and where the backup is stored. Test the restore on a copy of production once, so the first time you run it is not during an incident.

Write down the expected table counts from staging as well. Those numbers are your comparison point when the verification results arrive. A table that is empty on staging but full on production is a decision for a person, not a reason to push through.

Keep the staging site in the state you tested. If developers keep changing staging during the window, the push sends a moving target, and the counts you compared will not match the tested state.

If Shiftora is not yet installed on staging, get it from https://wordpress.org/plugins/shiftora/. The Shiftora documentation at https://shiftora.devsync-agency.com/documentation/ describes the push screen and the log entries you will see during the run, so read it before the window opens.

Expect the push to take longer than you planned. Staging to production runs through the same chunked pipeline as a pull, and the time it takes depends on your host’s limits more than on the minutes you allowed.

After the push

Do not treat the push as finished when the run ends. Give production a full working day under normal use before you remove the backup or close the window. Watch the error log, the form submissions and the order emails, and keep the production backup until that day passes without a problem.

FAQ

Does the push overwrite production content?
Yes, in every selected table. That is why content is frozen first and the backup is taken before the push starts.

Can I push one table and leave the rest alone?
Yes. Table selection happens before the run, so untick every table you want to keep on production.

What should I do if the counts do not match?
Stop the work on production and read the log for the table that differs. Resume only if the log shows a clean cause, such as an interrupted chunk. Otherwise restore from the backup you took in step 3.

Next step: run one full push from staging to a copy of production before you run it for real.

Get Shiftora Pro For Free

Pro is free while we launch. Confirm your email and we send the download and your license key.

No card needed. Your license arrives by email right after you confirm.