Skip to content

Environments

Every site in ConstellaWP has an environment: production, staging, development or local. These are the four values WordPress itself knows through WP_ENVIRONMENT_TYPE, so what ConstellaWP shows matches what your site declares.

A staging, development or local copy can be attached to the site it copies, its main site. While it is a copy of it, it is not billed as a site.

Environments are part of the Solo and Team plans.

  • From WordPress. When the site sets WP_ENVIRONMENT_TYPE, as a constant in wp-config.php or as an environment variable, an up-to-date agent reports it and ConstellaWP files the site accordingly. A site that sets nothing is not assumed to be a production.
  • From your host. Linking a WP Engine install to the site takes the environment WP Engine gives it.
  • By hand. In the site’s Settings → Environment, pick the type. Your choice is kept, whatever WordPress or the host say afterwards, so a wrong WP_ENVIRONMENT_TYPE never gets in the way. Pick Not set to follow what WordPress declares again.

The sites list shows each site’s environment and can be filtered by it. A local copy that stops answering, because the computer it runs on is asleep, is shown as Unreachable rather than Offline.

  1. Open the copy (the staging, for example) and go to Settings → Environment.
  2. Pick its type: Staging, Development or Local.
  3. Under Environment of, choose its main site.
  4. Click Save changes.

You can also do it from the main site: in its Settings → Environment, use Attach an environment.

A main site takes one environment of each type: one staging, one development and one local copy at most. Environments stay one level deep: a copy cannot have copies of its own, and a production cannot be attached to another site.

An attached copy follows its main site’s client. Changing the main site’s client changes it for its copies too.

To make a copy a site of its own again, choose None under Environment of, or click Detach next to it in the main site’s settings. It is then billed as a site.

An attached copy is not billed while ConstellaWP recognises it as a copy of its main site. It is recognised when both of these hold:

  • it runs the same active theme as its main site;
  • at least 60% of the active plugins found on either site are active on both.

This is checked whenever the agent reports a change in the site’s plugins or themes, and once a day.

A staging that drifts away from its production, during a redesign for example, is not billed on the spot:

  1. The owner and the admins of the organization are warned: a banner across the dashboard, a notification in the bell, and an email.
  2. The copy is billed as a site 7 days later, unless it matches its main site again by then.
  3. A second email confirms the day it starts counting as a site.

Nothing is ever billed for the days that already passed, and the copy becomes included again as soon as it matches.

The quickest way back is Copy production here, in the copy’s settings. It restores the latest full backup of the main site onto the copy, through a restore onto another site, with the same confirmation. Everything on the copy is replaced.

  • An unrelated site attached as a staging is billed as a site from the start: it was one already.
  • The copy of a site whose access was revoked counts as a site of its own.
  • On the Free plan, every site is billed as a site.

The rule can miss a genuine copy, a staging halfway through a redesign for instance. If you think one of your copies should not be billed, write to support@constellawp.com with the address of the copy and of its main site, and we can recognise it by hand.