Support » Plugins » [Plugin: WordPress MU Domain Mapping] can’t visit mapped blog admin pages

  • I have the plugin set up and a blog mapped, and it works perfectly for everything when you’re not logged in. yay!

    However, having major issues with the backend. Well, just 1 issue I guess: I can’t get to it!

    Regardless of the options checked on the Domain Mapping options screen, I can not access the backend of a mapped blog. I am instead displayed the login screen.

    Example: is my blog installed as a subdirectory is my other domain.

    Behavior: displays my site perfectly. redirects me to
    Submitting my login info takes me to:

    *however* at this point, at least part of WP thinks I’m actually logged in, because if I go back to, my “Site Admin” link shows up (which only does if you’re logged in)
    Clicking on that Site Admin link however, will take me to the login page.

    Similarly, if I log in at just, go to Blogs, and try to visit the backend of via the Backend link, it will take me to the login page at:

    Things to note:
    I’ve checked at pretty much every stage of the process, and almost never see a record in wp_domain_mapping_logins. I can’t even consistently reproduce it, but occasionally after doing a bunch of stuff I find one weird record: id=NULL, userid=0, blogid = bar’s blogid. t: 1/1/0001 12:00:00 AM
    I never get the message: “Incorrect or out of date login key”
    I do NOT define DOMAIN_COOKIE in my wp-config

    When I log in at, there are 5 cookies set when i get to the dashboard:

    When I log in at, there are 2 cookies set when i get bounced back to the login page

    I did try a much earlier version of the plugin with the same name first, which didn’t work. I deleted the domain_mapping table in order to get this one working. Could there be any global options stored in the DB that are conflicting with this version that I could look for and purge?

    Any ideas how to fix this, or what I can do to get more debugging information?
    Thanks! 😀

Viewing 14 replies - 1 through 14 (of 14 total)
  • Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    Have you tried the trunk version of the plugin? 🙂

    Before you mapped the sub-blog, you could login & access the backend fine, correct?

    I am using 0.5.1 – is there a newer version?

    And yes, was able to log in and access the backend fine before mapping.

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    Try this one:

    Also note the login redirect is stripping off the www. That would probably be it.

    Tried that one – no more luck. However, I’ve realized that since I’ve installed this, my whole site is bonked. I can’t go to the backend of ANY blog, even ones I hadn’t mapped. I deleted the plugin, deleted sunrise.php, returned wp-config.php to its original state, and i STILL can’t view the backend of any blog.

    On an even weirder note, I tried installing this on another WPMU site earlier this morning, and had the same problem. However, now that one is magically working perfectly on that server!

    So thanks for looking at this. Let me try to un-break my site without the plugin, then I’ll give it a fresh go. 🙂


    Okay, THOUGHT the issue was resolved, but it was in fact only ‘resolved’ so long as I had an existing session when I re-installed the plugin.

    If I’m logged in when i install the plugin, I can keep editing site backends. If I log out, however, I can no longer get to any (non-main) blog’s backend after I log back in. 🙁

    also, whenever I map, then un-map a blog, all the Single posts give me 404s. (archives and Pages work)

    blargh… back to more research/testing/head-banging 🙂

    Andrea – it’s not the www issue. We’re not really using www. It’s actually subdomains. So:

    Real site:

    Mapped domain:

    We also have your version and can go back to messing with that one, too – but that one had fubared all the uploaded images and documents. It wasn’t mapping any of those.

    Just did a fresh wpmu 2.9.1 install with zero plugins. created a subdirectory blog. added domain_mapping plugin. mapped domain.

    exactly the same: works great from front-end, but the same “can’t log out and back in” issue for the backend.

    wpmuguru said I should post this:

    * The base configurations of the WordPress.
    * Do not try to create this file manually. Read the README.txt and run the
    * web installer.
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
    * visiting {@link Editing
    * wp-config.php} Codex page. You can get the MySQL settings from your web host.
    * This file is used by the wp-config.php creation script during the
    * installation.
    * @package WordPress

    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘my_database_name’);

    /** MySQL database username */
    define(‘DB_USER’, ‘my_username’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘my_password’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘my_host’);

    /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’, ‘utf8’);

    /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’, ”);
    //define(‘VHOST’, ‘no’);
    $base = ‘/’;
    define(‘DOMAIN_CURRENT_SITE’, ‘’ );
    define(‘PATH_CURRENT_SITE’, ‘/’ );
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOGID_CURRENT_SITE’, ‘1’ );

    /* Uncomment to allow blog admins to edit their users. See */
    //define( “EDIT_ANY_USER”, true );
    /* Uncomment to enable post by email options. See */
    //define( “POST_BY_EMAIL”, true );

    * Authentication Unique Keys.
    * Change these to different unique phrases!
    * You can generate these using the {@link secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    * @since 2.6.0
    define(‘AUTH_KEY’, ‘1’);
    define(‘SECURE_AUTH_KEY’, ‘2’);
    define(‘LOGGED_IN_KEY’, ‘3’);
    define(‘NONCE_KEY’, ‘4’);
    define(‘AUTH_SALT’, ‘5’);
    define(‘LOGGED_IN_SALT’, ‘6’);
    define(‘SECURE_AUTH_SALT’, ‘7’);

    * WordPress Database Table prefix.
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    $table_prefix = ‘wp_’;

    * WordPress Localized Language, defaults to English.
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * to wp-content/languages and set WPLANG to ‘de’ to enable German
    * language support.
    define (‘WPLANG’, ”);

    // double check $base
    if( $base == ‘BASE’ )
    die( ‘Problem in wp-config.php – $base is set to BASE when it should be the path like “/” or “/blogs/”! Please fix it!’ );

    // uncomment this to enable WP_CONTENT_DIR/sunrise.php support
    define( ‘SUNRISE’, ‘on’ );

    // uncomment to move wp-content/blogs.dir to another relative path
    // remember to change WP_CONTENT too.
    // define( “UPLOADBLOGSDIR”, “fileserver” );

    // If VHOST is ‘yes’ uncomment and set this to a URL to redirect if a blog does not exist or is a 404 on the main blog. (Useful if signup is disabled)
    // For example, the browser will redirect to for the following: define( ‘NOBLOGREDIRECT’, ‘’ );
    // Set this value to %siteurl% to redirect to the root of the site
    // define( ‘NOBLOGREDIRECT’, ” );
    // On a directory based install you must use the theme 404 handler.

    // Location of mu-plugins
    // define( ‘WPMU_PLUGIN_DIR’, ” );
    // define( ‘WPMU_PLUGIN_URL’, ” );
    // define( ‘MUPLUGINDIR’, ‘wp-content/mu-plugins’ );

    define( “WP_USE_MULTIPLE_DB”, false );

    //define(‘FORCE_SSL_ADMIN’, true);
    define(‘FORCE_SSL_LOGIN’, true);

    /* That’s all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);

    Try turning off the SSL login

    define('FORCE_SSL_LOGIN', true);

    If you are using my DM plugin, sign up to and ask about it there.

    We’d tried that earlier, but I just tried it again, and it doesn’t change anything. 🙁 See ya at 😛

    *believe* the problem was that I’d commented out the VHOST line (like my previous domain mapping plugin wanted). When I uncomment that line, things seem to be working! (for now)

    Thanks so much, guys

    Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    We also have your version and can go back to messing with that one, too – but that one had fubared all the uploaded images and documents. It wasn’t mapping any of those.

    really? weird, it’s supposed to go change everything. We working on a new version, so I’ll go double-check that part.

    @madtownlems – so it’s working now?

    Yes! Everything* seems to be working!

    (except for thumb.php dynamic images generated while you have the option set to NOT redirect to original domain. I think I found a fix for it, but just going to use the other option instead.)

    Thanks again for all the help.

    Now to try to write a plugin to hide the Domain Mapping submenu item (under tools) for everyone but siteadmins…

    – MadtownLems

    submenu hidden for non site-admins! 🙂
    progress progress go go go!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: WordPress MU Domain Mapping] can’t visit mapped blog admin pages’ is closed to new replies.