Sari la conținutul principal
FreeThree checks for your projectUptime, accessibility, SEO and cookie checks for your project
Toate articolele

Running a website13 octombrie 20265 min de citit

A staging copy of your website: what it is for

Eric ZsigmondCo-Founder & Senior Frontend Engineer

Sooner or later every website needs a change that is too risky to try in front of customers: an update of the software it runs on, a new checkout, a different home page. The usual answer is a staging copy. This article explains what that is, what it is good for, where it stops being useful, and how copies are counted on Tilizy Hosting.

What an environment is

An environment is one complete, running copy of your website. It has its own code, its own database, its own uploaded files and its own address. The one your visitors use is the live environment. Every other one exists so that people can try things without visitors seeing them.

The best-known copy is called staging. It is a private twin of the live site that only your team can open, where a change is checked before it is released. There can be others: one started from the branch that holds a single feature, or one for a client to try something before a decision is taken.

A copy is only worth having if it runs the same software as the live site. On Tilizy Hosting every environment does, because all of them are built from the same project file. It also needs realistic content, which a later section covers.

What to test on a copy

  • Updates. Security and feature updates of the software your website runs on, before they reach live. How to know which ones are waiting is covered in Your website is up. Is it healthy?
  • Anything that touches money or enquiries. The checkout, the contact form, the sign-up, the booking.
  • Changes of structure. A new kind of page, a different menu, a redesign. Look at them on a phone as well as on a computer.
  • Things someone else has to approve. A client or a colleague can open the address and see the real thing.
  • The release itself. A change released to staging has been through the same steps it will go through for live, described in What happens between git push and a live website.

A test works best when it is written down: the steps to try, and what should happen at each. An issue tracker can hold that plan next to the request, as described in One place for every request about your website.

What a copy cannot tell you

  • It cannot show how the site behaves when it is busy. Nobody visits a staging copy. You see whether a page works, and learn nothing about how it holds up on your busiest day.
  • It cannot prove that outside services work in earnest. A copy should talk to the test account of your payment provider and should not send emails to real customers. So the live connection is used for the first time at release. Check it there.
  • It cannot carry content to live. Data travels from live to a copy and never back. An article written on staging stays on staging.

Live data, with personal details replaced

A copy with three sample products and one test customer hides problems. The product name that is too long for its box, the customer with a very long order history, the old page with an embedded video: these exist only in real data. So a copy should be filled from live.

Real data has real people in it: names, email addresses, postal addresses, what they ordered. Data protection law, such as the GDPR in the European Union, broadly asks that personal data is used only for the purposes it was collected for and only by the people who need it. A test rarely needs to know who your customers are. It needs data of the right shape and size.

On Tilizy Hosting a new environment is filled with a copy of the live data, and personal details are replaced as the copy is made. The fields your project declares as personal data get made-up values. The live data itself is never changed. Replacement is the default, and a copy that keeps the real details should stay a rare and deliberate exception.

Two limits are worth knowing. The replacement covers the fields that are declared, so ask your developer which ones are on the list, and have it extended when the site starts to store something new about people. And a refresh replaces the data of the copy with the current data of live, so anything typed into the copy since the last refresh is gone.

For your developer, these are the two commands of the Tilizy CLI behind it:

tilizy app:create -e redesign   # a new environment from the branch "redesign", filled from live
tilizy app:sync -e redesign     # later: refresh its data from live

Why environments are not billed one by one

Some hosting companies charge for each environment. When every copy costs money, teams tend to share one staging site, or to skip the test.

Tilizy Hosting counts differently. A hosting plan is one server, and a server runs one project with as many environments as fit in its processor, memory and disk. There is no charge per environment and none per user. What limits you is the machine.

  • Processor and memory are shared. All environments of the website draw on the same cores and the same memory, and the live site always keeps what it needs.
  • Disk is not shared. Each environment is a copy, so each one uses disk for its own database and files. Storage is shown per environment, so you can see where every gigabyte goes.

The platform shows what each environment uses, and tells you when a bigger plan would help and why. If disk is the only thing running short, extra site storage costs €10 a month per 100 GB. An environment nobody is using can be stopped with its data kept, and started again when it is needed. When a feature has been released, its environment can be removed and the disk is free again.

A short routine

  1. Refresh the copy from live before a test that depends on content.
  2. Release the change to staging first. Staging can deploy on every push to its branch while live waits for a release tag.
  3. Go through the written test steps, on a phone as well as on a computer.
  4. Release to live, then look at the same pages there.

What the server of each plan holds is listed on the Hosting page.

Scris de

Eric Zsigmond

Co-Founder & Senior Frontend Engineer

Now check your own project.

Add your project and see what it needs. The first three checks are free.