WordPress multisite, allow non super admins to create sites

In multisite installation there already is a default admin and super-admin role, and if standard capabilities are different than what you want you can modify them: A default set of capabilities is pre-assigned to each role, but other capabilites can be assigned or removed using the add_cap() and remove_cap() functions. New roles can be introduced … Read more

Add the site’s name as prefix when adding new users? Multisite

I have noticed that the code our friend shares has an error. Add the prefix twice. I share other code with this error resolved. <?php add_filter( ‘pre_user_login’, ‘sneakily_add_prefix_to_username’ ); function sneakily_add_prefix_to_username( $username ) { if ( ! current_user_can( ‘manage_network’ ) ) { $blog_id = get_current_blog_id(); $blog_details = get_blog_details( $blog_id ); $sanitized_path = str_replace( “https://wordpress.stackexchange.com/”, ”, … Read more

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