diff --git a/wp-includes/ms-default-constants.php b/wp-includes/ms-default-constants.php index 2a193afa98..53dfc9b55c 100644 --- a/wp-includes/ms-default-constants.php +++ b/wp-includes/ms-default-constants.php @@ -63,7 +63,7 @@ function ms_cookie_constants( ) { * @since 2.6.0 */ if ( !defined( 'ADMIN_COOKIE_PATH' ) ) { - if( !is_subdomain_install() ) { + if ( ! is_subdomain_install() || trim( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ), '/' ) ) { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); } else { define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );