Preparing Your Web Server to Handle a WordPress Multisite
If you have determined that you need to maintain multiple blogs you have to enable the WordPress Multisite features and then prepare your Web server to handle the WordPress Multisite. You must make a decision about how the multiple blogs within your network will be handled. These configurations need to be in place in order to run the WordPress network successfully. If you have access to the Apache configuration files, you can perform these configurations yourself. If you don’t know how, or are uncomfortable with adjusting these settings, you’ll need to ask your hosting provider for help or hire a consultant to perform the configurations for you.
DNS (domain name server)
The WordPress network feature gives you two different ways to run a network of blogs on your domain. You can use the subdomain option or the subdirectory option. The most popular option (and recommended structure) sets up subdomains for the blogs created by your WordPress Network. With the subdomain option, the username of the blog appears first, followed by your domain name. With the subdirectory option, your domain name appears first, followed by the username of the blog.
If you want to use a subdomain for each blog in your WordPress Network, you must add a wildcard record to your DNS records. You need to add a hostname record pointing at your Web server in the DNS configuration tool available in your Web server administration software (like WebHost Manager (WHM), a popular Web host administration tool). The hostname record lookslike this:
*.yourdomain.com (where yourdomain.com is replaced with your actual domain name).
Apache is Web server software that’s loaded and running on your Web server. Not everyone has access to Apache files, however. Usually, the only person who has access to those files is the Web server administrator. (This is usually your Web host.) Depending on your own Web server account and configuration, you may or may not have access to the Apache software files.
The Apache module that’s necessary in order for the WordPress Network to create nice permalink URLs is called mod_rewrite. This must be configured so that it’s active and installed on your server.
You or your Web host can make sure that the Apache mod_rewrite is activated on your server; open the httpd.conf file and verify that the following line is included within:
LoadModule rewrite_module /libexec/mod_rewrite.so
If it isn’t, type that line on its own line and save the file. You will probably need to restart Apache before the change takes effect.
In the same httpd.conf file, you need to make some adjustments to the <VirtualHost> section of that file. Follow these steps:
Find the <VirtualHost> section in the httpd.conf file.
This line of the httpd.conf file provides directives, or configurations, that apply to your Web site.
Find a line in the <VirtualHost> section of the httpd.conf that looks like this:
Replace that line with this line:
AllowOverride FileInfo Options
On a new line, type ServerAlias *.yourdomain.com.
Replace yourdomain.com with whatever your domain is. This line defines the host name for your Network site and is essential for the virtual host to work correctly.
Save the httpd.conf file and close it.
PHP (PHP Hypertext Processor)
Next, you edit the PHP configuration on your Web server. PHP needs to have the following configurations in place in the php.ini file on your Web server in order to run WordPress MU on your server:
Set your PHP to not display any error messages in the visitor’s browser window
Find out if your PHP is compiled with memory limit checks by looking for the text memory_limit in the php.ini file. Usually, the default limit is 8MB. Increase the memory limit to at least 32MB, or even 64MB, to avoid PHP memory errors when running WordPress MU.
Set global variables to Off by opening the .htaccess file (found on your Web server in the same directory you installed the WordPress MU files) and add the following two lines to the very top of the .htaccess file:
php_flag register_globals 0 php_flag display_errors 0