Using Your Kinsta Staging Site Effectively
Why you need a WordPress staging site and how to set up a staging site properly on Kinsta.
Besides the speed, however, one of the things I love about Kinsta is how easy it is to create a staging version of your Web site. In this article, I talk a little bit about why a WordPress staging site is critical, how to create one on Kinsta, and some of the issues that might crop up while using one.
Why One-Click Staging Sites Are a Thing of Beauty
If you’re a software developer by trade, none of what follows is news to you, I’m sure. But if you’re a content creator just getting acclimated to WordPress, a little explanation is in order.
If your site is seeing thousands (or even hundreds) of visitors a day, you don’t want to make changes to it that could disrupt your users’ experience. Changes that can dramatically impact your site’s function include:
- Activating a new plugin
- Making changes to your theme
- Replacing your theme entirely
- Adding PHP code, such as custom functions (e.g., shortcodes)
For changes like this, it’s much safer to test out your changes on a second version of your site, separate from your live site. This is where staging sites come in. A staging site is simply a copy of your site that you can use for this testing, development, and experimentation. Once you’ve verified that a change works as you intended, you can then move it to your live site.
Creating a Staging Site in Kinsta
There’s good news and not-so-good news with Kinsta staging sites. The not-so-good news has little to do with Kinsta directly and much to do with the nature of WordPress (particularly WordPress plugins).
The good news is that it’s easy to create a staging site from your current live site. Just go to your Kinsta Dashboard and, in the upper right hand corner for your site, click Change Environment. If you change to the staging environment and none exists, Kinsta will create the staging environment for you.
Issues You May Encounter in Your Staging Site
The not-so-good news is that things on your staging site might be a little…wonky at first. Here are some issues you’re apt to run into.
Plugin Licenses Are Hard to Manage
Licenses for WordPress plugins — things like Elementor and Ultimate Add-Ons that may be fundamental to your site and its design — are usually tied to your domain. Your staging site is by default on its own custom domain, such as
staging-<sitename>.kinsta.cloud. So, unless the plugin you bought supports licensing a staging as well as a production environment, you’re liable to see complaints in staging that your plugin’s license is invalid.
I’ll talk a little bit below about how you can overcome this issue for some plugins.
Caching Issues Caused by Plugins (E.g., Autoptimize)
If you use a performance plugin — like Autoptimize, which minifies condenses JS and CSS files into single scripts to reduce page load times — you’ll likely need to turn them off in your staging site to avoid rendering issues in your browser. Since your staging site doesn’t need to be optimized for performance anyway, this isn’t a big deal.
Make Your Staging Site a Proper Sub-Domain
One thing that can help alleviate site URL issues is to make your staging site a subdomain of your current site. This is easy to do with Kinsta and your current DNS provider. It also provides a more memorable name for your staging site so that your fellow site collaborators can easily find it in and log in.
In Kinsta, in your staging site, go to Domains and click Add Domains. Add in
staging.<yoursite> to create your staging site hostname. For my site Unseen Japan, I entered: staging.unseenjapan.com
Then, go to whoever manages your DNS and add a new A record pointing to the IP address of your staging site. (This can be found at the top of the Info tab for your staging site in My Kinsta.) Here’s how this looks if you use AWS Route 53 to manage your DNS.
Once that’s done and the domain name has propagated, you will need to make this new staging site name the staging site’s primary domain. In your domains list in My Kinsta, click the Make Primary button. If you don’t do this, then whenever you go to the new URL, you’ll simply be redirected back to the *.kinsta.cloud URL that was created for you by default.
After making this change, if you had HTTPS enabled on the live site, you’re likely to get a security error in your Web browser. That’s because you need to generate an SSL certificate and turn on HTTPS for this sub-site. Fortunately, Kinsta makes this a one-click process.
Note that this still won’t get around licensing issues for certain products. For example, the WordPress design package Elementor (which I also swear by!) will complain there’s a domain mismatch and ask you to re-activate your license.
Unfortunately, at least in the case of Elementor, there’s no good solution for this unless you have a multi-site license. Elementor themselves recommend using a local version of WordPress as a staging site — an error-prone and hard-to-configure solution that doesn’t allow for group collaboration. Hopefully, this is something they change in the near future.
(Note: Since I first wrote this, Kinsta has come out with DevKinsta, which is a local development environment for WordPress that plays well with Kinsta hosting. I plan to write a review on it shortly!)
Password Protecting Your Staging Site
Your staging site is, by definition, a work in progress. Your staging site is also, by default, publicly visible. That might not be desirable if you’re working on something that should remain secret. It also exposes you to potential security issues if you use plugins or PHP code that turn out to be unsafe.
Fortunately, this is another thing that Kinsta makes ridiculously easy. Just go to Tools for your staging site and click the Password protection button to add a username and password.
Migrating Changes to Live
Note that Kinsta also has the ability to migrate your staging site to your live site. However, this is a feature you’ll hardly ever want to use. This “push” completely replaces your production environment — including all published and draft articles, all comments, etc.
When it comes time to migrate changes, it’s better to simply make the same changes in live that you made in your staging site. It’s also a good idea to back out changes in staging you don’t intend to keep.
If you want to start fresh on your staging site, you can delete it and re-create it at any time in the Kinsta dashboard.
Staging sites will give you the confidence to make potentially daring changes to your WordPress sites in a safe space. If you don’t use them currently, try setting one up today!
Disclaimer: Links to Kinsta and other tools are affiliate links; I earn a commission at no additional cost to you if you purchase services.
Teaching technology is my passion. If you need a technical trainer or a technical writer for API docs, white papers, or case studies, contact me!