Restoring permissions when separating out WordPress multisite blogs

If you separated out your multisite WordPress blogs into individual blogs, but your administrators don’t have access to plugins, user management, and other important panels, then you will likely need to update your wp_options table to not have WPMU-specific user capabilities. First, make sure you’ve done everything in this post. I’m unsure if these instructions are old enough that they don’t account for certain changes required for current versions of WordPress, but I had to do the following steps in addition. As always, make a backup of your database first.

Run this query:

SELECT *
FROM `wp_options`
WHERE option_name LIKE 'wp_%user_roles'

You will likely see two rows, one with option_name equal to wp_<num>_user_roles and the other with option_name equal to wp_user_roles. Delete any wp_<num>_user_roles rows, then update wp_user_roles in wp_options to this value:

a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:62:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;s:12:"delete_users";b:1;s:12:"create_users";b:1;s:17:"unfiltered_upload";b:1;s:14:"edit_dashboard";b:1;s:14:"update_plugins";b:1;s:14:"delete_plugins";b:1;s:15:"install_plugins";b:1;s:13:"update_themes";b:1;s:14:"install_themes";b:1;s:11:"update_core";b:1;s:10:"list_users";b:1;s:12:"remove_users";b:1;s:9:"add_users";b:1;s:13:"promote_users";b:1;s:18:"edit_theme_options";b:1;s:13:"delete_themes";b:1;s:6:"export";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:34:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:22:"delete_published_posts";b:1;s:20:"delete_private_posts";b:1;s:18:"edit_private_posts";b:1;s:18:"read_private_posts";b:1;s:20:"delete_private_pages";b:1;s:18:"edit_private_pages";b:1;s:18:"read_private_pages";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:10:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;s:22:"delete_published_posts";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:5:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:12:"delete_posts";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}

This is the same value that wp_user_roles would be set to if if you installed a fresh copy of WordPress. If this particular value breaks your site or doesn’t otherwise work, try getting the value from a latest version install instead.

BackWPup: Amazon S3 Access Denied

I'm working on setting up a nightly backup addon for my hosting clients, and since most of my clients are on WordPress, I decided to first focus on setting up the backup to occur via WordPress plugin. Backups are going to an Amazon S3 bucket, and … [Continue reading]

Background Flicker on Hover in Chrome

Say you have a search bar with a submit button that changes background image (or background position) on hover. In my case, I'm using SVG files for the on and off background images, and I have a simple CSS-based preloader set up so that there's no … [Continue reading]

Trigger a SimpleModal Resize

I recently ran into an issue where I needed to force Eric Martin's SimpleModal jQuery plugin to resize and reposition itself, but couldn't find an easy way in the API to do so. I found several answers on Stack Overflow and other sites, but all of … [Continue reading]

The 8-Hour Workday vs. 8 Hours of Work

I've been freelancing full time for a few months now, and one of the first things I did when I decided to take the plunge was invest in time tracking software (Toggl, for those curious). I worked hard to get into the habit of using it religiously … [Continue reading]

MODX Revo 2.3.1 image upload bug

Just ran into this on a client's site. If you just upgraded Revo to 2.3.1 and your client (or you) likes to upload images via the manager dashboard, then you'll probably start seeing this error: Here is the fix: Go to System … [Continue reading]

View doesn’t render when last line is commented out

I plunged into the great jungle of full time freelancing last week, and since I knew I wouldn't have a full load right off the bat, I decided to start learning Ruby and Rails to broaden my skillset and do something productive with my extra time. I … [Continue reading]