Multiple Wordpress installs on one machine?

Multiple Wordpress installs on one machine?

Author
Discussion

Fetchez la vache

Original Poster:

5,579 posts

215 months

Thursday 29th July 2010
quotequote all
What's the tried and tested method for having more than one Wordpress install on a single (development) machine?

I've done a worpress site for a local club and others have come forward wanting me to set one up for them too, so they would ultimately be on different domains when 'live'.

I'm using windows as well, currently using WAMP if that makes any difference.

Accelebrate

5,252 posts

216 months

Thursday 29th July 2010
quotequote all

lestag

4,614 posts

277 months

Thursday 29th July 2010
quotequote all
http://www.google.co.nz/search?hl=en&rlz=1I7SK...
if you dont go the virtual host route

itsnotarace

4,685 posts

210 months

Thursday 29th July 2010
quotequote all
For internal or external use?

You can do host header redirect

With IIS you can have multiple sites and just bind each site to a different IP address, otherwise you will need different (non-default) ports set up (80, 443 etc). I'm sure you can do the same with Apache

For external use you would need to do the above and assign multiple external IP addresses to your firewall and create a traffic forwarding rule based on the host header

Each Wordpress install would need it's own install dir

TonyRPH

12,999 posts

169 months

Thursday 29th July 2010
quotequote all
Here's a basic example config:

Where:

1.2.3.4 is the first IP
3.4.5.6 is the second IP

IF you have only one IP, you can omit the second - NameVirtualHost 3.4.5.6:80 - declaration, and also change the second VirtualHost declaration as follows:

<VirtualHost 3.4.5.6:80>

to:

<VirtualHost 1.2.3.4:80>



NameVirtualHost 1.2.3.4:80
NameVirtualHost 3.4.5.6:80

#
# vhost host1.example.com
#
<VirtualHost 1.2.3.4:80>
ServerName host1.example.com
DocumentRoot c:\vhosts\host1.example.com\httpdocs
ErrorLog c:\vhosts\host1.example.com\logs\error_log
CustomLog c:\vhosts\host1.example.com\logsaccess_log combined
AddType text/html .shtml
<Directory c:\vhosts\host1.example.com\httpdocs>
Options Indexes IncludesNOEXEC FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

#
# vhost host2.example.com
#
<VirtualHost 3.4.5.6:80>
ServerName host2.example.com
DocumentRoot c:\vhosts\host2.example.com\httpdocs
ErrorLog c:\vhosts\host2.example.com\logs\error_log
CustomLog c:\vhosts\host2.example.com\logsaccess_log combined
AddType text/html .shtml
<Directory c:\vhosts\host2.example.com\httpdocs>
Options Indexes IncludesNOEXEC FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


ETA: You will of course need a seperate MySQL database for each installation.

You can also adjust the paths - c:\vhosts\host2.example.com\httpdocs - to suit your installation.



Edited by TonyRPH on Thursday 29th July 14:13