Multiple Multisite networks on the same domain?

You can not run different networks or different Multisite installations under one domain in the default possibilities of WP. But you can use one Multiste with multiple networks with the help of a plugin – https://wordpress.org/plugins/wp-multi-network/ With this plugin get you the chance to create different networks with sites in one installation, one Multisite. Like … 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’ );

Moving to a new domain in the same server

You are facing the error because the database tables have old domain stored in all tables and post meta data. You need to replace all instances of previous domain with the new one in the database, the following link will help: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ You should also update your permalinks after the above process.

Can WordPress be installed at the root level, if a homepage called index.php already exists?

In theory, you could rename the file and change the rewrite rule accordingly. Assuming you rename it to wp-index.php, it would look something like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wp-index.php [L] </IfModule> There are a few references to index.php in the WP source, but they’re … Read more

On Install, which code sets the ‘home’ option?

When the installer runs it calls wp_install(), that in turn calls populate_options() defined in wp-admin/includes/schema.php, which runs the following.. if ( !__get_option(‘home’) ) update_option(‘home’, $guessurl); Prior to that $guessurl is defined by.. $guessurl = wp_guess_url(); The guess URL function is defined in wp-includes/functions.php and looks like this. function wp_guess_url() { if ( defined(‘WP_SITEURL’) && ” … Read more

Programatically Creating Initial WordPress Site

I’d highly recommend WP-CLI for such tasks. It is a tool that allows installation and configuration of WordPress on the command line. What you are trying could easily be done: wp core download wp core config –dbname=<dbname> –dbuser=<dbuser> –dbpass=<dbpass> wp core install –url=<url> –title=<site-title> –admin_user=<username> –admin_password=<password> –admin_email=<email> There are a lot of other commands that … Read more