This post is part of a step-by-step series on installing WordPress on Linux (CentOS 6)
A WordPress MultiSite installation gives you the ability to make more than one WordPress site using one installation directory (though each site has its own upload media directory). You can allow anyone to make a WordPress site from your WordPress MultiSite, or restrict that ability only to the super admin.
Requirements
- WordPress has been fully installed and configured
- Setting up Pretty Permalinks in WordPress:
Modify wp-config.php
Go to your WordPress root site directory where you will find wp-config.php
.
[ahmed@amayem ~]$ sudo vi /var/testblog/wp-config.php
My blog was installed in /var/testblog/
. Go to the bottom by entering G
. Go up a bit till you find /* That's all, stop editing! Happy blogging. */
. Add the following above it:
/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );
For more on copy pasting in vi check here.
Exit with Esc
or ctrl+c
and then save with :x
.
Changing Your WordPress Site into a MultiSite
Enter your wp-admin. If you are already in it then you will have to refresh the browser. Under Tools
you should find the Network Setup
option. Click it and fill in the details. Choose between sub-domain or sub-directory. The difference will look something like this:
- Sub-domain: newSiteName.yourdomain.com
- Sub-directory: yourdomain.com/newSiteName
Once you install it a new screen with configuration code will appear that we have to add to wp-config.php
and .htaccess
files.
Updating the wp-config.php file
Go back to the wp-config.php
and paste the new snippet instead of the last snippet you added.
Updating the .htaccess file.
If you decided to setup Pretty Permalinks using .htaccess
then update the .htaccess
.
Updating the httpd.conf file
If you decided to setup Pretty Permalinks without .htaccess, then you will have to update the httpd.conf
file:
[ahmed@amayem ~]$ sudo vi /etc/httpd/conf/httpd.conf
Enter the following to search for the directory specific configurations
/<Directory
The first one will probably be the following:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Press n
to go the next occurrences. If you find one that looks like this:
<Directory "/path/to/your/blog/root">
Then you are in luck and just need to paste the new snippet under it. Otherwise add the following:
<Directory "/path/to/your/blog/root">
Paste your snippet here
</Directory>
Exit insert mode using Esc
or ctrl+c
then exit and save by entering :x
.
Now we need to restart apache:
[ahmed@amayem ~]$ sudo apachectl restart
Checkout your Dashboard
Now just check out your dashboard (if you are already logged in then refresh the page) and you will notice that there is a new my sites
option at the top left. Time to play around, making new sites and posts. You can also map your new wordpress sites to actual domains outside your own domain