List all blogs a user can admin [duplicate]

This solution works for me: $user = get_current_user_id(); $blogs = get_blogs_user_can_admin($user); function get_blogs_user_can_admin($user) { $blogs = get_blogs_of_user( $user, true ); foreach($blogs as $key => $blog) { switch_to_blog($blog->userblog_id); if( !current_user_can(‘manage_options’) ) unset( $blogs[$key] ); restore_current_blog(); } return $blogs; }

WordPress Multisite

Yes, Multisite is your best choice, you can share plugins, themes and users between websites if you want, also you can have some plugins, themes and users retricted to some sites only. Also you can have top domains for every site into the multisite.

Multiple WordPress sites on one hosting [closed]

You can have each site with a separate database (individual copies of WP), or one database with multiple sites (WP Multisite). If you go Multisite, each sub-site can have its own domain assigned to it. Multisite has common themeing and plugins, although you can have a different theme for each sub-site.

Is there a full explanation on how to share a database with two WordPress sites on same server?

It is possible to add custom queries to the 2nd site, and pull posts from the first site: <?php $mydb = new wpdb(‘root’,’root’,’dev1′,’localhost’); $query_result = $mydb->get_results(“SELECT * FROM $wpdb->posts WHERE post_status=”publish””); if ($query_result) { foreach ($query_result as $result) { setup_postdata($result); get_template_part( ‘content’, get_post_format() ); } } else { echo “<p>Not found</p>” ; } ?> See … Read more

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