WordPress Multi Site FAQ Imprimir

  • 3

1. What is WordPress Multisite (WPMU)

WordPress Multisite (or Wordpress MultiUser (WPMU)) is a WordPress feature that allows you to run multiple WordPress sites from within one WordPress installation. 

All these installations make so-called “network”. All the sites in this network share one database, however they have separate tables within this database and have different directories for media uploads. Also, these sites share the same plugins and themes. 

The Network Admin is the only who can manage plugins and themes for all the sites from one single Admin Dashboard. 



2. Pros and cons of WPMU

WordPress Multisite has its advantages and disadvantages. 

The pros of WPMU:
- ability to manage multiple WordPress blogs from one dashboard; 
- one-click installation of WordPress blogs inside the network (you just need to enter the blog name and Admin email address); 
- it is possible to have multiple sites/blogs for the same admin/user that will be able to manage these sites from the same dashboard; 
- Super Admin has access to all the blogs and can manage them; 
- you need to update WordPress, plugin or theme version only once for all the sites within the network; 
- for Super Admin it is possible to manage the privacy settings and decide what options or features the users will have access to. 

The cons of WPMU:
- Super Admin should have previous experience in managing WordPress blogs and should know how to edit WordPress core files on the server; 
- some themes and plugins designed for regular WordPress website may not work so well for WMPU, so it might be necessary to find alternatives; 
- if the main installation is affected or hacked, then all the blogs in the network will be affected/hacked too.  



3. Installing WPMU

WPMU may be easily installed via Installatron in cPanel: 

1. Go to your cPanel and find Software/Services section


2. Find the WordPress script and click Install
 



3. Fill out the details for your website, scroll down and click Install

NOTE 1: the corresponding option Enable Multisite (WPMU) should be checkmarked during the installation. 

NOTE 2: pay attention to the In Directory field which is set to “wp” by default. This means that your WPMU will be installed to the subdirectory (yourdomain.com/wp). If you want your website installed to yourdomain.com, remove “wp”




4. This is it! You will get a notification that WPMU is successfully installed for your domain. 

This is the easiest way to install WPMU for your domain. 


How can you check if WPMU is already enabled for your site? 

You need to find wp-config.php file. There you will see the following lines that state WPMU is enabled: 

/* Multisite */ 
define( 'WP_ALLOW_MULTISITE', true ); 
define('MULTISITE', true); 
define('SUBDOMAIN_INSTALL', false); 
define('DOMAIN_CURRENT_SITE', 'yourdomain.com'); 
define('PATH_CURRENT_SITE', '/'); 
define('SITE_ID_CURRENT_SITE', 1); 
define('BLOG_ID_CURRENT_SITE', 1);



4. Turning regular WordPress installation into WPMU

If you have a regular WordPress installation but decided to make Multisite, there is no need to re-install or remove your WordPress. You may as well enable Multisite for it following the instructions below. 

         We recommend to backup the WordPress website before you start in case some steps are done improperly.


You may begin with wp-config.php file editing. It is possible to do it via FTP or directly in cPanel. 

1. Go to your cPanel > File manager > public_html folder (or the sub-folder where WordPress files are located) > choose wp-config.php file and click Edit

  

You need to add the following line in the same place as shown on the screenshot: 

                       define('WP_ALLOW_MULTISITE', true); 




Once done, save the changes.


2. Log in your Admin Dashboard via http://yourdomain.com/wp-admin and check that Network Setup has been added to your Tools menu 




You will see the following: 



NOTEplease make sure the Apache mod_rewrite module is installed as it will be used at the end of this installation. If mod_rewrite is disabled, ask your administrator to enable that module, or look at the Apache documentation or elsewhere for help setting it up.

mod_rewrite module is enabled by default on our servers, so you may disregard this notification. 


3. You need to choose whether you would like your sites in your WordPress to use sub-domain or sub-directories.

              Sub-domains option will get your sites URLs as site1.yourdomain.com, site2.yourdomain.com etc. 

NOTE: you will need to set up Wildcard sub-domain first in order to use sub-domains. 

          Sub-directories option will enable you to have sites URLs like yourdomain.com/site1, yourdomain.com/site2 etc. This option doesn`t require any additional adjustments. 

It is not possible to have both option enabled at the same time. 

Once you have chosen which is best for you, proceed and click Install


4. Next you will see the page called Create a Network of WordPress sites. Enabling network

In order to complete enabling Multisite, wp-config.php and .htaccess files are to be modified. For this, follow the steps as described on the page (make sure you copy-paste code abstracts precisely)




Once both files are edited, your network is enabled and configured. 

You will have to re-log in your Admin Dashboard using the same login details. 


5. The last step is a creation of “mu-plugins” folder with the plugins activated by default and affecting all the sites in the WPMU installation. 

This folder should be created in wp-content folder either via FTP or in cPanel > File manager menu. 

Locate and open wp-content folder > click New folder button in the top menu > type mu-pluginsin the corresponding field > click Create a New Folder

Ensure the permissions for the newly created folder are set to 0755




6. Now you can log in your Admin Dashboard again and check if the network is enabled
 



Network Admin is a super admin that has access to the whole Network Management and all other WordPress dashboards.



5. Creating subdomains and subfolders

New sites in the WordPress Network should be created via Network Admin. 

1. Go to http://yourdomain.com/wp-admin> My Sites > Network Admin > Sites




2. Click Add New to create a new site 




NOTE 1
: If you have installed WPMU via Softaculous, you will have the sub-directory option (yourdomain.com/site1) set up by default, so it will be possible to add new WordPress site to the sub-directory as described below. 

NOTE 2: Admin Email field - if you use the email address already assigned to Super Admin or Admin of the regular WordPress installations inside the network, you will need to access the Admin Dashboard for the new site with the same details. 

If you use the new email address, which is not assigned to any user yet and does not exist in the WordPress database, the new user will be created and the login details will be sent to the specified email address. 




If you would like to install WordPress site to the sub-domain, not to the sub-directory, you need to do the following first: 

1) Create a wildcard sub-domain in Subdomains menu in cPanel




2) Change the Subdomain_Install option in wp-config.php file from ‘false’ to ‘true’ and save the changes



3) Once done, you can access Network Admin Dashboard and install WordPress to the sub-domain 




If you switch Subdomain_Install option back to ‘false’, it will be possible to create the sub-directories again. 

As a results, you can switch from sub-domains to sub-directories depending on the needs. ?C; 



6. WPMU Domain Mapping

Domain Mapping plugin allows to map sites in WordPress Network to another domains in your hosting account. 

NOTE 1: the domains you want to map need to be added as parked, not addons. You need to start from the Domain Mapping plugin installation. 

NOTE 2: This plugin will only work if WordPress Multisite is installed in the root directory of your main domain (yourdomain.com) - public_html. 

1. To install the plugin, log in Admin Dashboard as Network Admin > My Sites > Network Admin > Plugins > Add new and search for ‘WordPress MU Domain Mapping’




2. Then click Install Now next to WordPress MU Domain Mapping




3. You will get notification that plugin is successfully installed. Once done, click Network Activate
 



4. The plugin activation requires additional steps. To proceed go to My Sites > Network Admin > Settings > Domain mapping. There you will see the notification of what needs to be done:



It means you need to do the following: 
  
    - Copy sunrise.php file (currently located at public_html/wp-content/plugins/ wordpress-mu-domain-mapping) to wp-content folder 




   - Add the following line to the wp-config.php file: 

                             define( 'SUNRISE', 'on' );




5. Once done, go to My Sites > Network Admin > Settings > Domain mapping to complete the plugin configuration. 

Super Admin should set either the IP address of the server (IP address assigned to your cPanel account, which is provided in the Hosting Welcome guide) or CNAME that points to your address (in case you do not know the IP address, you may put the main domain name in this field). 

This will tell the Domain Mapping plugin the location of the server that holds your website files. 
In our example we will use IP address. 


There are also a few domain options: 

Remote login allows to redirect the Admin pages for all the sites in the network to the main website, so you will be able to log into all of the sites from the network. If unchecked, the Admin link for each website will remain unchanged; 

Permanent redirect - with this option the sub-directory sites or the sub-domains will be redirected to the corresponding mapped domains URLs; 

User domain mapping page allows site admins to manage domain mapping within their own site dashboards; 

Redirect administration pages to the site`s original domain name (remote login disabled if this redirect is disabled) - this option should be enabled in order for remote login to work; 

Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues - if this option is checked the primary domain setting on your sites will be ignored, so same content will be showing on multiple domains




6. Once the domain mapping plugin is configured and activated, you need to add a parked domain to map the site to. This may be done via cPanel > Parked Domains menu




7. Now you are ready to do the domain mapping. Access the Admin Dashboard of the site you want to map, go to Tools > Domain Mapping > type in the domain name > Add




Once done, the notification “New domain added” will show up and you will be redirected to the page Active domains on this blog. You will see there the current WordPress site and the domain you just added. 

To finish up the mapping, select the added domain and click on Set Primary Domain




This is it! 

Now the WordPress site is mapped to the parked domain




You can also check if the domain was successfully mapped via My Sites > Network Admin > Sites





This is it! 

Esta resposta foi útil?

« Voltar