Add role across network in multisite

This is my experience. I had to add role for each site in WordPress, I developed an add page in dashboard so the site administrator can add the self-defined role/capabilities. But I found the $wp_roles->add_role, add_cap only works the subsite. So I did some fix, I’ve made a plugin, the super-admin(not site administrator but the … Read more

Removing orphan users in WordPress Multisite

You’ll need to select all available users (see $users below) to loop through each one and decide if it’s a demouser; to delete all users with no associated site (see empty($user_blogs) below) you can call wpmu_delete_user() (this will require to load ms.php, if you’re loading it within a theme or plugin). Just add the following … Read more

Weird Issue with load balanced WP 3.0 setup

Likely this is result of check_admin_referer() function not recognizing your request as coming from admin area. Since your query clearly contains nonce it is likely what is not being recognized. Nonces can be locked down in many ways. They are unique to the WordPress install, to the WordPress user, to the action, to the object … Read more

Multisite with Different Domains

Domain mapping is the correct answer to your question, because that isn’t how the domain mapping plugin works at all. Take a look at http://ottopress.com. It really lives at http://ottodestruct.com/op/, but you wouldn’t know it, would you? It’s a domain mapped site on a multisite installation. If you’re getting a redirect to the wrong URL, … Read more

How to synchronize user profile fields in multisite?

This code works, but it’s only been tested in a localhost environment. There’s a function extracted from the plugin Multisite User Management, which is based on the get_blog_list function, that has been deprecated. No alternative available. For performance reasons this function is not recommended. The user meta has to be checked individually, i.e.: Aim, Jabber, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)