If you’re looking to run a multisite install of WordPress 3 and your hosting provider uses Plesk let me save you a little bit of a headache.
My Scenario
If you want to do a multisite installation i.e. run multiple blogs from a single database you basicly have two options subdomains or subfolders. Because I want to map existing domains to the child sites I was going to be setting up I figured that from a DNS perspective it would be much easier to go with subdomains.
Thus my blogs would appear as
domain.com
blog1.domain.com
blog2.domain.com
blog3.domain.com
Then I can setup CNAME dns records to point traffic from the desired domain to the child blog subdomain
abccompany.com -> blog1.domain.com
Here’s the steps I took to get it working
1. Enable the network setting, To do this you’ll want to edit your wp-config.php file and enter in the following line
define(‘WP_ALLOW_MULTISITE’, true);
2. Then you’ll want to log into the admin section of your site and under Tools you’ll find an new option called Network. From here it will guide you through making the changes required to convert your installation into a multsite. i.e. setup a wildcard dns entry and copy and past some info into your .htaccess file
3. At this point it should be working but if you’re using Plesk like I am it won’t be. Your primary site will function properly, but new sites you create will simply timeout when you try to reach them and you’ll receive a Plesk ‘Under Contruction” type page. Since it is resolving to the server properly DNS is not the problem. The problem is in the apache config to fix it do the following.
Apache Configuration
Edit the /var/www/vhosts/domain.com/conf/vhost.conf or /home/httpd/vhosts/domain.com/conf/vhost.conf file and enter this information:ServerAlias *.yourdomain.com
If the vhost.conf didn’t exist before, you will need to run:
# /usr/local/psa/admin/bin/websrvmng -av
Whether the vhost.conf was new or not, you will need to reload the Apache configuration:
# /etc/init.d/httpd reload
4. Child sites should now be working properly
hi
how you pass step 3
Add the following to your .htaccess file in /var/www/vhosts/bestlifes.net/httpdocs/, replacing other WordPress rules
when i create a .htaccess file with code that given in wordpress i have internal server error. i use plesk in linux like you
another one
i can not found /var/www/vhosts/domain.com/conf/vhost.conf
i create new file with that name and add
ServerAlias *.yourdomain.com
and reload apache config
but again after i create new site in wordpress defualt parallels plesk page shown !!!
please help me with this problem
thanks for the quick guide…just the solution I needed!
Hello, thanks for guide, but i’ve some problem…
i’ve got working multisite install (domain.com, blog1.domain.com, blog2.domain.com, ecc).
i addedd CNAME as you tell, and CNAME is working (blog.company.com -> blog1.domain.com), but, as sina, if i go to blog.company.com, it shows default apache test page…
What i’m going wrong?
in /var/www/vhosts/domain.com/conf/vhost.conf, do i have to add only
ServerAlias *.domain.com
or also
ServerAlias *.company.com ??
or maybe i’ve got to add a “domain alias” in plesk ?
thanks!
Hi there,
as mikosh i have the same problem
i have installed a fresh WP 3.0.1 an i added to my plesk dns
1/
A *.mydomain.com
also check the dns from my hosting company as the plesk dns is bypassed and it is
2/
I created a file called vhost.conf and edit it with
ServerAlias *.mydomain.com
3/
i also restarted apache from plesk
At the moment no luck i get the default plesk page, where i should see the hello world post, right??
regards,
Keitai
ok i might have found a solution i had to uncheck
domain administration > interface preferences > preferences > www checkbox
keep you informed
If I (stupidly) setup for subfolders is there a way to convert to sub domains without re-installing wordpress etc.?