Check if current site ID and value exist in WPDB

Note that you should be able to map domains without 3rd party plugins. Here’s an untested suggestion for your callback in your current situation: global $wpdb; // Nothing to do if not multisite if( ! is_multisite() ) return; // Define the custom table $wpdb->dmtable = $wpdb->base_prefix . ‘domain_mapping’; // Check if the custom table exists … Read more

Hosting multiple sites

If these sites are going to be distinctly different entities, then you are going to want to set up individual sites with individual databases. Especially if these are for different clients. The domain names will be handled by the hosting company and there should be something in cPanel that will facilitate that.

How can I use different domains on a WP multisite install?

To keep your options open with an open architecture you can create a multisite Network installation with multiple Networks. This means for each separate client you would give them a new Network. The advantage of this is that you can offer the scalability to Clients and keep your options open. Clients can easily have more … Read more

sub-page settings saving in NETWORK DASHBOARD

The easiest thing to do is to set the form’s action=” and use the global $plugin_page; as described in the Notes section of add_submenu_page(). For example: add_action (‘network_admin_menu’, ‘add_network_menus’) ; function add_network_menus () { add_menu_page (‘My Page Title’, ‘My Menu Title’, ‘manage_network’, ‘my_menu_slug’, ‘my_network_admin_page’) ; add_submenu_page (‘my_menu_slug’, ‘Some Subpage Title’, ‘My Submeny Title’, ‘manage_network’, ‘my_submenu_slug’, … Read more

WordPress homepage setup not working on first load

I would say that the parsing of the “hello world” post is due to the site home url being the default for new site initially. So after the theme functions.php file has run the first time on the first time the site is called your settings are updated by your code, then any future landing … Read more

Is WordPress cache shared for all blogs in a multisite network?

It depends. In general object cache (at least the APCu and memcache based) is global, and is global to the whole server, so the question can be rephrased to “Which caching keys are being prefixed/postfixed with unique strings based on the sub-site”. The answer, as can be seen in https://developer.wordpress.org/reference/classes/wp_object_cache/set/ is that wordpress core adds … Read more