0

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.net' );
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.com/wp-admin I get a redirection error. This is a screenshot of the website: https://prnt.sc/mgt062 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]
  • If you are not able to access you admin dashboard for the new site, this couldbe due to several issue. what is your htaccess? did you migrate your multisite installation from a localhost to you google cloud server? – Aurovrata Feb 5 at 10:58
  • Hello... No I have not migrated. – CryptoShade Feb 5 at 17:43
  • .htaccess: Hello... No I have not migrated. .htaccess is as follows: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress – CryptoShade Feb 5 at 17:52
  • this is the htaccess to a single site installation, log into your network dashboard and go to Settings->Network Setup to copy the correct htaccess code. – Aurovrata Feb 6 at 7:28
  • True... Here is the code, which I copied to .htaccess after your note. Still same issue. I added the cookie line and got the cookie error again: Looks better here: prnt.sc/mhrs5b 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] – CryptoShade Feb 7 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.