Skip to main content

WordPress Known Issues

Learn the recommended solutions for known issues on the Pantheon Website Management Platform for WordPress sites.


This page tracks known issues and the recommended solution (if any) for running WordPress on the Pantheon website platform. Most sites work fine, but there are some common gotchas we are tracking and working to address.

Table Prefixes

If you are importing a site and the database has custom prefixes for your DB tables (e.g. anything other than wp_), Pantheon will try to detect this on import. However, if you do a multi-step import, or upload a database manually, you may need to:

  • Update the $table_prefix variable in the wp-config.php file,
  • Update user metadata with update wp_usermeta set meta_key = replace(meta_key, 'oldprefix_', 'wp_');, replacing oldprefix with the previously used prefix.
Info:
Note
Table prefixes are not supported or recommended by Pantheon. For more details see Accessing MySQL Databases.

Automatic Updates

WordPress's automatic update functionality will not work on Pantheon site environments. We disable all automatic updates by default with the Pantheon Updates plugin, found within the mu-plugins directory of our WordPress upstream. This plugin disables core, theme, and plugin updates on all Pantheon environments. Attempting to override this functionality by editing or removing this file will break your Test and Live environments. The codebase for these environments is not writeable, and WordPress will continually attempt to download and unpack core updates, which it cannot do on these environments. For more information, see the following:

PHP Sessions

If you see this error:

Warning: session_start(): user session functions not defined

It means you have some code (plugin or theme) that's using PHP Sessions, which require a plugin to work on Pantheon. Read more about WordPress and PHP Sessions.

PHP Version Compatibility

WordPress is not fully compatible with PHP 8.0 or 8.1. The remaining known issues with PHP 8.1 are deprecation notices. A deprecation notice is not an error, but an indicator of the compatibility work that is needed before PHP 9 is released and notices become fatal errors. The PHP code will continue to work with the deprecation notices.

For more information, refer to the PHP Versions documentation.

WordPress Multisite

Pantheon supports designated use cases for WordPress Multisite.

It's especially ill-advised to use Multisite to set up many distinct/separate sites — e.g. running different plugins, for different customers — on a single code installation.

Undefined array key "HTTP_HOST" PHP warnings

If you are seeing an error like PHP Warning: Undefined array key "HTTP_HOST" pointing to a WP-CLI file, this is likely because there is some code in your configuration that is using $_SERVER['HTTP_HOST'] without checking if it is set. This is a common issue with WP-CLI, as it does not have the same environment variables set as a web request. You can resolve this by checking if the key is set before using it:

if (isset($_SERVER['HTTP_HOST'])) {
    // Your code here
}

The simplest solution is to search your codebase for $_SERVER['HTTP_HOST'] and add a check for isset() before using it. It's generally a good idea to set a fallback value if the key is not set, to prevent unexpected behavior.

If you are seeing this in a WordPress multisite environment, it might be because your DOMAIN_CURRENT_SITE value is set to $_SERVER['HTTP_HOST'] in your wp-config.php. You can set this to the PANTHEON_HOSTNAME constant provided by Pantheon instead. See the WordPress Multisite documentation for more information.

Plugins with Known Issues

See WordPress Plugins and Themes with Known Issues for a list of WordPress plugins that are not supported and/or require workarounds.

Image Uploads

Since WordPress 4.5, a bug exists affecting the upload of large dimension images regardless of file size. This generally presents itself as an "HTTP error" when uploading. See this core issue for more information.

Force WordPress to use GD Library instead of Imagick

WordPress uses both GD Library and Imagick when editing or uploading images/PDF files. For big files, there are times when uploading images inconsistently fails or succeeds. This is because WordPress tries to utilize either of the two libraries, depending on which resource is available at a given time.

We've seen that GD Library works reliably for large files, and you can insert the sample code below in your theme's function.php to force use of GD Library:

function force_use_gdlib( $editors ) {
    $default_editor = 'WP_Image_Editor_GD';
    $editors = array_diff( $editors, array( $default_editor ) );
    array_unshift( $editors, $default_editor );
    return $editors;
}
add_filter( 'wp_image_editors', 'force_use_gdlib' );

See this core issue on WordPress.org for more information.

Language Packs

WordPress 4.7 introduced the ability for admins to add additional language packs to WordPress from the General Settings screen. On Pantheon, this is only possible on development environments in SFTP mode. This is because WordPress attempts to download the language packs for the requested language, and file writes are disabled in all environments other than development environments.

WordPress 6.2 extends this feature to user profiles. You can install language packs from your Edit Profile page. Note that this feature is still not available on Pantheon outside of a development environment in SFTP mode.