10

Since version 3.0 there is no such product as "multisite" neither by name nor by code (mostly anyway), it is just another configuration option of wordpress, one that requires some extra admin work to activate, but essentially it is not some separate code base. When there is a reference to "multisite" today, it is a reference to the configuration, not a ...


6

There is no function for that. But you can use a custom SQL query like this … SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE site_id = $wpdb->siteid AND `meta_key` NOT LIKE '_site_transient%' ORDER BY meta_key … to get all non-transient options. Basic example: /** * Plugin Name: T5 Multi-Site Options * Description: ...


5

There are functions for saving and retrieving network-wide options: add_network_option(); update_network_option(); get_network_option(); The values of these options are stored in wp_sitemeta.


4

There are 5 values need to change. From database. wp_options: options named “siteurl” and “home” wp_site wp_sitemeta: the option named “siteurl” wp_blogs: any entries in the “domains” column that have the old domain name wp_#_options: Each sub-site will have sets of tables that correspond to the blog_id in the wp_blogs table. You need to go to the wp_#...


3

WP CLI has a command that can upgrade the database: wp core update-db If that command doesn't upgrade the entire network, you can pass in the site you want upgraded as an additional parameter e.g. wp core update-db --site="http://example.com/testsite/" You can get WP CLI from here: http://wp-cli.org it's also available on github You can install using:...


3

This should do the trick. Read along with the comments for some explanation. // get users with specified roles -- this can go in functions function get_users_with_role( $roles ) { global $wpdb; if ( ! is_array( $roles ) ) $roles = array_walk( explode( ",", $roles ), 'trim' ); $sql = ' SELECT ID FROM ' . $wpdb->...


3

Create your own plugin with this code or put this in theme's functions.php add_action('init', 'remove_update_notification', 1) function remove_update_notification() { if (!current_user_can('manage_network')) { // checks to see if current user can update plugins add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check'...


3

I had to write a little plugin to bypass the check - free to download and use. <?php /** * Plugin Name: Upgrade SSL Bypass * Description: The DB-Upgrade process for networks does not work if there's an error with your SSL certificate. This plugin bypasses the check by disabling the verification in case of an error. * Version: 2013-01-02.1502 * ...


2

Plugins with Network: true in their header cannot be seen, activated or deactivated in sub sites. The reason is simple: You need super admin rights to do something with them, and their settings section (if there are any) are visible in wp-admin/network/ only. Even if you are the super admin and on a sub site you will not see those menus usually, because the ...


2

Or For adding your sites on "My Sites" if you've missed them, then you can add them by go to Network Admin > Dashboard > All Sites > Edit Your Desired Site > Users (Tab) > Add Existing User > Add your desired existing username and role it as "Admin" Regards.


2

There's get_users() -- you could use it in conjunction with the results of a $wpdb query along the lines of $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" ); function tell_all() { global $wpdb; $all_sites = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" ); $list = array(); foreach( $all_sites as $site ) { $...


2

If you not want to use any script then you can use wordpress plugin Export Users to CSV.This can export ALL user data and meta data, and that works! You can even export the users by role and registration date range. Features: Exports all users fields Exports users meta Exports users by role Exports users by date range


2

Make backups before attempting anything. Phpmyadmin, SQL tab, then: "Run SQL query/queries on database": SELECT COUNT(*) AS Rows, user_login, user_email, user_nicename, user_url FROM wp_users GROUP BY user_login ORDER BY user_login OR if you're not comfortable with SQL: Select wp_users "Check All" Query results operations Export Then select MS Excel ...


2

It depends on your user account structure. The superadmin of the MU can always edit anything and you cannot lock that one out for obvious reasons, but you can remove all other users from that 1 website you want to lock down. Go to Network Admin > Sites > Edit (link) and then in the Users TAB you can remove all users except the network superadmin. If you ...


2

Go to wp-admin/network/sites.php. Edit one site, and set a language for that blog: No do the same on a second site. There have to be two sites with an associated language. And then you get the relationship setting below on the same page after hitting F5 one time. This will be fixed in the next release. I am helping out on that plugin now, implemented ...


2

I was using WordPress Multisite for multiple TLDs. Example: domain.com another-domain.org sample-domain.net The primary site was domain.com which was a valid registered domain name with proper DNS resolution. another-domain.org and sample-domain.net had both expired domain name registrations. A/K/A - The DNS wasn't resolving properly. If you've got a ...


2

Well, your steps are pretty much all you need to do, the only other thing I'd do is to use the WP Migrate DB plugin(I personally use it and it saves me a lot of time when migrating the Database) - it supports for change of both URL and paths - you can change one or both of them as well. So here's your list with my suggestion: Put a maintenance message on ...


2

You could use the technique in this Stack Overflow answer, that's basically: switch_to_blog(1); //switch to main site $latest_posts = get_posts($args); foreach( $latest_posts as $post ) { // print post } restore_current_blog(); Just add 'post_type' => 'your-custom-post-type' to the query.


2

What I would do is create a parent theme that is used on one site and a child theme of that theme for all other sites. In the parent theme's header a you would do a regular wp_nav_menu() call to build your menu, except you wouldn't echo it. Instead return the menu into a variable, pass that to update_option and then echo it. In your child theme's header.php,...


2

There's a filter called all_plugins that seems to do the trick for me: add_filter( 'all_plugins', 'wpse156903_hide_plugins' ); function wpse156903_hide_plugins( (array) $plugins ) { // let's hide akismet if( in_array( 'akismet/akismet.php', array_keys( $plugins ) ) ) { unset( $plugins['akismet/akismet.php'] ); } // hide multiple ...


2

Sorry, bad news. If you look in the code-base of WP 3.9 for the responsible PHP file (which is site-new.php) you'll unfortunately see that this is all hardcoded, like a lot of stuff in wp-admin, which IMHO totally sucks. :-( The only thing you can do is to build your own page for site creation and make it replace the default wordpress one. To give you a ...


2

You can use Multisite Clone Duplicator plugin.


2

I think to explain it all here is a bit beyond the scope. Perhaps it is best to start here, and then you can ask detailed questions if you encounter problems:https://www.wpbeginner.com/wp-tutorials/how-to-install-and-setup-wordpress-multisite-network


2

I'd recommend using get_sites() instead of crafting $wpdb calls. Add this code to your theme's functions.php file. function wpse365255_print_sites() { $args = array( 'number' => 10000, // if you've got more than 10,000 sites, //you can increase this 'public' => 1, 'spam' => 0, ...


2

Yes, this is possible (see https://wordpress.org/support/article/create-a-network/). For sub-domains you'll need to confirm that your DNS has a wildcard entry for your domain. So, based on your root domain, this would work for: mysub1.multisiteroot.com, mysub2.multisiteroot.com, etc. If you wanted to us different domain names for subsites, then you'd need to ...


1

I got it to work as follows -- in mu-plugins directory, my superAdmin.php script looks like this: <?php function check_for_superAdmin($user_login, $user) { $current_user = get_userdatabylogin($user_login); if ( is_super_admin( $current_user->ID ) ) { // do these things } else { // do other things } } add_action( 'wp_login', '...


1

network admin_url filter can rewrite network admin url. But i don't know it is a best way or not. // wp-config.php /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php'); // add code // define('__WORDPRESS_CORE_DIR__', '/wordpress'); add_filter('network_admin_url', 'rewrite_my_network_admin_url', 10, 2); function ...


1

get_sites() will get a list of the sites in a Multisite network. You can then use switch_to_blog()[*], get_posts() / get_pages(), and restore_current_blog()[*] to get the pages from the various sites. I'd strongly recommend storing the results as a sitewide option using update_site_option() to lessen the load on your server. You could add a job to wp_cron()...


1

There are two aspects to site's URL in WP (baseline case, multisite aside): Which URL it considers "real", responds to, and uses to generate links. URLs previously generated and persistently stored in content. Former is pretty malleable and as you discovered already is simply a matter of configuration. More so it's technically easy (and practically useful ...


1

By default, yes, you will have conflicts. The default WordPress .htaccess rules look something like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress The -f ...


Only top voted, non community-wiki answers of a minimum length are eligible