diff --git a/src/wp-includes/ms-settings.php b/src/wp-includes/ms-settings.php index 2e3c3dcfa739a..4be890d6ea389 100644 --- a/src/wp-includes/ms-settings.php +++ b/src/wp-includes/ms-settings.php @@ -81,7 +81,10 @@ } elseif ( false === $bootstrap_result ) { ms_not_installed( $domain, $path ); } else { - header( 'Location: ' . $bootstrap_result ); + // Headers may already be sent, e.g. by wp-cron.php calling fastcgi_finish_request(). + if ( ! headers_sent() ) { + header( 'Location: ' . $bootstrap_result ); + } exit; } unset( $bootstrap_result );