Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 228 lines (135 sloc) 13.418 kb
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
1
2 <!doctype html>
e42f8f2 Site updated at 2011-12-11 00:44:12 UTC
Divya Manian authored
3 <!--[if lt IE 9]> <html class="no-js oldie" lang="en"> <![endif]-->
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
4 <head>
5 <meta charset="utf-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7 <title>Blogging with Drupal 6 - Part 1 | Divya Manian</title>
8 <meta name="author" content="Divya Manian">
9
10 <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;">
11
12
13 <meta name="viewport" content="width=device-width, initial-scale=1">
14
15
16 <link rel="canonical" href="http://nimbupani.github.com/blogging-with-drupal-6-part-1.html">
17 <link href="/stylesheets/screen.css" rel="stylesheet">
8f21f85 Site updated at 2011-12-11 02:10:56 UTC
Divya Manian authored
18 <link href="http://feeds.feedburner.com/nimbupani" rel="alternate" title="Subscribe" type="application/atom+xml">
19 <link href="http://feeds.feedburner.com/nimbu" rel="alternate" title="Subscribe to Web Development updates" type="application/atom+xml">
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
20
21 </head>
22
23
cd5e6a9 Site updated at 2011-12-24 06:16:39 UTC
Divya Manian authored
24 <body >
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
25 <div class="container">
26 <div class="content">
27 <header role="banner"> <h1><a href="/">Divya Manian</a></h1>
28
69c30f5 Site updated at 2011-12-11 14:45:02 UTC
Divya Manian authored
29 <h2><a class="twitter" href="https://twitter.com/divya">twitter</a> <a class="rss" href="http://feeds.feedburner.com/nimbupani">RSS Feed</a> <a class="youtube" href="http://youtube.com/nimbupani">Youtube Channel</a> <a class="github" href="https://github.com/nimbupani">Github</a></h2>
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
30
31 </header>
9d25e1e Site updated at 2011-12-11 01:21:19 UTC
Divya Manian authored
32 <nav class="sitenav"><a href="/">Home</a>
e42f8f2 Site updated at 2011-12-11 00:44:12 UTC
Divya Manian authored
33 <a href="/archives">Archives</a>
34 <a href="/about.html">About</a>
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
35 </nav>
e42f8f2 Site updated at 2011-12-11 00:44:12 UTC
Divya Manian authored
36
37
38
39
40
41
42
43
44 <article>
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
45 <nav class="article">
46
47 <a class="previous" href="/book-reviews-for-feb-2010.html" title="Book Reviews for Feb 2010">❬</a>
48
49
50 <a class="next" href="/book-reviews-for-feb-2010-part-2.html" title="Book Reviews for Feb 2010 - Part 2">❭</a>
51
52
53
54 </nav>
55 <header>
56
57
58
59
60
61
62
63 <time datetime="2010-02-26T00:00:00-08:00" pubdate><span class='month'>Feb</span> <span class='day'>26</span> <span class='year'>2010</span></time>
64
65 <h1 class="entry-title"><a href="/blogging-with-drupal-6-part-1.html">Blogging with Drupal 6 - Part 1</a></h1>
66
67
68
69
70 </header>
71 <div class="entry-content"><p>As you might infer from <a href="http://snapbird.org/nimbuin/timeline/drupal">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>
72
73
74
75
76 <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="http://en.wikipedia.org/wiki/Web_server">Web Server</a> or a Database. </p>
77
78
79 <p></p>
80
81 <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>
82
83
84
85
86 <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>
87
88
89
90
91 <p>If you are looking to migrate from Wordpress or other CMS, here is <a href="http://drupal.org/handbook/migrating">how to migrate content</a>.</p>
92
93
94
95
96 <ul>
97 <li><h3>Set up Staging Server</h3>
98 <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="http://drupal.org/getting-started/6/install/download">instructions to set up Drupal 6 on your machine</a>.</p></li>
99 <li>
100 <h3>Migrate Content to the Staging Server</h3>
101 <ol>
102 <li>This is the nasty bit. If you are importing from Drupal 5, you are in luck as <a href="http://drupal.org/project/backup_migrate">Backup and Migrate module</a> can do the donkey work for you.
103 <ol>
104 <li>Install Backup and Migrate on your live site</li>
105 <li>Put your site in Off-line mode (Admin > settings > Site Maintenance)</li>
106 <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>
107 <li>Go to the Admin settings for Backup and Migrate, and export your database as a downloadable file. </li>
108 <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>
109 </ol>
110 </li>
111 <li><a href="http://codex.wordpress.org/Restoring_Your_Database_From_Backup">Import the database from the above step</a> into your local Database Management System (usually MySQL).
112 </li>
113 <li>Open the Drupal 6 <code>update.php</code> in a browser to upgrade the imported database.</li>
114 </ol>
115 </li>
116 <li>
117 <h3>Install Modules</h3>
118 <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>
119 <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>
120 <p>I will cover some of the interesting modules for blogging in my next post. </p>
121 </li>
122 <li>
123 <h3>Update Theme</h3>
124 <p>There are <a href="http://drupal.org/project/themes?filters=drupal_core:87&amp;solrsort=sis_project_release_usage%20desc" title="Themes | drupal.org">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>
125 </li>
126 <li>
127 <h3>Test Local Staging</h3>
128 <p>Use this opportunity to test your <a href="http://en.wikipedia.org/wiki/Rewrite_engine">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>
129 <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="http://drupal.org/project/pathauto">Path Auto</a> and <a href="http://drupal.org/project/globalredirect">Global Redirect</a>.</p>
130 </li>
131 <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>
132 <p>It still took me two hours.</p></li>
133 <li>
134 <h3>Backup Regularly</h3>
135 <p><a href="http://news.ycombinator.com/item?id=990323">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>
136 <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>
137 <p>If you like tinkering with the site theme as I do, you should use a <a href="http://en.wikipedia.org/wiki/Revision_control" 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>
138 <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>
139 </li>
140 </ul>
141
142
143 <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>
144
145 </div>
146
147 <footer>
148 <p class="meta">This post was posted by
149
150
151 <a href="/about.html">Divya Manian</a>
152 on
153
154
155
156
157
158
159 <time datetime="2010-02-26T00:00:00-08:00" pubdate><span class='month'>Feb</span> <span class='day'>26</span> <span class='year'>2010</span></time> in
160
161 <span class="categories">
162
163 <a class='category' href='/categories/web-development/'>Web Development</a>
164
165 </span>
166
e42f8f2 Site updated at 2011-12-11 00:44:12 UTC
Divya Manian authored
167 . If you would like to update this post, <a href="https://github.com/nimbupani/nimbupani.github.com/blob/source/source/_posts/2010-02-26-blogging-with-drupal-6-part-1.md">please send a pull request</a>.
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
168 </p>
169 </footer>
170 </article>
171
172 <section>
173 <h1>Comments</h1>
174 <div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
175 </div>
176 </section>
177
178
179 </div>
180 </div>
181 <aside id="articles">
e42f8f2 Site updated at 2011-12-11 00:44:12 UTC
Divya Manian authored
182 <p><img class="avatar" src="/assets/divya.png" height=50> <a href="http://twitter.com/divya">Divya Manian</a> is a Web Developer in Seattle. <a href="/about.html">More about me ❭</a></p>
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
183 <h2>Posts on Web Development</h2>
2cc1469 Site updated at 2012-01-23 12:45:44 UTC
Divya Manian authored
184 <ul><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 href="/current-color-in-css.html">Current Color in CSS</a></li><li><a href="/css-vocabulary.html">CSS Vocabulary</a></li><li><a href="/active-web-development.html">Active Web Development</a></li><li><a href="/sexy-css3-buttons.html">Sexy CSS3 Buttons</a></li><li><a href="/accessible-css-barcharts.html">Accessible CSS Barcharts</a></li><li><a href="/svg-is-coming.html">SVG is coming!</a></li><li><a href="/wee-marquee.html">Wee! Marquee</a></li><li><a href="/vignettes-with-css3-box-shadows.html">Vignettes with CSS3 Box Shadows</a></li><li><a href="/drop-shadows-with-css3.html">Drop Shadows with CSS3</a></li><li><a class="btn" href="/categories/web-development/">More</a></li></ul>
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
185 </aside>
186 <footer role="contentinfo"><p>
3c9d77b Site updated at 2012-01-01 19:06:29 UTC
Divya Manian authored
187 Copy to your heart’s content 2012 - Divya Manian -
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
188 <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
189 </p>
190
191
192 </footer>
193
194
195 <script type="text/javascript">
196 var disqus_shortname = 'nimbublog';
197 var disqus_developer = 1;
198
199
200 var disqus_url = 'http://nimbupani.com/blogging-with-drupal-6-part-1.html';
201 var disqus_identifier = 'http://nimbupani.com/blogging-with-drupal-6-part-1.html';
202
203
204
205
206 (function () {
207 var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
208 dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
209 (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
210 }());
211 </script>
212
213
e42f8f2 Site updated at 2011-12-11 00:44:12 UTC
Divya Manian authored
214 <script src="/javascripts/octopress.js"></script>
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
215
e42f8f2 Site updated at 2011-12-11 00:44:12 UTC
Divya Manian authored
216 <script>
217 var _gaq=[['_setAccount','UA-97188-1'],['_trackPageview']];
218 (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
219 g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
220 s.parentNode.insertBefore(g,s)}(document,'script'));
221 </script>
418c130 Site updated at 2011-12-10 19:57:24 UTC
Divya Manian authored
222
223
224
225
226 </body>
227 </html>
Something went wrong with that request. Please try again.