<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>&#62;devblog_ &#187; multiple installations</title>
	<atom:link href="http://devblog.itsth.com/tag/multiple-installations/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.itsth.com</link>
	<description>Thoughts on developing shareware</description>
	<lastBuildDate>Wed, 14 Dec 2011 16:29:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Running multiple WordPress blogs with one installation</title>
		<link>http://devblog.itsth.com/2008/08/20/running-multiple-wordpress-blogs-with-one-installation/</link>
		<comments>http://devblog.itsth.com/2008/08/20/running-multiple-wordpress-blogs-with-one-installation/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 07:18:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[multiple installations]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://devblog.itsth.com/?p=9</guid>
		<description><![CDATA[When trying to run this blog with the same installation as my &#8220;Outlook and Sync blog&#8220;, I found out that this was more difficult than expected. WordPress doesn&#8217;t have a readymade feature for this, you have to do some tricks. And most of the tricks that I found were pretty difficult or involved several steps. [...]]]></description>
			<content:encoded><![CDATA[<p>When trying to run this blog with the same installation as my &#8220;<a href="http://blog.itsth.com/">Outlook and Sync blog</a>&#8220;, I found out that this was more difficult than expected. WordPress doesn&#8217;t have a readymade feature for this, you have to do some tricks. And most of the tricks that I found were pretty difficult or involved several steps.</p>
<p>Here&#8217;s a trick that is easier. It requires that:</p>
<ul>
<li>The different blogs should be on different domains or subdomains</li>
<li>The blogs should take up the entire (sub)domain (so they shouldn&#8217;t start in a subfolder)</li>
</ul>
<p>Then it&#8217;s quite easy. Simply configure all the blog&#8217;s domains to point to the same WordPress installation folder. You can probably do this in the configuration panel of your webspace provider.</p>
<p>Now edit the wp-config.php:</p>
<p>Before:</p>
<pre style="padding-left: 30px">$table_prefix  = 'yourblog_';</pre>
<p>After:</p>
<pre style="padding-left: 30px">$domain  = $_SERVER['HTTP_HOST'];
if (stristr($domain, 'yourblogname1'))
   $table_prefix  = 'yourblog1_';
else if (stristr($domain, 'yourblogname2'))
   $table_prefix  = 'yourblog2_';
else
   $table_prefix  = 'yourblog_';</pre>
<p>As a nice side effect you&#8217;re only needing one database instance for this (they&#8217;re often limited in rented webspace) and just have more tables in the same database. All blogs use the same installed files, but have different content and can have different layouts and activated plugins.</p>
<p>Happy Blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://devblog.itsth.com/2008/08/20/running-multiple-wordpress-blogs-with-one-installation/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

