I have a highly optimized WordPress multisite (WPMU) installation running on Amazon EC2, RDS, Nginx, PHP-FPM, APC, BatCache and Memcached.
APC is only running at the PHP level, to cache opcodes, but I’m not using it for WordPress’s object cache. For that, I’m using BatCache+Memcached.
All of this is running amazingly well, super fast under load, etc., but I just ran into an unexpected problem.
I logged in as a test user, created a new blog, and when I logged into /wp-admin it told me I didn’t have permission. I logged out, logged back in, same problem. Then I logged out, restarted Memcached, logged back in and the problem was resolved.
I’m almost sure that this is caching-related. I probably need to hook into the new site creation process and clear some keys out of Memcached, but I’m not sure how to find the right keys to clear.
Help, please! 😉
I’m not very shure if this is connected with user role capabilities, but if it is…
this should be a little script to reset administrator capabilities to defaults:
This is an example.. you should fill $caps array with all capabilities, listed here