Creating a WordPress Multisite

Having installed WordPress previously in the wp-config.php just before of the code shown below, we need to add this lines:

define(‘WP_ALLOW_MULTISITE’, true);
/* That’s all, stop editing! Happy blogging. */

 

Now into the backend as “admin” user in the left side menu we need to go to tools->network setup.

image_1

 

Clic on install button and we will see 2 blocks of code.

image_2

 

As we can see there are the instructions that we need to put that code. The first one needs to be in the wp-config.php file exaclty in the place that the meesage is saying.

The second code is to replace our actual .htaccess file.

Once we have modified the two files mentioned we need to refresh the backend and we will see the “My Sites” button there.

image_3

 

In this instance we can activate all the plugins again.
If we need to add a new domain to the network for one of our sites in the network we can do that installing a plugin: “WordPress Mu Domain Mapping”.
Once the plugin is installed we need to move the sunrise.php file (/wp-content/plugins/wordpress-mu-domain-mapping/sunrise.php) to the wp-content directory.
And then to activate this we need to add this code in the wp-config.php:

define( ‘SUNRISE’, ‘on’ ); just bellow of the lines previously added.

Now, refreshing the page and using the “my sites” menu we can go now to “Network admin -> Sites” and we will be able to create the subdomains.
To create domains we can go to “settings->Domain mapping” filling the field with the server IP address:

image_4

Then we need to go to “settings->Domains” and filling the fields with our Site ID and the domain that you want.
To verify if all is ok, we can go to the menu “Sites->All Sites” and we need to see if there are the domains that we have already created.