How to create WordPress multisite with different domains

WordPress MultisiteThis can be done with a single WordPress InstallationCreate multiple sites. You can even assign each site its own domain name.

What is WordPress Multisite?

WordPress Multisite is a core WordPress feature that allows you to create multiple sites with the same WordPress installation.

The advantage is that you can use it for every websiteDifferent domain names. This allows for quick launching of websites without having to manage multiple WordPress installations.

From a development perspective, this providesShared clients, similar design elementsetc. flexibility.

The downside is that all sites use the same resources. This means that if the server goes down, then all sites go down at the same time.

图片[1]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

Step 1: Install WordPress Multisite

If you are creating a WordPress multisite on a brand new website, install WordPress first.

After installing WordPress, the next step is to enable the WordPress multisite feature.

Enabling WordPress Multisite

The WordPress multisite feature is built into WordPress, but by default is in theclosed stateThis feature is enabled in order to set up WordPress Multisite. You need to enable this feature to set up WordPress multisite.

To edit wp-config.php fileIt is a WordPress configuration file that contains all the important settings for your WordPress installation. It is the WordPress configuration file that contains all the important settings for WordPress installation.

It can be edited using an FTP client or the File Manager application in the Control Panel. wp-config.php file is located in the root folder of the website.

图片[2]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

In this file, to be found in the "That's all, stop editing! Happy publishing."Add the following line of code above the line.

	define( 'WP_ALLOW_MULTISITE', true );

Afterward, remember toSave Changesand put the fileupload sth. back to the websiteThe

Now, switch back to the WordPress admin dashboard and reload the admin dashboard page.

Then, go toTools "Network Settingspage to configure a WordPress multisite network.

图片[3]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

First, select the subdomain as the "Site Addresses in the Network", and give titles to multisite networks and network administrator e-mail addresses.

Click "mounting"The button continues.

On the next page, WordPress will ask for two pieces of code to be added.

图片[4]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

First entry wp-config.php fileIt's right here."That's all, stop editing! Happy publishing."Above the line.

In addition to the code that WordPress displays, the following line of code needs to be added to the wp-config.php file. This line of code ensures that users can log in to each site.

	define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );

The second piece of code goes into the WordPress .htaccess file and replaces the default WordPress .htaccess rule.

After adding the two codes to the appropriate files, log in to the WordPress admin dashboard.

图片[5]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

After logging in, you'll see an admin bar named "My Website" for a new menu item. Hover over it and select
Network Administrator dashboardLink.

图片[6]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

Step 2: Creating a New Website in WordPress Multisite with Custom Domains

Now that everything is set up, start creating your first website with a different domain name.

From the multi-site network management dashboard, click theSite "Add NewPage.

图片[7]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

Simply provide the site address and title, select the language, and enter the administrator's corporate email address. As for the site address, you can now add anything here and in the next step it will be changed to a custom domain name.

Click "Add site" button to create the site.

Next, go toSites "All Sitespage, and then click below the site you just created on the "compiler"Link.

图片[8]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

On the Site Edit screen, under the Site Address field, you want to add the customization you want to use for the sitedomain nameThe

WordPress comes with built-in domain mapping, which automatically maps custom domains to site addresses.

图片[9]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

Always remember to click "Save Changes"Button.

Repeat this process to add more sites and then just change their site address to the custom domain name you want to use. Here we have created a number of sites with different custom domain names.

图片[10]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

However, none of these sites are accessible because the custom domain names are not pointing to your server's IP address. (Just resolve these custom domain names to your server's IP address)

domain name resolution

I'll give you a demonstration with AliCloud. (The logic of WordPress self-hosting is the same, where you buy the domain name, just go to where the domain name is resolved to the IP address of your server)

1.Login Cloud Resolution DNS Console

2. On the domain name resolution page.All Domainstab, clickdomain name, go to the Parse Settings page.

图片[11]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

3. Adding records

  • For example, the main domain name guangzi.com (just registered domain name).
  • If you want to enable access via www.guangzi.com and guangzi.com, you need to add theTwo parsed records(@ and www), as shown below.
  • first in Parse Settings page, click Add Record Button.

First A record:"@"

图片[12]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

Article IIA records:"www"

图片[13]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

The domain name resolution is done.

Step 4: Managing and Logging in to WordPress Multisite on Custom Domains

Most administrative tasks can be operated from the root site's dashboard, such as: installing plugins, themes, and updates.

图片[14]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

To process a single site, visitSites "All Sitespage, and then click below the site to be processed on the "instrument panels"Link.

图片[15]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

This will go into the administration area for that particular site and may require theLog in againThe

From here, pages can be created, blog posts written and individual websites managed.

图片[16]-怎么创建有不同域名的 WordPress 多站点-光子波动网 | 专业WordPress修复服务,全球范围,快速响应

I hope this article will help you guys understand how to create WordPress multisite with different domains.


Contact Us
Can't read the article? Contact us for free answers! Free help for personal, small business sites!
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: info@361sale.com
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
This article was written by Harry
THE END
If you like it, support it.
kudos0 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments