WordPress

What is WordPress Multisite?

WordPress Multisite

What is WordPress Multisite?

The multisite is a WordPress option that allows us to have more than one website within the same database. It is especially useful in several cases, for example:

Our server hosting only allows us a database: Using multisite we can have more than one site hosted working in WordPress as long as we do not care about this synergy.

We want to have more than one site but share the registered users among them, for example in the case of Digital Nomad we use multisite so that each user registered in the community database is also registered in the magazine part, in this way if A user is logged in and will not have to enter each time they change their site.

We want to maintain a site but for various reasons we want to install more than one theme, maintaining different aesthetics between one and the other. That’s right, multisite allows these sites to work on certain things independently so we can install different themes and plugins.

The Multisite can work in three different ways:

  1. With different subdomains site1.domain1.com, site2.domain1.com, site3.domain1.com
  2.  With different differentes: dominio1.com/sitio1, www.dominio1.com/sitio2, www.dominio1.com/sitio3
  3. With different domains: www.dominio1.com, www.dominio2.com, www.dominio3.com

I have ordered them based on the ease of configuration, although the third case is not excessively complicated, much less, in some cases, it requires changes in the WP-config for its correct operation.

On the other hand, for SEO issues I will never be especially the fan of the subdomains, so if I do not have different domains (or do not want to use them) I will always opt for the second option.

How to Install WordPress Multisite?

We go step by step below 🙂

1. Prepare your WordPress

Things will change on your site unless it is a newly created site so we always recommend that you make a copy of your files and your database.

Disable all plugins during activation, then you can activate them again

In the case of wanting to use subdomains, create the subdomains first.

2. Make changes in your wp-config

To activate the Multisite you have to access your wp-congig.de file on your FTP

Open your file and add the lines you see below just above where it says: / * That’s all, stop editing! Happy blogging * /.

/ * Multisite * /
define ('WP_ALLOW_MULTISITE', true);

You will need to refresh your browser window (Dashboard) to see the changes.

3. Create the network

The previous step allows us to see a new option in our configuration. For this, we will have to go to the sidebar of our dashboard (Tools/tools) and we will see a new item: Network Configuration / Network setup. From there we will use “Create a network of WordPress sites”

4. Configure the addresses of the websites in your network

As we said before you have three options, but in this case, you will only see two, the first and the second of which we speak (subdomains or subdirectories) for the third you have to take extra steps.

With almost all security, the first option will always be possible, but if your website is already one month old and the links are personalized, you will not be able to directly access the subdirectories option, for which you also need a couple of extra steps.

Option 1: subdomains

The simplest one, simply choose the listing option and you’re done

Option 2: Sub-directories

If you are sure that your subdirectories will not bring problems with other pages of your website (there are no repeated URLs between a site and a page for example) then you can change this at the end of the installation.

define ('SUBDOMAIN_INSTALL', true);

By:

define ('SUBDOMAIN_INSTALL', false);

Ready.

5. Complete the data of your network

These data are created automatically but you can make changes if necessary.

Server Address
The domain, the URL that we use to access our WordPress

Network Title
The title of the network, in full.

Admin E-mail Address
The administrator’s email, which will now be the SUPER administrator for the entire network.

Give it a second view to avoid silly mistakes and finally hit the “Install” button

6. Re-edit your wp-config and .htaccess

After this step, you will be asked to add some instructions to your wp-admin (he will give them to you) as well as to your .htaccess

wp-config

define ('MULTISITE', true);
define ('SUBDOMAIN_INSTALL', true);
define ('DOMAIN_CURRENT_SITE', 'xn--espaoladas-w9a.com');
define ('PATH_CURRENT_SITE', '/');
define ('SITE_ID_CURRENT_SITE', 1);
define ('BLOG_ID_CURRENT_SITE', 1);

.htaccess

RewriteEngine On
RewriteBase /
RewriteRule ^ index \ .php $ - [L]

# add to trailing slash to / wp-admin

RewriteRule ^ wp-admin $ wp-admin / [R = 301, L]

RewriteCond% {REQUEST_FILENAME} -f [OR]
RewriteCond% {REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^ (wp- (content | admin | includes). *) WordPress_06 / $ 1 [L]
RewriteRule ^ (. * \. Php) $ WordPress_06 / $ 1 [L]
RewriteRule. index.php [L]

6. Network configuration

From now on our administrator user will be the super administrator and will have power over the entire network of sites, the plugins have to be installed first in our mother site and then activated in the corresponding sites (as well as the topics).

If we want more control of users we recommend an extra plugin to grant capacities from the registry depending on the site, since we want our users to have access to the first edition but not the second and to do it manually, if it is large quantities, is wasting time.

There is a special case that was mentioned in the Facebook community regarding the use of multisite for a multilingual page. No, the multisite is the final option, currently there is a significant amount of multilingual plugins that allow this option without having to go through the configuration and future complications of a multisite WordPress and also take into account the SEO avoiding the duplicate content, because Yes, even if the content is in two different languages it can be duplicated content.

The following week we will explain several of these plugins and their operation.

Related posts

How to Get WordPress Post Featured Image URL & Post Thumbnail

WPITECH

How to Protect Your WordPress Site from Rest API Attacks

WPITECH

How To Use WP_Query to Create Pagination in WordPress

WPITECH