Single Site From Multisite Files: Need Full Admin Privs

Migrating a site with files supplied by former host. Unfortunately, it came from a multisite environment with Admin privileges restricted. One of the restrictions we notice after importing the site was the Admin cannot add a new theme (the “Add Theme” button is not present under Appearance > Themes) nor Delete any themes.

Looking at the database _usermeta > meta_value for the site owners wp_capabilities, we notice two different kinds of string for two different admins:

a:1:{s:13:“administrator”;b:1;}, which is normal and then
a:2:{s:15:“unfiltered_html”;b:1;s:13:“administrator”;b:1;}, which I believe was set from the host’s multisite control.

All I want to do is gain back full control of the WordPress environment.

The theme was purchased and manually installed. All plugins came from the plugin developers sites, so none of those assets were imported.

The WordPress files are completely fresh–we had the new host replace all of the WordPress files.

We’re thinking that somewhere within the database is the cause of the the restrictions and am not sure what (or where) else to look into changing things back to normal.

Appreciate some insight.

Thank you.

Hey, I totally feel your frustration—it’s such a pain when you don’t have full control over your own site, especially after going through a big migration like that!

It sounds like you’ve done a lot already by replacing the WordPress files and getting everything set up on the new host. The problem you’re describing, where you can’t add or delete themes, probably stems from some leftover settings from the multisite setup. Let’s see if we can sort that out.

First off, the issue likely lies in the database, specifically in the _usermeta table. There’s a setting in there called wp_capabilities that controls what each user can do. For a regular admin on a single site, you should see something like a:1:{s:13:"administrator";b:1;}. That’s just a fancy way of saying, “This user has full admin rights.” But you mentioned seeing an extra string with unfiltered_html, which might be some weird leftover from the multisite setup.

You can try tweaking that wp_capabilities value to match the standard admin one. If that doesn’t do the trick, you might want to check another setting called user_level. For a full admin, this should be set to 10. If it’s lower, that could be why you’re missing some controls.

Also, sometimes multisite setups leave behind other bits in the database. It wouldn’t hurt to poke around the wp_options table for anything that looks like it’s related to multisite settings. Sometimes just cleaning out those remnants can restore normal functionality.

If all else fails, you could even try creating a new admin user directly through the database. That might bypass whatever’s blocking you with the current user account.

Hope this helps you get back on track! It’s super frustrating to deal with these kinds of issues, but with a little digging, you should be able to take full control of your site again. Good luck, and feel free to shout if you run into more trouble!

Migrating a site from a multisite environment can indeed pose challenges, especially when it comes to admin privileges. It sounds like you’re facing restrictions related to your WordPress installation after the migration. Here’s a step-by-step guide to regain full control of your WordPress environment.

Step 1: Verify User Roles and Capabilities

Based on your description, it seems the user roles may have been altered during the migration. You’ve identified two different wp_capabilities strings in the _usermeta table:

  1. a:1:{s:13:"administrator";b:1;} — This is a standard admin role.
  2. a:2:{s:15:"unfiltered_html";b:1;s:13:"administrator";b:1;} — This indicates additional capabilities but may also imply some restrictions.

To restore full admin capabilities, you can modify the wp_capabilities entry for the affected user. Use the following SQL command, replacing your_user_id with the actual ID of your admin user:

UPDATE wp_usermeta 
SET meta_value = 'a:1:{s:13:"administrator";b:1;}' 
WHERE user_id = your_user_id AND meta_key = 'wp_capabilities';

Step 2: Check for Additional Restrictions

While the wp_capabilities change should help, you might want to look into other meta keys related to user capabilities:

wp_user_level: Ensure this is set to 10 for the admin user.

UPDATE wp_usermeta 
SET meta_value = '10' 
WHERE user_id = your_user_id AND meta_key = 'wp_user_level';

site_admins: Check if your admin user is listed here. This is relevant in a multisite environment.

Step 3: Review Network Settings (if applicable)

If your site was previously part of a multisite setup, check if any network settings persist in the database. Look into the wp_sitemeta table for potential restrictions or settings that may still be in effect.

Step 4: Clear Cache and Test Changes

After making the changes, clear your site’s cache if you have a caching plugin active. Then, log out and log back in to your WordPress admin panel to see if the “Add Theme” button appears under Appearance > Themes.

Step 5: Consider Database Cleanup

If issues persist, consider performing a thorough database cleanup. Use a plugin like WP-Optimize or similar to remove orphaned options and any remnants of multisite configurations that may not have been cleaned up.

These steps should help restore full admin capabilities to your WordPress site. Always ensure you back up your database before making direct changes. If the problem continues, it may be worth consulting with a developer who can delve deeper into the database and configuration settings.

If you have any further questions or need clarification on any of the steps, feel free to ask!

Thank you, jopojog997.

Yes, I did all of those steps about a month ago. We actually found a script that was creating an override. Once we nixed that script, everything was running smooth as silk.

Thank you for the feedback!