2

I've just successfully enabled networks in WP 3.2.1.

However, at top right, I have no Network Admin under my (admin) username.

If I go to /wp-admin/network, I receive "You do not have sufficient permissions to access this page."

  • In my WP_Sitemeta table, site_admins is set to a:2:{i:0;N;i:1;s:3:"My_Username";}.
  • admin_user_id in this table is blank.
  • In, WP_Usermeta, SL_capabilities is set to a:1:{s:13:"administrator";s:1:"1";} for my admin username.

I had disabled all plugins before install.

wp-config contains the following:

define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true );
define('SUBDOMAIN_INSTALL', true );
$base = '/';
define('DOMAIN_CURRENT_SITE', 'www.superlogical.net' );
define('PATH_CURRENT_SITE', '/' );
define('SITE_ID_CURRENT_SITE', 1 );
define('BLOG_ID_CURRENT_SITE', 1 );

Update: I had another look at wp-config.php, and the entries above were not there. I don't know why.

Adding them added "My Sites" to the top left under Dashboard.

However, I have no ability to add a site, and I get the same error when visiting /wp-admin/network.

2
  • Have you logged out and logged back in? Commented Sep 21, 2011 at 7:49
  • @Brian Fegter: Yes mate. No change. See below for solution.
    – Steve
    Commented Sep 25, 2011 at 6:49

2 Answers 2

4

I installed Wordpress 3.2.1 fresh on a new domain, and then enabled Multi-Site, which functioned as documented. I could reach /wp-admin/network without problems.

Comparing the database of this WP with the problem installation, in the wp_sitemeta table, admin_email was not set for the problem site.

Also, wp_sitemeta > site_admins was different. The problem website had it set to:

a:1:{i:0;N;i:1;s:3:"username";}

The correct value was:

a:1:{i:0;s:3:"username";}

Setting admin_email to my Admin account's email and changing siteadmins to the correct value above added "Site Admin" to the top right drop down box under my username.

However, when trying to load the Site Admin section, my browser produced an error:

This webpage has a redirect loop. The webpage at [baseurl]/wp-signup.php?new=[baseurl] has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.

After I added www. to:

define('DOMAIN_CURRENT_SITE', 'www.example.com' );

in wp-config.php, I was able to load /wp-admin/network without problem, and all network / multi-site options were visible.

2
  • Note that the redirect loop was probably being created by an .htaccess directive. I did not have this problem. Also for the site_admins value, use an online serializer/unserializer to modify the value and paste it back in to the DB.
    – Costa
    Commented Oct 14, 2014 at 1:16
  • Any chance of writing a SQL to do this edit in the database? I tried this: insert into wp_sitemeta (site_id, meta_key, meta_value) values(1, 'site_admins', 'a:1:{i:0;s:3:"lucre";'}); but it gives me an error about mariabdb Commented Aug 19, 2019 at 15:13
0

the new username has to be SERIALISED. use this: http://serialize.onlinephpfunctions.com/

type:

array("0" => "siteadminusernamehere");

where 0 = your user number and the other stuff is your site admin username.

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.