How to combine multiple sites to WordPress MU

Manually I’m pretty sure I’ve seen this topic covered by Ipstenu and/or Andrea in Multisite support forum. But this demands a in-depth search in the un-friendly search functionality of WordPress.org. And if my memory serves me well, I think the solution is to invert the method used to extract a site from Multisite. This method … Read more

How to prevent first post and first comment on WP MU?

I usually just run a function on wpmu_new_blog – best to put in mu-plugins function wpse_wpmu_remove_default_content($blog_id, $user_id, $domain, $path, $site_id, $meta) { if ( !current_user_can(‘manage_network’) ) return; switch_to_blog($blog_id); // Remove the default post & page wp_delete_post(1, true); wp_delete_post(2, true); // Remove the first comment wp_delete_comment( 1, true ); restore_current_blog(); } add_action( ‘wpmu_new_blog’, ‘wpse_wpmu_remove_default_content’ );

Multisite use language code as subdirectory

Here’s a proper multisite solution: Install WordPress directly on the root of your domain mysite.de. After that, setup a multisite and chose the subdomain option (Yes, subdomain! It’s far more flexible and you can use it with subdirectories as well). WordPress will ask you to update wp-config.php and .htaccess. To the wp-config.php add the following … Read more

How to share same post to multiple site in wordpress?

You can use the function switch_to_blog() for this $other_id = 1234 // the id of the other blog to save the post to switch_to_blog($other_id); $my_post = array( ‘post_title’ => $post_title, ‘post_content’ => $post_content, ‘post_status’ => ‘publish’, ‘post_author’ => $post_author, ); // Insert the post into the database wp_insert_post( $my_post ); restore_current_blog(); There is a pitfall … Read more

Multisite without .htaccess

e.g. wpinstance.com/wp-admin is not rewritten into wp-admin/ with a trailing slash, but into ugly long link: https://wpinstance.com/wp-login.php?redirect_to=https%3A%2F%2Fwpinstance.com%2Fwp-admin%2F&reauth=1 As is already mentioned in comments, this is intentional. There is no “pretty” URL for this. And neither does there need to be – this should not be indexed or linked to. do I need .htaccess? No, you … Read more