<?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>Common Media, Inc. &#187; Drupal</title>
	<atom:link href="http://www.commonmediainc.com/category/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.commonmediainc.com</link>
	<description>Online Communities and Web Development</description>
	<lastBuildDate>Tue, 20 Jul 2010 15:19:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Streamlining Drupal updates</title>
		<link>http://www.commonmediainc.com/2010/01/10/streamlining-drupal-updates/</link>
		<comments>http://www.commonmediainc.com/2010/01/10/streamlining-drupal-updates/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 02:05:49 +0000</pubDate>
		<dc:creator>pjmorse</dc:creator>
				<category><![CDATA[Deploying sites]]></category>
		<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://www.commonmediainc.com/?p=135</guid>
		<description><![CDATA[I simplified my process for upgrading Drupal sites by moving site-specific files out of the deploy path and using symlinks.]]></description>
			<content:encoded><![CDATA[<p>We don&#8217;t run many <a href="http://drupal.org/">Drupal</a> sites, but there are enough of them. I wish the upgrade path for Drupal was as easy as <a href="http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion">Wordpress&#8217;s svn-based upgrades</a>, but I&#8217;ve borrowed some ideas from <a href="http://rubyonrails.org/">Rails</a> and <a href="http://www.capify.org/">Capistrano</a> to make my process a little quicker than it might be otherwise.</p>
<p>Each Drupal upgrade provides a zip file (unless you&#8217;re working with CVS and frankly I&#8217;d rather not). Each of our Drupal sites has its own user, and the site root lives in the home directory of that user (e.g. <code>~/public_html</code> or <code>~/www</code>.) I started by unzipping each version of Drupal independently in the home directories (e.g. <code>~/drupal-6.14</code>, <code>~/drupal-6.15</code>.) Then I would make <code>public_html</code> a symbolic link to that directory. This meant I could &#8220;flip the switch&#8221; between versions with one command:</p>
<pre>
$ rm public_html &#038;&#038; ln -s drupal-6.15 public_html
</pre>
<p>Still, I needed to copy a bunch of site-dependent files (e.g. the <code>drupal/sites/*</code> files, among others) between the old versions and the new, and that was getting tedious. So finally I created a shared directory, <code>~/shared/</code> with all the site-dependent files. This served to take those files out of the &#8220;deploy path&#8221;. Now I can use symlinks to install them in each new version in turn:</p>
<pre>
$ cd ~/drupal-6.15/sites/all/ &#038;&#038; ln -s ~/shared/sites/all/* ./
$ cd ~/drupal-6.15/sites/default &#038;&#038; ln -s ~/shared/sites/default/* ./
$ cd ~/drupal-6.15/themes &#038;&#038; ln -s ~/shared/themes/* ./
</pre>
<p>Undoubtedly someone has already scripted this stuff, but I was pretty proud of it so maybe it will be useful to someone else. (There&#8217;s always <a href="http://jystewart.net/process/2008/07/deploying-a-drupal-site-with-capistrano-2/">Deploying Drupal with Capistrano</a>, but I think that&#8217;s solving a slightly different problem.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.commonmediainc.com/2010/01/10/streamlining-drupal-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
