Table of contents
- 1. How to install WordPress Multisite?
- 2. How to configure the domain for the WordPress Multisite main blog?
- 3. How to add several WordPress Multisite blogs with subdomains?
- 4. How to add several WordPress Multisite blogs with different domains?
- 5. How to add several WordPress Multisite blogs with different domains manually?
- 6. How to manage roles and permissions for different blogs?
- 7. How to log in the admin panel for the different sites?
- 8. How to enable Multisite support manually
| IMPORTANT: WordPress Multisite requires you to use different domains for each site. If you are trying to log into the WordPress application using an IP address, you may have problems with Google Chrome or Safari browsers. You can try using Firefox or Internet Explorer, but it is highly advisable that you use domains instead of using IP addresses. You can learn how to configure domains on your own machine for testing in the "How to configure the domain for WordPress Multisite" section. |
- 1. How to install WordPress Multisite?
- 2. How to configure the domain for the WordPress Multisite main blog?
- 3. How to add several WordPress Multisite blogs with subdomains?
- 4. How to add several WordPress Multisite blogs with different domains?
- 5. How to add several WordPress Multisite blogs with different domains manually?
- 6. How to manage roles and permissions for different blogs?
- 7. How to log in the admin panel for the different sites?
- 8. How to enable Multisite support manually
BitNami WordPress Multisite Stack simplifies the installation of WordPress Multisite Network and its required dependencies. A Multisite Network is similar to your regular WordPress blog but it lets you create more blogs on demand. A multisite network is a collection of sites that all share the same WordPress installation. They can also share plugins and themes. It is indicated for organizations, communities or user groups.
How to install WordPress Multisite?
It can be deployed using a native installer, as a virtual machine or as an AMI to the Amazon cloud. The following instructions apply if you are downloadig the installer, if you are using the virtual machine or the AMI you can skip this section.
Once you have downloaded the installer (the filename will be similar to bitnami-wordpress-VERSION-multisite-installer), double click on the icon to launch the installer. Note: If you are using Linux you will have to give executable permissions to the file first, using this command:
chmod +x /path/to/bitnami-wordpress-VERSION-multisite-linux-installer.bin
WordPress multisite requires to be installed in the default port: 80. For this reason it is necessary on Linux systems to run the installer as root user in Linux machines.
If you see the following error message:
"Unable to bind to the 80 port number. WordPress Multisite only supports this port for the Apache server."
It is possible that you are not running the installer as root user or is there any other application using this port (for example Skype or a web server). To run the installer as the root user on Linux, you will need to execute it using sudo (for example if you are running Ubuntu) :
sudo /path/to/bitnami-wordpress-VERSION-multisite-linux-installer.run
or become root first with the following command, and then execute the installer:
su -l
If you are using OS X, the installer will ask you for the Administrator password automatically. You can also run the Stack as root user from a Terminal:
$ sudo /path/to/bitnami-wordpress-VERSION-multisite-linux-installer.app/Contents/MacOS/installbuilder.sh
Once the installation process starts, it will look like the following:

In the Component Selection page you can enable or disable phpMyAdmin application installation. This application is a tool written in PHP intended to handle the administration of MySQL over the Web.

In the following page you can configure the Admin user credentials for the WordPress Multisite application. You can configure the "login" and "password" for the Administrator. You can also specify your name and your email address.

In the next screen, you can configure the Blog name and the domain. If you are installing the Stack in a machine with an already domain configured, you only have to specify it. If you are installing it in a local network for testing, you can add a new domain in the "hosts" file in your machine. For example, you can add the following line in the "/etc/hosts" file.
127.0.0.1 mydomain.com
On Windows you can add the same line in the "C:\windows\system32\drivers\etc\hosts" file.
On OS X you can edit the "hosts" file with the following command in a Terminal:
$ sudo nano /etc/hosts
Do not forget to remove this entry if you are using a know domain name and uninstall BitNami WordPress Multisite.

You can also configure the email settings for the application. This is required so your application be able to send emails. If you use a GMail account, you only have to specify your user and password. If not, you should have to specify the SMTP settings of your email provider.

These following options only changes the file permissions in the WordPress installation. If you are going to deploy the BitNami WordPress Multisite in a public server, it is advisable to select this option.

The Stack is copying the files and configuring WordPress Multisite.

So easy right? That's all!
How to configure the domain for the WordPress Multisite main blog?
If you have installed the Stack, you probably have configured your hostname properly. If you are using the virtual machine or the AMI you probably want to change the domain for your main blog.
- If you are using the native installer, you can launch the "Manager" graphical application that you can find in your installation directory: "manager-windows", "manager-osx" or "manager-linux" depending on your platform. Go to the "Advanced" tab and you can find a filed to modify the IP address or hostname.
- If you are using the virtual machine or the AMI, there is a tool that automatically updates the IP address in the database and configuration files. The required fields that are necessary to update are the "siteurl" and "home" options in the wp_options table and the "domain" option in the wp_blogs table. These options are automatically changed using the following command line tool:
$ sudo /opt/bitnami/apps/wordpress/updateip --machine_hostname mydomain.com
This tool automatically updates the WordPress domain with the machine IP address at boot time. If you have customized your domain name, you should rename it, for example using the following command:
$ sudo mv /opt/bitnami/apps/wordpress/updateip /opt/bitnami/apps/wordpress/updateip.backup
If you have problems with redirection when you try to log in the WordPress admin panel, check that the domain was successfully updated in the database:
- "wp_options" table: siteurl and home options - "wp_blogs" table: domain option
Then clear your browser cache and try to log in again to the application. If you are using an IP address instead of a domain name, you can find problems with some browsers. It is advisable to use a domain name for WordPress Multisite.
| If you are installing it in your local machine for testing, you can add a new domain in the "hosts" file in your machine. For example, on Linux or OS X you can add the following line in the "/etc/hosts" file: 127.0.0.1 mydomain.com On Windows you can add the same line in the "C:\system32\drivers\etc\hosts" file. On OS X you can edit the "hosts" file with the following command in a Terminal: $ sudo nano /etc/hosts |
How to add several WordPress Multisite blogs with subdomains?
You can add a new Site from the Network Admin panel. In this case, the site address is automatically configured for creating a subdomain. This configuration works if you have previously configured your domain to accept wildcards (*.mydomain.com). For example: site1.mydomain.com, site2.mydomain.com, etc. You can see how to configure wildcards subdomains at http://codex.wordpress.org/Configuring_Wildcard_Subdomains.
If you are installing it in your local machine for testing, you can add a new domain in the "hosts" file in your machine. For example, on Linux or OS X you can add the following line in the "/etc/hosts" file:
127.0.0.1 mydomain.com
On Windows you can add the same line in the "C:\system32\drivers\etc\hosts" file.

If you want to create a new site, WordPress Multisite automatically configures your new site in a subdomain. Important: please add an "Admin Email" for an already existing user in WordPress. You can use the same email that you use for the main site.

Once you have created your new site in a subdomain, it is necessary that the new site address is resolved. In this case, if you have not configured the Wildcard subdomains, you can simply add it in the your "hosts" file for testing:
127.0.0.1 newsite.mydomain.com
That's all, you can access now at http://mydomain.com and http://newsite.mydomain.com blogs.
How to add several WordPress Multisite blogs with different domains?
The WordPress MU Domain Mapping plugin allows users of a WordPress Multisite network to map their blog/site to another domain. This plugins is already installed in your BitNami WordPress Multisite since 3.5.1-1 version (if you are using a previous version, you can install the plugin following the plugin installation guide).
This section describes how to add different blogs in WordPress Multisite with different domains, for example: mydomain.com, newsite.com, otherdomain.com.
In this case it is necessary that all these domains points to the same machine IP address where it is WordPress Multisite installed. If you are testing locally you can use the hosts file to add them.
On Linux or OS X you can add the following line in the "/etc/hosts" file:
127.0.0.1 mydomain.com 127.0.0.1 newsite.com 127.0.0.1 otherdomain.com
On Windows you can add the same line in the "C:\system32\drivers\etc\hosts" file.
On OS X you can edit the "hosts" file with the following command in a Terminal:
$ sudo nano /etc/hosts
Go to the WordPress admin panel and enable the "WordPress MU Domain Maping" in the "Plugins" section.
Then configure the plugin in "Settings" -> "Domain Mapping". Note that this option is in the Network admin panel, check that you are in the main Network admin panel and not in a subsite administration panel.
In this example, you can find an example using the BitNami Cloud Hosting service, but you can use a similar configuration for your installation. BitNami Cloud Hosting already uses a wildcard for the subdomain, so all the subdomains points to the same IP address. The main domain for this example is: wpms.bitnamiapp.com.
test1.wpms.bitnamiapp.com, test2.wpms.bitnamiapp.com and all the subdomains will automatically points to the same IP address. In your installation, check that you are using wildcards for the domain or, if you are testing it, check that all the domains are present in your hosts file.
It is important to enable the "Permanent redirect" option. This makes your subdomain or subdirectory sites redirect to their domains.
Create a new site now. Do not worry about the subdomain name, it will be replaced to your new domain for the blog users.
Go to "Settings" -> "Domains" and configure the domain for the new site. You should know the Site ID. In this example, the main blog have the Site ID 1 and the new site (test1.wpms.bitnamiapp.com) has the Site ID 2. That's all, you only have to associate your own domain to the Site ID. Note that "seconddomain.com" should be configured to use the server IP address in your domain provider administration panel.
In the "Sites" section, you can check the current configuration for the different sites.
How to add several WordPress Multisite blogs with different domains manually?
| This is a manual process to change the WordPress database to use different domains. We strongly suggest to use the plugin "WordPress MU Domain Mapping" in case you need to use different domains for the sites. You can find more info in the previous section. |
This section describes how to add different blogs in WordPress Multisite with different domains, for example: mydomain.com, newsite.com, otherdomain.com.
In this case it is necessary that all these domains points to the same machine IP address where it is WordPress Multisite installed. If you are testing locally you can use the hosts file to add them.
On Linux or OS X you can add the following line in the "/etc/hosts" file:
127.0.0.1 mydomain.com 127.0.0.1 newsite.com 127.0.0.1 otherdomain.com
On Windows you can add the same line in the "C:\system32\drivers\etc\hosts" file.
On OS X you can edit the "hosts" file with the following command in a Terminal:
$ sudo nano /etc/hosts
Go to the Administration panel and create a new site. WordPress only lets you create a subdomain. Do not worry about that. Once you created it, you can edit the full domain name.

Once you created the site it is necessary some changes in the database. You can modify the options using phpMyAdmin application.
- Open the bitnami_wordpress database and insert anew row in the wp_site table:
Leave “id” empty (it is an autoincrement field), set “domain” to the domain name, and enter "/“ as path. Then, click the "Go" button.
- Copy all the rows in wp_sitemeta replacing site_id to the new site id. You can do this running the following SQL query (replacing $SITEID with the id number that got created in the previous step):
INSERT INTO wp_sitemeta (site_id, meta_key, meta_value) SELECT $SITEID, meta_key, meta_value FROM wp_sitemeta WHERE site_id = 1;
- Go to the wp_blogs table and edit the entry that have the domain of your new site. It is necessary to update the site_id to the id of the row created on step 1 in wp_sites table ( in this case it is "2")

- Open the "wp_[blog_id]_options" table (in this case is wp_2_options) and update the fileupload_url to match the new domain. You can open the "Search" tab and enter "fileupload_url" in the option_name. Then edit this option_value to match the new domain.
That's all, you have your new site in a new domain ready. Note that following these steps, the new site will dissapear from your Network Sites in the Network Administration panel. WordPress Multisite is configured to use subdomains by default.
How to manage roles and permissions for different blogs?
By default, all users will have subscriber access to all sites on your network. You can add new users and also assign different roles for each site in the WordPress Multisite. If you use the Multisite User Management plugin, you can set the default role for each site and this plugin applies it.
The administrator users cannot install new themes or plugins in their blogs assigned, only the Network Admin or "Super Admin" be able to install them and can be activated per-site or for the entire network.
How to log in the admin panel for the different sites?
If you are using different domains and different users in the same machine for testing, is it possible that you have login issues in the admin panels for the different sites. It is important that you clean you browser cache and cookies. You can find more info at http://codex.wordpress.org/Login_Trouble
How to enable Multisite support manually
The following guide describes how to convert an existing WordPress installation in a WordPress Multisite manually.
How do I enable Multisite support?
Assuming your server is already set up on port 80, follow the steps below to enable Multisite support:
First of all, make a backup of the files involved in this process, just in case:
cp /installdir/apps/wordpress/htdocs/wp-config.php /installdir/apps/wordpress/htdocs/wp-config.php.backup cp /installdir/apps/wordpress/htdocs/.htaccess /installdir/apps/wordpress/htdocs/.htaccess.backup
Now, edit /installdir/apps/wordpress/htdocs/wp-config.php and add the following piece of code at the top of the file, just below the <?php header:
/** This will enable Wordpress' multisite feature */
define('WP_ALLOW_MULTISITE', true);
The top of the file will then look something like this:
<?php
/** This will enable Wordpress' multisite feature */
define('WP_ALLOW_MULTISITE', true);
/**
* The base configurations of the WordPress.
*
Again, make sure you leave the "<?php" at the top. Now go to the Wordpress Dashboard, which is located at http://your_server_address/wordpress/wp-admin. Inside the Tools menu there is a new option, "Network". Click it.
Now Wordpress will ask you about the details of your blog network. Fill in your information and click Install.
At this point, Wordpress will show you a screen with instructions. Notice the two big blocks of code:
We will need them in a minute.
Make a directory called blogs.dir inside /installdir/apps/wordpress/htdocs/wp-content/
mkdir /installdir/apps/wordpress/htdocs/wp-content/blogs.dir
Next, edit /installdir/apps/wordpress/htdocs/wp-config.php, locate the line /* That’s all, stop editing! Happy blogging. */ and paste the first big block of code above it. The result should be similar to this, except for your server address which will likely be different:
define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', false ); $base = '/wordpress/'; define( 'DOMAIN_CURRENT_SITE', '127.0.0.1' ); define( 'PATH_CURRENT_SITE', '/wordpress/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); /* That’s all, stop editing! Happy blogging. */
Edit /installdir/apps/wordpress/htdocs/.htaccess and replace whatever is between #BEGIN WordPress and #END WordPress with the second big block of code. Again, the result should be similar to this:
# BEGIN WordPress
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress
Now you just have to log in again to the WordPress Dashboard (http://your_server_address/wordpress/wp-admin) and you will see a new option called "Network Admin" in the upper right corner:

Inside you will be able to create new sites.
Help! I followed the instructions and now Wordpress does not work! How do I restore the backup files?
Just copy the backup files over the modified ones.
cp /installdir/apps/wordpress/htdocs/wp-config.php.backup /installdir/apps/wordpress/htdocs/wp-config.php cp /installdir/apps/wordpress/htdocs/.htaccess.backup /installdir/apps/wordpress/htdocs/.htaccess
This will disable all multisite-related functionality.











Comments