A multisite can be set up both on a pure WordPress site and on an already working site. In the second case, before setting it up, you need to tocreate a backup copy of the site and base. In this article, the installation will be performed on a site named site.com
.
To set up a multisite, do the following:
site1.site.com
, site2.site.com
(used by default).site.com/site1
, site.com/site2
.site.com
, site2.com
.wp-config.php
in the catalog /home/name_account/site.com/www
add the lines that WordPress will show. In this example, these are:define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', 'site.com'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
.htaccess
in the catalog /home/name_account/site.com/www
replace all rules with the following:RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L] RewriteRule . index.php [L]
After completing these steps, your network will be activated and configured. You will need to log in to the site admin panel again to obtain super-administrator rights. There you will find a new option in the admin navigation menu called “My sites". Network management must be carried out through this section.
To add a site, do the following:
Only the super network administrator can install themes and plugins. Installation is performed through the section "Network management". In addition to installation, you will also need to activate a plugin or theme for the web:
After this action, you can log into the admin panel of the created sites and use the themes and plugins that you have enabled for the network there.
.htaccess
... To the section "Network setup"You can already get through"My sites → Network management → Settings"Or by a direct link of the form http://site.com/wp-admin/network/setup.php
:To set up a multisite, do the following: