WordPress Multisite Add User

Ok, so this isn’t possible to do by default. As I already had a hook for wpmu_activate_blog() I just created another with a lower priority which will be fired after. This function also has the 2 parameters I need. So upon activation of the account I simply remove Admin role and set a new role … Read more

How to delete user from MU site when the user is removed from their site?

The function you are looking for is wpmu_delete_user($user->ID) I wrote a small plugin to delete users across the whole network by role: <?php /** * Plugin Name: Regbox Delete multisite users * Plugin URI: http://www.regbox.se/delete-multisite-users * Description: Delete users by role across network * Version: 0.1 * Author: Adam Rehal * Author URI: http://www.regbox.se * … Read more

Multisite network admin – User’s role not showing up

This worked for me: Make sure the row in option-table in the database for wordpress-site have the correct option_name for the serialised roles-data. For instance; if the database-table is wp_options, the column option_name in the role-row should be wp_user_roles. if the database-table is wp_20_options, the column option_name in the role-row should be wp_20_user_roles. Don’t ask … Read more

Check if current site ID and value exist in WPDB

Note that you should be able to map domains without 3rd party plugins. Here’s an untested suggestion for your callback in your current situation: global $wpdb; // Nothing to do if not multisite if( ! is_multisite() ) return; // Define the custom table $wpdb->dmtable = $wpdb->base_prefix . ‘domain_mapping’; // Check if the custom table exists … Read more

How can I use different domains on a WP multisite install?

To keep your options open with an open architecture you can create a multisite Network installation with multiple Networks. This means for each separate client you would give them a new Network. The advantage of this is that you can offer the scalability to Clients and keep your options open. Clients can easily have more … Read more

sub-page settings saving in NETWORK DASHBOARD

The easiest thing to do is to set the form’s action=” and use the global $plugin_page; as described in the Notes section of add_submenu_page(). For example: add_action (‘network_admin_menu’, ‘add_network_menus’) ; function add_network_menus () { add_menu_page (‘My Page Title’, ‘My Menu Title’, ‘manage_network’, ‘my_menu_slug’, ‘my_network_admin_page’) ; add_submenu_page (‘my_menu_slug’, ‘Some Subpage Title’, ‘My Submeny Title’, ‘manage_network’, ‘my_submenu_slug’, … Read more

Is WordPress cache shared for all blogs in a multisite network?

It depends. In general object cache (at least the APCu and memcache based) is global, and is global to the whole server, so the question can be rephrased to “Which caching keys are being prefixed/postfixed with unique strings based on the sub-site”. The answer, as can be seen in https://developer.wordpress.org/reference/classes/wp_object_cache/set/ is that wordpress core adds … Read more