Skip to content

Instantly share code, notes, and snippets.

@lcatlett
Last active August 10, 2022 20:06
Show Gist options
  • Save lcatlett/de19c320960233e5c6dc31af1592bcb2 to your computer and use it in GitHub Desktop.
Save lcatlett/de19c320960233e5c6dc31af1592bcb2 to your computer and use it in GitHub Desktop.
Sample pantheon lando WP site network configuration
name: my-pantheon-site-network
recipe: pantheon
config:
framework: wordpress_network
site: my-pantheon-site-network
id: uuid
# Disable the SOLR index
index: false
# Enable the VARNISH edge
edge: true
# Disable the REDIS cache
cache: false
proxy:
edge:
- my-pantheon-site-network.lndo.site
- site1.my-pantheon-site-network.lndo.site
- site2.my-pantheon-site-network.lndo.site
if ( ! empty( $_ENV['PANTHEON_ENVIRONMENT'] ) ) {
switch( $_ENV['PANTHEON_ENVIRONMENT'] ) {
case 'live':
// Value should be the primary domain for the Site Network.
define( 'DOMAIN_CURRENT_SITE', 'live-<site>.pantheonsite.io' );
// Once you map a domain to Live, you can change DOMAIN_CURRENT_SITE
// define( 'DOMAIN_CURRENT_SITE', 'example-network.com' );
break;
case 'test':
define( 'DOMAIN_CURRENT_SITE', 'test-<site>.pantheonsite.io' );
break;
case 'dev':
define( 'DOMAIN_CURRENT_SITE', 'dev-<site>.pantheonsite.io' );
break;
// PAY ATTENTION TO THIS CASE LANDO USER!
case 'lando':
define( 'DOMAIN_CURRENT_SITE', 'my-pantheon-site-network.lndo.site' );
break;
default:
# Catch-all to accommodate default naming for multi-dev environments.
define( 'DOMAIN_CURRENT_SITE', $_ENV['PANTHEON_ENVIRONMENT'] . '-' . $_ENV['PANTHEON_SITE_NAME'] . '.pantheonsite.io' );
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment