Ever since I upgraded my multisite network from 3.8 to 3.9, I have not been able to login through the main blog. It's a subdirectory install, not subdomain.

When I try to login to the main site: http://uspress.avenues.org/wp-login.php, get the the message "This user has elected to delete their account and the content is no longer available." This is not true. As far as I can see, you can't delete the main site, and I've checked the database and the site is set to be public.

I can log in if I go to a subsite's login page like so: http://uspress.avenues.org/kgarnier/wp-login.php

The home page of the main site is accessible, but if I try to go to another page on it, and I'm not logged in, I get the same error message. If I am logged in, I get the standard Wordpress 404 error page, but, bizarrely, it switches to another subsite that has been deleted (it had same behavior before it was deleted, I deleted when trying to fix this).

My wp-config file looks like this:

/* Multisite */
define('WP_ALLOW_MULTISITE', true );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'uspress.avenues.org');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('WP_DEFAULT_THEME', 'uspress');

I also added this cookie clearing code that was suggested on another site:

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

My .htaccess file looks like this:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

# END WordPress

One other weird but maybe unrelated thing: In the blog_versions table in the database, the main site has db_version 26692 and all the others have 27916.

1 Answer 1


This is the relevant code from ms_site_check():

$blog = get_blog_details();

// truncated

if ( '1' == $blog->deleted ) {
    if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) )
        return WP_CONTENT_DIR . '/blog-deleted.php';
        wp_die( __( 'This user has elected to delete their account and the content is no longer available.' ), '', array( 'response' => 410 ) );

So while site might not be actually deleted, for some reason WordPress is pretty confident that it is. The first thing I'd look at are DB queries being generated/run and data which is returned.

  • Aha. It seems I have a number of "deleted" sites with the path uspress.avenues.org/. I think this happened with a bad batch create of users and sites that I did a while ago. the ms_site_check() function is detecting one of those (blog_id 173) instead of the original main site (blog_id 1). I'm hoping I can just delete these sites from the wp_blogs table to fix this?
    – Katy
    Commented Aug 31, 2014 at 15:33
  • @Katy hard to say if that will fix it without hands–on debug through everything :) It might...
    – Rarst
    Commented Aug 31, 2014 at 15:37
  • It actually did! I should probably clean out all the tables related to those sites, but it's working now so I'm afraid to do anything else.
    – Katy
    Commented Aug 31, 2014 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.