I have setup a multisite WP 5.0.3 website on Google cloud. Which means no cPanel. Things are smoothly running. Current wp-config.php is like this:
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'something' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
define('FS_METHOD', 'direct');
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
define( 'SUNRISE', 'on' );
require_once(ABSPATH . 'wp-settings.php');
But when I tried to point a domain to a new site following the instructions, the new domain does not display correctly, and give a website without a theme, as it seems. Also, when trying to go to newsite/wp-admin I get a redirection error. This is a screenshot of the website: When checking solutions, there were instructions to add a cookie definition in wp-config.php .
define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']);
I did that but then the following error started to appear:
The constant "COOKIE_DOMAIN" is defined (probably in wp-config.php). Please remove or comment out that define() line.
Furthermore, the original website gave a white screen and stopped working until I removed the cookie definition in config file. DNS is updated successfully, and the new website is reached. I searched more, and found an advice to add the following code for cookies:
define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');
Same result as before. What am I missing?
htaccess file:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]