How can I create network with different domains?

I have heard similar questions posed but not exactly what I am looking for. Is it possible to create a multisite with different domains and sub.doamins? For example, can I create a network that allows me to create build: SiteName1.com is a BuddyPress video community. DomainName2.net is an online shop that sells products. TheDomain3.co is a web design & hosting company that creates and manages other websites. Users must be able to create subsites of their own like (username.TheDomain3.co) Also …
Category: Web

Post and Page Inheritance to subsites in a WordPress Network

I have to develop a multi-country, multi-lingual website. One country may have multiple languages. I have setup a WordPress Network and created subsites for each country like following. abc.com/ > Global Website abc.com/usa > USA Website abc.com/fra > France Website I am detecting Countries through Geo Location API and forcefully redirect them to their own country's website. Each country has their own set of languages e.g. France will have English and French with French as default language. I decided to …
Category: Web

Programmatically creating site in a network

Goal Create multiple, predefined sites using wordpress multisite on plugin activation. Current Code $domains = array('however', 'many', 'hardcoded', 'subdomains',); foreach($domains as $domain){ $meta = array( 'public' => 1, 'WPLANG' => '', ); $newdomain = $domain . '.' . preg_replace( '|^www\.|', '', get_network()->domain ); $user_id = get_option('admin_email'); $id = wpmu_create_blog( $newdomain, get_network()->path, $domain, $user_id, $meta, get_current_network_id() ); if ( ! is_wp_error( $id ) ) { update_user_option( $user_id, $domain, $id, true ); } } } Current Functionality The code creates the sites …
Category: Web

Add Network Sites are not working

I have my website for tests. I added a Network and now I have 2 blogs. The second blog is in a subdirectory store as you can see in the screenshot. Now, if I open the store it seems the theme is missing. but also, if I click on Dashboard the page store/wp-admin is not found. I changed the wp-config.php and the web.config as the instructions. Here the webconfig <rewrite> <rules> <rule name="WordPress Rule 1" stopProcessing="true"> <match url="^index\.php$" ignoreCase="false" /> …
Category: Web

How to create a Multi-Network subsite?

I've enabled Wordpress Multisite (subdomains) on www.example.com, and installed/enabled WP Multi-Network. I've created a new network @ s.example.com. How do I create a subsite in that network, e.g. s.example.com/subsite? s.example.com/wp-admin/network redirects to www.example.com/wp-admin/network. If I create a new site @ www.example.com/wp-admin/network/sites.php, I can't make it a subdomain or subdirectory of s.example.com. Help appreciated.
Category: Web

400 Bad Request when sending XHR from React.js to admin-ajax.php

I'm trying to send ajax requests from a React.js app to wordpress's admin-ajax.php. Here is a mini test plugin I wrote to test this: // plugins folder > xhrLink/xhrLink.php <?php /* Plugin Name: Xhr Link */ function basicPage() { echo "<h1>Admin Page</h1>"; } function setupParams() { add_options_page('XHR Link', 'XHR Link', 'manage_options', 'xhr-link', 'basicPage'); } add_action('admin_menu', 'setupParams'); function handleXhrLink() { wp_send_json('this response came from the back end'); } add_action('wp_ajax_xhrLink', 'handleXhrLink'); // theme folder > functions.php function add_cors_http_header() { header("Access-Control-Allow-Origin: *"); } …
Category: Web

Is there a filter called 'network_admin_init'?

Is there a network equivalent to 'admin_init', or what do I have to do to add an action to network admin screens? I use 'admin_init' for an action on admin network screens, but the respective function is not executed. Thank you! Edit: Here's what I want to do. The respective plugin writes custom database tables and should therefore only by activated on a per-site basis in a network. function no_network_activation() { // echo 'test1 '; if ( is_network_admin() && isset($_GET['no-network-activation']) …
Category: Web

Wordpress multisite with same content

Trying to accomplish the following. Any help / advice is greatly appreciated. 1) I have multiple domain names (e.g., site1.com, site2.com, site3.com). 2) I need each domain to display the same content BUT 3) Show a different wordpress theme.Plugins are same...etc Thank you
Category: Web

Problem in Internationalizing a plugin built for network level usage

Context: I have created a plugin that is enabled only at the network level and it handles certain synchronizations between the child sites. As it is a network level plugin, it has its menu added to the network dashboard instead of the admin dashboards of child sites. Problem: I have implemented internationalization in the plugin following strict practices from the WordPress codex. For some reason, the load_plugin_textdomain function cannot load the .mo files I have generated. I have verified the …
Category: Web

unable to access network admin of a blog

I am unable to see it network admin link in a multisite blog. Can anyone tell me how to activate it again? I am logged in as super user. For the main blog I could see, I used to see the network admin link previously for any other blogs too if am logged in as super user but now I am unable to see. check the below images, Before, I can see network for all sites if am logged in …
Category: Web

Getting stylesheet error after setting subdomain to false in multisite

I have installed a multisite wordpress and had news.mysite.com as a secondary website. I want to change the address to mysite.com/news. To do so, I changed wp-config.php to: define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); define('DOMAIN_CURRENT_SITE', 'mysite.com'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); I also changed the .htaccess to: RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] …
Category: Web

Multi-Site Subdomain: Show master site under subdomain if no sub site exists

I've got the following situation: We got a WP Multisite and if a subdomain is not associated to a network site, we want wordpress to show the master site (e.g. blog ID 1) under this subdomain without a redirect. www.domain.com --> master site of the multisite network existing.domain.com --> shows the existing blog registered under this subdomain nonexisting.domain.com --> it should show the same as www.domain.com without any redirects. I have already changed wordpress to use root-relative URLs everywhere, so …
Category: Web

WP Multisite - domain mapping to domain.com and separate site to domain.com/help

I'm considering setting up a WP multisite network. It would seem to fit my situation perfectly. There's one thing I still need to find out about domain mapping. Say I have the multisite installed on the following example root domain: multisiteroot.com. Each subsite is installed on a subdomain. Further, I also registered a domain: businessdomain.com. I now want to have two separate WP websites and map them to respectively businessdomain.com and businessdomain.com/help (or sth like that). Is it possible to …
Category: Web

How do I change the Multisite URL?

The links in the navbar menu, in (My sites > Manage the network) are pointing (and keep redirecting) to incorrect URLs. The incorrect URLs are in this pattern: https://https//www.domain.com/wp-admin/network/ https://https//www.domain.com/wp-admin/network/sites.php https://https//www.domain.com/wp-admin/network/settings.php Even if I manually entered the correct URL without the repeated https, I am redirected to the wrong URL again. It seems that https//www is set somewhere instead of https://www, I can't find where. Places that I have looked and they were OK: wp-config.php (DOMAIN_CURRENT_SITE) .htaccess site table (domain …
Category: Web

How to hold posts and accounts for moderation on WordPress Network site

In WordPress MU is there a way for a network admin to hold posts in moderation? For example: A user creates an account and a site They create their first post The post is held in moderation and the network admin receives an email The network admin approves the post and / or the account The user can now see the post or can create future posts I think other sites like Discourse have this feature where the user is …
Category: Web

How to force change Network site multi language subdirectory base URL?

I have enabled network site and created two sites. Then I enabled WPML plugin on both sites. 1) First one is for English and all LTR languages. This one is working fine because it's base URL is like myweb.example.com. And other languages URL becomes like myweb.example.com/fr, myweb.example.com/ru etc. 2) Second one site is created for Arabic and all RTL languages. However the problem is that it's base URL is set to myweb.example.com/ar/. So now if someone wants to access another …
Category: Web

Merge Multisites with Shared Network Media Library

So have a multisite setup which no longer needs to be a multisite but I'm left with a bit of a mess since I used Network Media Library plugin to host images for all sites on the network. I'll try to break it down: started out with WP multisite created two sites on the network installed Network Media Library site #1 hosted the media library both sites hosted posts (about a year and a lot of posting goes by) pulled …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.