WordPress Multiple Environments

Setting up WordPress Multiple Environments SSO

When you have multiple WordPress environments, managing and maintaining your WordPress SSO settings between environments can get challenging especially when migrating between environments, you normally would have to manually update WordPress files and database entries related to any single sign on information related to your identity provider.

With WP Cloud SSO you can create as many WordPress environments as needed and enable WordPress SSO for each environment. You can also copy, migrate and merge your single sign on settings from each of your environments when migrating from staging, testing or dev into production environments.  Therefore there is no need to have to manually update your WordPress files or database anymore, the migration process is fully automated.

WordPress Multiple Eenvironments SSO is available in our Enterprise plan and supports the following:

Supported TLDs that are considered as Dev or Staging

  • *.dev
  • *.dev.cc (DesktopServer)
  • *.test
  • *.local
  • *.staging
  • *.example
  • *.invalid
  • *.myftpupload.com (GoDaddy)
  • *.cloudwaysapps.com (Cloudways)
  • *.wpsandbox.pro (WPSandbox)
  • *.ngrok.io (tunneling)
  • *.mystagingwebsite.com (Pressable)
  • *.tempurl.host (WPMU DEV)
  • *.wpmudev.host (WPMU DEV)
  • *.websitepro-staging.com (Vendasta)
  • *.websitepro.hosting (Vendasta)
  • *.instawp.xyz (InstaWP)

Supported Subdomains that are considered as Dev or Staging:

  • local.*
  • dev.*
  • test.*
  • stage.*
  • staging.*
  • stagingN.* (SiteGround; N is an unsigned int)
  • *.wpengine.com (WP Engine)
  • dev-*.pantheonsite.io (Pantheon)
  • test-*.pantheonsite.io (Pantheon)
  • staging-*.kinsta.com (Kinsta)
  • staging-*.kinsta.cloud (Kinsta)


Additionally, if your domain is localhost (with any port), it will also be treated as a localhost domain.

Supported SAML Identity Providers for WordPress Multiple Environments SSO

Getting Started Setting up Multiple WordPress Environments SSO

Multiple environments work only with hosting companies that support multiple environment migrations.

How Multiple WordPress Environments SSO works

You configure separate WordPress environments in WP Cloud SSO plugin, for each environment you can configure Identity Providers for each WordPress environment. All configurations will be detected based on the environment Domain URL a user is logged into.


User Flow:

  • Create WordPress environments on your hosting account;
  • Create WordPress environments in WP Cloud SSO plugin;
  • Create SAML SSO application for each environment with your Identity Provider;
  • Configure Identity Providers for each environment in WP Cloud SSO plugin;
  • Migrate between environments from your hosting (e.g Staging – Dev);
  • Within WP Cloud SSO, after migration you’ll see that the SSO settings have detected which URL is in use and have updated the correct identity provider settings. Saving time having to manually update wp-config files and database entries.

Also, you can merge Identity Providers configurations between environments with three options:

  • Replace all IDP configs in IDP exist;
  • Replace only Attribute/Role mapping if IDP exists;
  • Without replacement.

How Multiple Environments SSO Merge Works

  1. Configure Identity Providers settings for source and target environments within WP Cloud SSO;
  2. Select environments to merge;
  3. Select merge method
  • Replace all IDP configs if IDP exists, for example, if you have Azure AD IDP in source and in target environment, after merge, Azure AD IDP will be replaced in target          environment by source environment;
  • Replace only Attribute/Role mapping if IDP exists, for example, if you have Azure AD IDP in source and in target environment, after merge, only Azure AD IDP Attribute/Role Mapping configurations will be replaced in target environment by source environment;
  • Without replacement, for example, if you have Azure AD, Okta IDP in source environment and Azure AD in target environment, after merge the same Identity Providers will be skipped in the target environment. In the target environment will be only Okta IDP.  

Setting up Multiple Environments for SSO

  1. Go to the Multiple Environments tab.
  2. Enable Multiple Environments feature.

After enabling, a dev environment is created for the current domain URL address. Name of this environment can be changed. Also, the admin environment was configured as dev. You can change the admin environment to another configured environment. Only in this environment, you can configure all configs for each environment.

3. Add new environments. Enter environment Name and Domain URL.

4. Click on Save button.

5. Select Environment to configure Identity Providers.

6. Go to Identity Provider Setup tab. 

7. Configure Identity Providers for each of your environments, by creating a new SAML Application for each environment within your identity provider. For example for Azure AD, Create a new Azure AD Application for each environment.

8. Setup up each environment with IDP configuration and any Attribute/Role Mappings you would like for each environment.

9. Enable SSO links under the ‘SSO Links’ tab.

10. Migrate between your environments via your hosting account and test to see if your SSO configurations were fetched for your environments in WP Cloud SSO plugin.