Platform and Site Information
Learn about platform and site-specific configuration and support.Discuss in our Forum Discuss in Slack
This section provides information on Pantheon platform support for domain masking, htaccess, and many other configuration and site support considerations.
Compute Optimized Environments (COE)
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.
WordPress users can enable CORS for selected domains in a MU plugin. You can also use an Advanced Global CDN to modify headers at the Edge.
Drupal users can update
sites/default/services.yml to enable CORS.
cors.config: enabled: true # 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. allowedMethods: ['*'] # Configure requests allowed from specific origins. allowedOrigins: ['http://localhost/','http://localhost:3000','http://localhost:3001','http://localhost:3002','*'] # Sets the Access-Control-Expose-Headers header. exposedHeaders: false # Sets the Access-Control-Max-Age header. maxAge: false # Sets the Access-Control-Allow-Credentials header. supportsCredentials: true
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.
Database Stored Procedures
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.
MySQL Triggers and Events are also not supported. As an alternative, you may consider Cron for WordPress or Drupal.
Drupal 7 and Ampersands
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 False Positive
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
Inactive Site Freezing
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 and innodb_strict_mode=ON: Row Size Too Large Errors
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
Log in with Terminus and find the site UUID:
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.
Modules and Plugins with Known Issues
Refer to Modules and Plugins with Known Issues for information about Drupal modules and WordPress plugins that are not supported and/or require workarounds.
Pantheon supports designated use cases for WordPress Multisite.
We do not support Drupal Multisite. See blog posts: Why Drupal Multisite is not Enterprise Grade and Much Ado About Drupal 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.
One Application per Site
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 or URL Forwarding
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.
Oracle Database Drivers
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.
Pantheon URL Search Engine Indexing
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.