Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
228 lines (135 sloc) 13.3 KB
<!doctype html>
<!--[if lt IE 9]> <html class="no-js oldie" lang="en"> <![endif]-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Blogging with Drupal 6 - Part 1 | Divya Manian</title>
<meta name="author" content="Divya Manian">
<meta name="description" content="As you might infer from my tweets, I have a love-hate relationship with Drupal. I want to document here what I gathered in my quest to move my blog &hellip;">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="">
<link href="/stylesheets/screen.css" rel="stylesheet">
<link href="" rel="alternate" title="Subscribe" type="application/atom+xml">
<link href="" rel="alternate" title="Subscribe to Web Development updates" type="application/atom+xml">
<body >
<div class="container">
<div class="content">
<header role="banner"> <h1><a href="/">Divya Manian</a></h1>
<h2><a class="twitter" href="">twitter</a> <a class="rss" href="">RSS Feed</a> <a class="youtube" href="">Youtube Channel</a> <a class="github" href="">Github</a></h2>
<nav class="sitenav"><a href="/">Home</a>
<a href="/archives">Archives</a>
<a href="/about.html">About</a>
<nav class="article">
<a class="previous" href="/book-reviews-for-feb-2010.html" title="Book Reviews for Feb 2010">&#x276C;</a>
<a class="next" href="/book-reviews-for-feb-2010-part-2.html" title="Book Reviews for Feb 2010 - Part 2">&#x276D;</a>
<time datetime="2010-02-26T00:00:00+05:30" pubdate><span class='month'>Feb</span> <span class='day'>26</span> <span class='year'>2010</span></time>
<h1 class="entry-title"><a href="/blogging-with-drupal-6-part-1.html">Blogging with Drupal 6 - Part 1</a></h1>
<div class="entry-content"><p>As you might infer from <a href="">my tweets</a>, I have a love-hate relationship with Drupal. I want to document here what I gathered in my quest to move my blog to Drupal 6, to spare you some of the <span class="strike">back</span> path-breaking work.</p>
<p>I hope to cover what I learnt about Drupal 6 migration, modules, and design in 3 posts. I assume you have a blog running Drupal 5 and you know the meaning of a <a href="">Web Server</a> or a Database. </p>
<p>In this post, I want to talk about setting up a staging server. Bloggers are tempted to use their live sites to experiment with migrating or testing modules. You are most vulnerable when you do this, as you can even wipe out your entire database by installing a rogue module. </p>
<p>Hence, the most important thing you should do as a Drupal blogger is to set up a local staging server where you can test your migration to Drupal 6. Once you are satisfied, you need to repeat the same steps for migrating the live content to Drupal 6.</p>
<p>If you are looking to migrate from Wordpress or other CMS, here is <a href="">how to migrate content</a>.</p>
<li><h3>Set up Staging Server</h3>
<p>Before we begin the migration, we need to setup Drupal 6 on a Staging server. It would be best if your Staging server can reflect the server where your website is hosted as much as possible. Follow these <a href="">instructions to set up Drupal 6 on your machine</a>.</p></li>
<h3>Migrate Content to the Staging Server</h3>
<li>This is the nasty bit. If you are importing from Drupal 5, you are in luck as <a href="">Backup and Migrate module</a> can do the donkey work for you.
<li>Install Backup and Migrate on your live site</li>
<li>Put your site in Off-line mode (Admin > settings > Site Maintenance)</li>
<li>Turn off clean URLs, disable optional modules (e.g. Views, Image, TinyMCE, etc.), and switch to a default theme. If your frontpage is a View (as mine was), set it to the default node.</li>
<li>Go to the Admin settings for Backup and Migrate, and export your database as a downloadable file. </li>
<li>Turn back on all the modules (make sure your settings are still correct), clean URLs and revert to your theme. Finally take your site back online. </li>
<li><a href="">Import the database from the above step</a> into your local Database Management System (usually MySQL).
<li>Open the Drupal 6 <code>update.php</code> in a browser to upgrade the imported database.</li>
<h3>Install Modules</h3>
<p>The trick to have pain free upgrades is to depend as less as possible on external modules. Unfortunately, the curse of infinite modules almost always hits every Drupal Administrator. Recently Drupal has introduced a pledge system, which module maintainers use to declare their support for the upcoming Drupal release. But, it is still not a good solution.</p>
<p>To look at it positively, it gives you opportunity to fine-tune the user experience on your site. If a module does not have a future release, it is most likely because of poor demand, which means you shouldn&#8217;t be using it anyway. </p>
<p>I will cover some of the interesting modules for blogging in my next post. </p>
<h3>Update Theme</h3>
<p>There are <a href=";solrsort=sis_project_release_usage%20desc" title="Themes |">several themes available for Drupal 6</a>, which you can use immediately. I hope to cover some of the pitfalls of writing a theme for Drupal 6 in a future post in this series.</p>
<h3>Test Local Staging</h3>
<p>Use this opportunity to test your <a href="">URL Rewrites</a> <strong>if</strong> your local staging uses the same web server as your host. If this move involves moving your blog from a sub-folder to the main directory (like mine did), it helps to write and test URL Rewrites on this local staging server. </p>
<p>If you are moving from another CMS system to Drupal, you should ensure the paths redirect seamlessly or are retained. Two modules that can help you here are <a href="">Path Auto</a> and <a href="">Global Redirect</a>.</p>
<li><h3>Migrate the live site</h3><p>Practise, practise, practice. Typically you might not have caching systems to handle your blog downtime, so make sure you are well-versed in the migration process (all the above steps) so that you can do them with the least downtime possible. I repeated all the steps above six or seven times on my local staging server, before I found the courage to do it on my live site.</p>
<p>It still took me two hours.</p></li>
<h3>Backup Regularly</h3>
<p><a href="">Coding Horror&#8217;s catastrophic failure</a> just underscores how you need to take up backup in your hands and not simply trust your hosting provider.</p>
<p>With Drupal 6, Backup and Migrate Module can be used to schedule regular backup of your Drupal database. Unfortunately you can only backup to a location that hosts your Drupal files. You should download these files every day/week (depending on how frequently you update the site), so that you are truly safe from catastrophic failure (and back up your local machine!)</p>
<p>If you like tinkering with the site theme as I do, you should use a <a href="" title="Revision control - Wikipedia, the free encyclopedia">Versioning System</a> so that you can go back to changes done in case you don&#8217;t like your latest update. You can put the site files on your local staging server in version control, but your hosting provider will typically not provide that facility for your use (which means you may have to update the live site manually).</p>
<p>There is a reason for this backup madness, which is to be prepared when disaster strikes. Of course, this is assuming you care enough about your blog, if you didn&#8217;t, you won&#8217;t be reading this anyway!</p>
<p>In the next post, I will cover some of the modules I have found useful in Drupal 6, and talk about modules I had to lose from Drupal 5 and how I coped with that loss.</p>
<p class="meta">This post was posted by
<a href="/about.html">Divya Manian</a>
<time datetime="2010-02-26T00:00:00+05:30" pubdate><span class='month'>Feb</span> <span class='day'>26</span> <span class='year'>2010</span></time> in
<span class="categories">
<a class='category' href='/categories/web-development/'>Web Development</a>
. If you would like to update this post, <a href="">please send a pull request</a>.
<div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="">comments powered by Disqus.</a></noscript>
<aside id="articles">
<p><img class="avatar" src="" height=48> <a href="">Divya Manian</a> lives in SF. <a href="/about.html">More about me ❭</a></p>
<h2>Posts on Web Development</h2>
<ul><li><a href="/diversity-in-conferences.html">Diversity in Conferences</a></li><li><a href="/using-decimal-percentage-values-in-responsive-design.html">Using decimal percentage values in responsive design</a></li><li><a href="/using-background-clip-for-text-with-css-fallback.html">Using background clip for text with CSS fallback</a></li><li><a href="/markup-free-icon-fonts-with-unicode-range.html">Markup-free icon fonts using unicode-range</a></li><li><a href="/jscamp-css-next.html">JSCamp: CSS Next</a></li><li><a href="/some-updates.html">Some Updates</a></li><li><a href="/css-object-model.html">CSS Object Model</a></li><li><a href="/fake-bolding-of-web-fonts.html">Fake Bolding of Web Fonts</a></li><li><a href="/html5please-api.html">Html5please API</a></li><li><a href="/html5please.html">html5please</a></li><li><a href="/mustache.html">mustache, hogan, handlebars</a></li><li><a href="/redesign-notes.html">Redesign Notes</a></li><li><a href="/summary-of-various-exciting-css-drafts-and-proposals.html">Summary of various exciting CSS drafts and proposals</a></li><li><a href="/this-revolution-needs-new-revolutionaries.html">This revolution needs new revolutionaries</a></li><li><a href="/some-css-transition-hacks.html">Some CSS Transition hacks</a></li><li><a href="/safe-css-defaults.html">Safe CSS Defaults</a></li><li><a href="/unplugged-2011.html">Unplugged 2011</a></li><li><a href="/bokeh-with-css3-gradients.html">Bokeh with CSS3 Gradients</a></li><li><a href="/making-pure-css3-demos-better.html">Making "Pure CSS3" demos better</a></li><li><a href="/web-opener-at-opera.html">Web Opener at Opera</a></li><li><a class="btn" href="/categories/web-development/">More</a></li></ul>
<footer role="contentinfo"><p>
Copy to your heart’s content 2013 - Divya Manian -
<span class="credit">Powered by <a href="">Octopress</a></span>
<script type="text/javascript">
var disqus_shortname = 'nimbublog';
var disqus_developer = 1;
var disqus_url = '';
var disqus_identifier = '';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
<script src="/javascripts/octopress.js"></script>
var _gaq=[['_setAccount','UA-97188-1'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];