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:
a:1:{s:13:"administrator";b:1;}
— This is a standard admin role.
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!