I seem to have made some progress. I set the domain name to http://www.subsite.com rather than subsite.com (which I would have preferred) and I got the message about enabling cookies.
I added:
define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');
and then was instructed to comment out define('COOKIE_DOMAIN', ''); which I did. I am now getting the following message:
The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.
The good news is that the front end of the site is now visible. So I presume I just need to set the correct path for wp-admin but am having trouble doing so.
Somewhere in your DNS/webserver config you have a redirect from the non-www version of the domain to the www version.
If you want to keep that then remove the domain mapping and remap with the www included in the mapped domain.
Hi Ron,
Cheers for responding. I’ve got the front-end of the site now which was indeed a redirect problem between http://www.subsite.com and subsite.com. Now I can’t seem to access the dashboard for the subsite and get the message:
The domain mapping plugin only works if the site is installed in /. This is a limitation of how virtual servers work and is very difficult to work around.
I fiddled with the settings as described here: https://ww.wp.xz.cn/support/topic/the-domain-mapping-plugin-only-works-if-the-site-is-installed-in
but to no avail :/
I’m wondering if there isn’t a setting I could check in phpMyAdmin as the site has moved around a bit and there might be a residual setting from when it was in a subfolder?
In your wp-config.php, what is PATH_CURRENT_SITE defined as?
I have:
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
$base = '/';
define('DOMAIN_CURRENT_SITE', 'www.mainsite.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('WP_ALLOW_MULTISITE', true);
define('ADMIN_COOKIE_PATH', '/');
//define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');
Is WP installed in the root of your website?
You only get that message if WP is not installed in the root of the website and the $base / PATH_CURRENT_SITE have a value of something other than ‘/’. You’ll have to poke around your database and see if you have a bogus path somewhere.
Thanks Ron,
It looks like I might have to clean up reinstall this particular site as there are obviously some problems. I just wanted to check that the problem didn’t lie with my configuration. Many thanks for your help and for a very handy plugin. I will certainly rate it once I get things working π