Wordpress Multisite on GCP - Cannot Login to wp-admin on Second Domain

Keywords: WordPress Multisite - Google Cloud Platform - Technical issue - Credentials
bnsupport ID: 3f6162a1-2767-046f-9949-b87678634160
Description:
When attempting to login Getting this error “Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.” but other subdomain I am able to login. Also when tried to add at sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php got error directory not found.
Any assistance will be highly appreciated

define( ‘BLOG_ID_CURRENT_SITE’, 1 );

start: fixes for cookies issues with multiple domains

define( ‘COOKIE_DOMAIN’, ‘’ );
define( ‘ADMIN_COOKIE_PATH’, ‘/’ );
define( ‘COOKIEPATH’, ‘/’ );
define( ‘SITECOOKIEPATH’, ‘/’ );

end: fixes for cookies issues with multiple domains

define(‘FS_METHOD’, ‘direct’);

Hi @aruj,

Did you configure the domain for Wordpress?

https://docs.bitnami.com/ibm/apps/wordpress-multisite/configuration/configure-wordpress-multisite

You can find the file here:

/opt/bitnami/wordpress/wp-config.php

Regards,
micheil

Hi @michiel

Thanks for your response.
Yes I did configure the domain and I am able to visit the site. Its just I am unable to login to its dashboard via wp-admin. This issue is only for different domain. SubDomains are fine

looking forward for your reply

Hi @aruj,

Can you add these lines to the end of /opt/bitnami/wordpress/wp-config.php?

  # start: fixes for cookies issues with multiple domains
  define( 'COOKIE_DOMAIN', '' );
  define( 'ADMIN_COOKIE_PATH', '/' );
  define( 'COOKIEPATH', '/' );
  define( 'SITECOOKIEPATH', '/' );
  # end:   fixes for cookies issues with multiple domains

And then restart Apache?

sudo /opt/bitnami/ctlscript.sh restart apache

Regards,
Michiel

Hi @michiel

Your solution worked.
Thanks for the detailed and accurate instructions
Highly appreciated

Hi @aruj,

I’m glad to hear that!

Regards,
Michiel