SSL wildcard issue for wp multisite subdomains

my name is Daniel Kanchev and I work for SiteGround as a Senior Web Apps Engineer. The described issue is pretty strange and I just configured a test WordPress Network on one SiteGround shared server. I did not face any similar issues and I used sub-domain names with a wildcard SSL certificate. Usually such issues … Read more

Shared table across network

Use $wpdb->base_prefix . ‘table_name’ as a table name when you want to create a table for the whole network, or when you want to run queries on it. $wpdb->base_prefix is always the prefix for the current network’s main table.

Overriding the default WP Multisite notification e-mail

I was able to override the multi-site notification email by adding these: remove_filter(‘wpmu_signup_user_notification_email’,’admin_created_user_email’); add_filter(‘wpmu_signup_user_notification_email’,<function_name_here>); add_filter(‘wpmu_signup_user_notification’,<function_name_here>); add_filter(‘wpmu_signup_user_notification_subject’,<function_name_here>); Adding the three filters at bottom i.e. email,notification and subject allows you to override the content and the subject of the email.

Restrict Admin Capabilities in MultiSite

Editing super admin capabilities is a little different from editing the capabilities of every other role, because there is a slight detour in the way WP checks the current user’s capabilities. This is what you find on capabilities.php on line 864: function has_cap( $cap ) { // (…) // Multisite super admin has all caps … Read more

wp-activate.php causing white screen of death

[note: I solved the problem before asking this question and thought others would find my research/solution helpful, see Can I answer my own question?] The site in question uses a custom theme and site-specific plugin (that registers custom post types, custom taxonomies, etc), both of which I’ve written. It turns out that the wp-activate.php bootstrap … Read more

How can I diagnose a slow WordPress admin?

I cannot speak to all plugins loading even when disabled, but gravity forms is not designed for heavy usage and could well be contributing significantly to the problem. I used to work with a large client that used gravity forms and their admin panels ( and submitting forms ) became so slow that eventually they … Read more

How to list all network sites on one page

yes, small source for an template. <ul class=”postlist no-mp”> <?php /** * Old version, change on 07/23/2013 * $blogs = $wpdb->get_results( “SELECT blog_id,path FROM {$wpdb->blogs} WHERE blog_id != {$wpdb->blogid} AND site_id = ‘{$wpdb->siteid}’ AND spam = ‘0’ AND deleted = ‘0’ AND archived = ‘0’ order by blog_id”, ARRAY_A ); */ // get all blogs … Read more

WP Multisite: Adding pages on blog creation by default

The hook is not the problem – your code runs in the context of the current site, not the one just created! The following code isn’t tested, but it should at least highlight the problem: function wpse_71863_default_pages( $new_site ) { $default_pages = array( ‘Impress’, ‘Contact’, ); switch_to_blog( $new_site->id ); if ( $current_pages = get_pages() ) … Read more

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