At Kinsta, each of your sites can have a staging environment. Staging environments are first copied from your live site and then allow you to test plugin or code modifications without affecting the live site.

Kinsta offers the option to push your WordPress staging environment to your live environment if you’re happy with the changes you’ve made and want them to be applied to your live site. Now, thanks to the Selective Push feature, you have granular control on what to push live.

In the past, pushing from staging to live was an all-or-nothing process, with the staging environment completely overwriting the live site during the push. With Selective Push, you’re able to choose what to push from your staging environment to your live site. Specifically, you now can push:

Pushing from staging to live can be done in just a few clicks, but please read the notices below before proceeding. They contain essential information about the process.

Important Notices

How To Push Staging To Live With Selective Push

Follow the steps below to push your WordPress staging site to live. The workflow for selective push allows you to choose what you will push from your staging site to your live site.

Step 1

Log in to MyKinsta, click on Sites, and click on the site you want to push to. Use the Environment selector next to the site name to select your staging environment.

Change to your WordPress staging environment in MyKinsta.
Change to your WordPress staging environment in MyKinsta.

Step 2

Once you’re in the staging environment, click on the Environment actions menu and select Push to live from the dropdown menu.

 

Push Staging to Live in MyKinsta with Selective Push.
Push Staging to Live in MyKinsta with Selective Push.

Step 3

In the Push to Live pop-up/modal that appears, choose either Files, Database, or check both — depending on what you’d like to push to live. Type the site name to confirm and click the Push to Live button.

Use Selective Push to push files from staging to live.
Use Selective Push to push files from staging to live.

A few things to keep in mind are:

Use Cases and Example Workflows

Below we’ve outlined some examples of when you might want to push just files, just the database, or both. Keep in mind the following when pushing staging to live:

Push Files Only

Push Database Only

Note: Any changes to the live site’s database since the staging site was created will be lost, including but not limited to: comments, new content, purchases on ecommerce sites, sign-ups on membership sites, and forum posts.

Push All

Note: Any changes to the live site’s database since the staging site was created will be lost, including but not limited to: comments, new content, purchases on ecommerce sites, sign-ups on membership sites, and forum posts.

Frequently Asked Questions (FAQ)

Q: If I test a plugin on the staging environment and push only the files to live, will it create the corresponding database tables for the plugin?

If you install a plugin on your staging site that’s never been installed on the live site, pushing only the files from staging to live will not create the database tables for that plugin.

This also means that any settings you’ve configured in the plugin will not be pushed to live (unless the settings are saved in a file outside of the database, like in a JSON file, for instance).

Depending on how the plugin is coded, enabling (first disabling if necessary) the plugin on the live site may create the database structure.

Q: If I push only the files to live, does this mean the old database (in staging) will not overwrite the live one, and only the files will be overwritten?

Yes, when pushing only the files, this means that the database on the live site remains unchanged, and only files on the live site will be overwritten.

Q: Does this mean that I can work on design changes on my staging site and push those to live without losing any new subscribers or customers on my live site?

Yes, as long as your changes are made only to files (no changes made in the WordPress dashboard — including plugin, theme, or customizer settings), you can safely push those to live without pushing the database. When you push the changes to live, select Files and make sure Database is not selected.

Q: Can I use selective push to change my site’s PHP version?

Yes, you can use staging to test and push a new PHP version to your live environment, but it isn’t strictly necessary to push from staging to live to update your PHP version. Here’s a brief overview of how you would change the PHP version without pushing from staging to live:

  1. Create a staging site.
  2. Go to the staging site and change the PHP version on the staging site.
  3. If everything is okay and working as expected on the staging site (be sure to test your site thoroughly), switch the PHP version on the live site.

Q: I made CSS changes in the WordPress dashboard and pushed files. Why am I not seeing my changes, even after clearing all of the cache?

Depending on the type of change made and where that information is stored, you may need to push the database or make those changes manually on the live site. For instance, if you added or edited CSS in a block or widget in the WordPress dashboard, that would probably be saved to the database.

If you make changes to something in the WordPress dashboard, with the exception of changes made with the Theme Editor (Appearance > Theme Editor), that information is usually stored in the database.

Note: Any changes to the live site’s database since the staging site was created will be lost, including but not limited to: comments, new content, purchases on ecommerce sites, sign-ups on membership sites, and forum posts. In this case, we recommend making the same changes manually on the live site rather than pushing the database.