This section provides information on Pantheon platform support for domain masking, htaccess, and many other configuration and site support considerations.
Compute Optimized Environments (COE) improves CPU performance over the previous infrastructure by up to 40%. COE includes changes to the runtime operating system, file structure, and binary content of Pantheon’s Site Environments. While these changes are transparent to most sites on the platform, there is the potential for custom code to interact with these components in a way that may need to be adjusted or optimized.
The site environment home directory is in the root
Pantheon provides backward compatibility for site code that references the previous home directory by adding a symlink
External scripts that reference
/srv/bindings/[UUID] should check that the path exists. If the prior home directory does not exist, then your scripts should write to the new home directory location.
Note that within the home directory, only the following are writable:
The environment variable
$_ENV[‘HOME’]) is the recommended way to target this location within your code. Refer to Hard-coded Directory References and $_ENV'HOME' for more information.
Your log output is under
/logs/nginx, depending on your setup.
Refer to Automate Log Downloads for more information about accessing your logs.
Pantheon supports sites that consume services using Cross-Origin Resource Sharing (CORS), such as Amazon S3 CORS.
You must add the correct header to enable CORS services on your site. Review https://enable-cors.org/server_php.html for more details.
Drupal users can update
sites/default/services.yml to enable CORS.
# Specify allowed headers, like 'x-allowed-header'.
allowedHeaders: ['x-csrf-token','authorization','content-type','accept','origin','x-requested-with', 'access-control-allow-origin','x-allowed-header','*']
# Specify allowed request methods, specify ['*'] to allow all possible ones.
# Configure requests allowed from specific origins.
# Sets the Access-Control-Expose-Headers header.
# Sets the Access-Control-Max-Age header.
# Sets the Access-Control-Allow-Credentials header.
Pantheon does not currently support LESS or Sass/Compass CSS preprocessor languages. LESS and Sass will need to be pre-compiled to make traditional CSS stylesheets before being pushed to the platform.
Connections will change from time to time due to the containerized nature of the platform. For security reasons, using the
$_ENV superglobal inside PHP applications is not supported. As an alternative, consider using a Bash script and Terminus connection. You can view an example in the Create Secure Connection to MySQL using TLS documentation.
MySQL stored procedures are not supported. Due to the nature of the platform, there is no guarantee that they will persist following a database migration. You can avoid the use of stored procedures by using parameterized queries or object-relational mapping.
A Drupal 7 site with an ampersand (
&) in the site URL (excluding instances of query parameter separation) will return a 404 error, regardless of the presence of a matching path.
Ensure you encode URLs that use ampersands with
%26 instead of
The Pantheon platform includes Drupal Steward, a platform-level mitigation of certain highly-critical vulnerabilities that are identified in Drupal core, as a feature for all Drupal sites on Pantheon. All Pantheon sites are protected by Drupal Steward.
Refer to the Drupal Steward FAQ for more information about Drupal Steward.
Pantheon sites use nginx to concurrently serve requests. The nginx web server ignores distributed configuration files such as
.htaccess for reduced resource consumption and increased efficiency. This configuration is standard across all Pantheon sites, and modifications to the
nginx.conf file are not supported.
Refer to Configure Redirects for more information.
If your site contains rules in
.htaccess that cannot be migrated to PHP, Pantheon offers its Advanced Global CDN as a managed service. Custom
.htaccess rules often can be converted to run on a custom Varnish layer provided by Advanced Global CDN. Please contact your Customer Success Manager (CSM) or contact us for more information.
Drupal 7 and 8 checks for arbitrary code execution prevention by looking for a specific string in the
.htaccess file. Since Pantheon uses NGINX as described above, this message can be safely ignored. For more details, refer to this Drupal.org issue on
Sandbox sites that are over four months old that have not had code commits or other Git activity for three months are "frozen". All requests to a frozen site will return a
530 Site Frozen error code, and the site's Dashboard will be unavailable.
You can easily reactivate a site:
Go to the workspace, Sites tab, and select the frozen site.
Click Unfreeze site. The site will be ready for development again within a few minutes.
If you experience any issues, like missing static assets, a backup of the site is available and can be restored via the Site Dashboard. Please note that only files that have been committed will be available after unfreezing.
Pantheon may send a generic Maintenance Mode message during platform problems; this message cannot be customized.
Built-in Maintenance Mode for both Drupal and WordPress sites can be customized; clear caches when toggling.
MariaDB 10.4 on Pantheon has
innodb_strict_mode set to
ON. This leads to
Row size too large errors that are not present on earlier versions of MariaDB:
ERROR 1118 (42000): Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
Modify your tables to use
row_format=DYNAMIC to avoid this error.
How to update all tables to row_format=DYNAMIC
terminus auth:login --email <email> terminus site:list
Optionally, set the UUID from step 1 as the local alias (replace
site-uuidin this example):
Run a SQL command to set
$ENVwith the Multidev or environment, and
$SITEwith the site UUID:
echo "SELECT CONCAT('ALTER TABLE \`', table_name, '\` ROW_FORMAT=DYNAMIC;') AS aQuery FROM information_schema.tables WHERE table_schema = 'pantheon';" | $(terminus connection:info $SITE.$ENV --fields=mysql_command --format=string) | grep -vE 'aQuery|_pt_heartbeat|_pantheon_heartbeat' | $(terminus connection:info $SITE.$ENV --fields=mysql_command --format=string)
Refer to the official MariaDB documentation for more information on how to diagnose tables and troubleshoot potential issues.
Pantheon supports designated use cases for WordPress Multisite.
Pantheon does not currently support modifying the
nginx.conf per site, as we run a highly tuned universal configuration file. All of the containers run a standard profile, and we have opted to keep this configuration to keep the
Refer to Configure Redirects if your site uses
nginx.conf rules for redirects.
Pantheon offers Advanced Global CDN as a managed service if your site contains rules in
nginx.conf that cannot be migrated to PHP. Custom
nginx.conf rules often can be converted to run on a custom Varnish layer provided by Advanced Global CDN. Please contact your Customer Success Manager (CSM) or contact us for more information.
Node.js is not available in the platform. The node.js service must to be hosted on a different remote server outside of Pantheon if running node.js services is a hard requirement for your Drupal or WordPress application.
Each site supports a single Drupal or WordPress application. Placing a WordPress application to behave as the blog for a Drupal site, for example, is unsupported.
Domain masking allows you to serve two entirely different and separate sites over a single common domain. For example, using one system as a front end for marketing efforts and another for blog content:
- Main Site:
Domain masking is available through Pantheon's Advanced Global CDN managed service. If you require domain masking, ask your Customer Success Manager (CSM) or contact us. Customers may also set up domain masking using a third-party CDN service, but please note that third-party services are outside Pantheon's scope of support.
While you are able to import an additional database to an environment, only the Pantheon database will be preserved when the application container is updated. This means you can use an additional database for running migration scripts, but should not rely on it nor write any new data to it.
Pantheon does not currently support directly connecting to Oracle databases. Customers have successfully used the Pantheon Secure Integration to connect to an external API on top of their Oracle databases.
This can occur if hardcoded links are found in the HTML source of your pages.
WordPress users can correct this by:
Run a search and replace using WP-CLI as mentioned in the WordPress Quick Tip: Search and Replace with WP-CLI blog post to exchange the platform domains with your custom domain.
Xdebug is not available on the platform. Local development tools such as Lando provide Xdebug and can synchronize your local workstation with the Pantheon Cloud. Debugging on the Pantheon Cloud is done using New Relic® Performance Monitoring.