Merge Multiple Sites/Networks (at least 2) into One Site/Network
Easiest way would be to just export the one WordPress site, and then import it into the new site. Don’t try to get too complicated with this.
Easiest way would be to just export the one WordPress site, and then import it into the new site. Don’t try to get too complicated with this.
switch_to_blog does not support switching to multiple blogs at the same time, instead if you want to list all posts in a network, you’ll need to loop through each blog, using switch_to_blog and restore_current_blog, saving each post in each site into a PHP array, then finally displaying every post in that array once it contains … Read more
I recommend using the search replace on ALL wordpress tables. You will have missed the entries in the options table as well as many other locations such as post meta, etc
You could you do this with redirects through the root .htaccess file; Something like this perhaps: # Redirect to new login <IfModule mod_rewrite.c> # For security reasons, Option followsymlinks cannot be overridden. # Options +FollowSymLinks Options +SymLinksIfOwnerMatch RewriteEngine on RewriteCond %{HTTP_HOST} ^subdomain.mysite.com/login.php [OR] RewriteCond %{HTTP_HOST} ^www.subdomain.mysite.com/login.php [NC] RewriteRule ^(.*)$ http://www.my-main-site.com/login.php/$1 [L,R=301] </IfModule> # Redirect end … Read more
The technique is basically the same as in the case of wpmu_signup_user_notification(). function wpmu_welcome_user_notification($user_id, $password, $meta=””) { global $current_site; $welcome_email = get_site_option( ‘welcome_user_email’ ); $user = new WP_User($user_id); $welcome_email = apply_filters( ‘update_welcome_user_email’, $welcome_email, $user_id, $password, $meta); // Get the current blog name $blogname = get_option( ‘blogname’ ); $welcome_email = str_replace( ‘SITE_NAME’, $blogname, $welcome_email ); $welcome_email … Read more
For create the links to your child sites use this function elenco_sotto_siti(){ global $wpdb; $blogs = $wpdb->get_results( $wpdb->prepare(“SELECT * FROM $wpdb->blogs WHERE public=”1″ AND archived=’0′ AND mature=”0” AND spam=’0′ AND deleted=’0′ ORDER BY blog_id “),ARRAY_A ); return $blogs; } For question 2 and 3, i use the option framework plugin, and i grab the description … Read more
I have all my sites hosted at WP Engine, they have an AWESOME product, they only host WordPress sites, so their support staff REALLY knows WP. In my opinion you can’t go wrong with WP Engine. I don’t work for them, and I didn’t even use an affiliate link, so I hope you know that … Read more
The function current_user_can_for_blog() seems to be what you are looking for. With your example above, this solution should work: $blog_id = 1; //set the blog id to the main site id if (current_user_can_for_blog($blog_id, “access_mainsite_s2member_level1”)){ the_content(); }
if(is_super_admin() && is_network_admin()){ // do network admin only code } http://codex.wordpress.org/Function_Reference/is_super_admin http://hitchhackerguide.com/2011/02/24/is_network_admin/
global $wpdb; $posts = $wpdb->get_results(” SELECT * FROM `wp_posts` p inner join `wp_posts` i on i.id=p.id and p.post_type=”post” and i.post_type=”attachment” where i.post_parent=p.id “);