<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>sahiga</title><link>http://www.stephaniehiga.com</link><description>The personal website of Stephanie A. Higa.</description><lastBuildDate>Sat, 04 May 2013 21:24:28 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Goodbye, WordPress! Hello, Nikola!</title><link>http://www.stephaniehiga.com/posts/goodbye-wordpress-hello-nikola.html</link><description>&lt;p&gt;It's official: I've finally migrated my personal website from &lt;a class="reference external" href="http://www.wordpress.org"&gt;WordPress&lt;/a&gt; to &lt;a class="reference external" href="http://nikola.ralsina.com.ar"&gt;Nikola&lt;/a&gt;, a static site generator. In my 53432099809th attempt to return to writing, I'll use this bit of nerd news to jumpstart what I hope will become a regular blogging habit.&lt;/p&gt;
&lt;div class="section" id="the-quest-for-static"&gt;
&lt;h2&gt;The quest for static&lt;/h2&gt;
&lt;p&gt;WordPress gets a lot of hate in the development community. Let me say upfront that this is absolutely not the reason I decided to leave it (I have the softest of spots for WordPress). It's just that one day I woke up and realized I didn't need a database and a gazillion server queries to post text on my website.&lt;/p&gt;
&lt;p&gt;So I started looking into static site generators. A static site generator does exactly what's written on the box: it creates a static site. It combines the best of Web 1.0 (fast, portable, secure HTML pages) with the best of Web 2.0 (templates). I considered:&lt;/p&gt;
&lt;ul class="simple"&gt;&lt;li&gt;&lt;a class="reference external" href="http://jekyllrb.com/"&gt;Jekyll&lt;/a&gt; + &lt;a class="reference external" href="http://www.octopress.org"&gt;Octopress&lt;/a&gt;: Hooks directly into &lt;a class="reference external" href="http://pages.github.com/"&gt;GitHub Pages&lt;/a&gt; and is apparently very good. But I don't know Ruby, so I kept looking.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://ringce.com/hyde"&gt;Hyde&lt;/a&gt;: A Python port of Jekyll. Ultimately, I passed on it because of the lack of documentation. When it comes to technology, this Luddite needs a lot of hand-holding.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://docs.getpelican.com"&gt;Pelican&lt;/a&gt;: Also Python-based, with complete, well-written documentation. I installed it and got lost while trying to generate files. Pelican looks like a great choice, but I think it's meant for people who are much more tech-savvy than I am.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Shortly after I installed Pelican, someone posted a link to &lt;a class="reference external" href="http://nikola.ralsina.com.ar"&gt;Nikola&lt;/a&gt; on Hacker News. I'm not sure why it didn't come up in all my searches for Python-based static site generators, because so far it's proven to be a dream come true. The documentation is amazing. It's easy to use and in active development. And it was named after &lt;a class="reference external" href="http://theoatmeal.com/comics/tesla"&gt;Nikola Tesla&lt;/a&gt;. (&lt;strong&gt;Huge&lt;/strong&gt; Nikola Tesla fan here.)&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="goodbye-wordpress"&gt;
&lt;h2&gt;Goodbye, WordPress&lt;/h2&gt;
&lt;p&gt;Nikola has an &lt;tt class="docutils literal"&gt;import_wordpress&lt;/tt&gt; function to ease the transition from WordPress to Nikola. I grabbed an XML dump of my site (&lt;strong&gt;Tools &amp;gt; Export &amp;gt; All Content&lt;/strong&gt; in the WP admin panel) and saved it in my Nikola site folder.&lt;/p&gt;
&lt;p&gt;I installed the Python &lt;a class="reference external" href="https://pypi.python.org/pypi/requests"&gt;requests&lt;/a&gt; package (import_wordpress depends on requests):&lt;/p&gt;
&lt;pre class="literal-block"&gt;
sudo pip install requests
&lt;/pre&gt;
&lt;p&gt;Then I ran import_wordpress on the file:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
nikola import_wordpress stephanieahiga.wordpress.2013-05-05.xml
&lt;/pre&gt;
&lt;p&gt;This created a new folder, &lt;strong&gt;new_site&lt;/strong&gt;, within the Nikola folder. I had no posts and only a handful of pages in my WordPress database, so I recreated the pages manually using the page command: &lt;tt class="docutils literal"&gt;nikola new_post &lt;span class="pre"&gt;-p&lt;/span&gt;&lt;/tt&gt;. Similar to WordPress, Nikola differentiates between posts and pages: posts are in the &lt;strong&gt;posts&lt;/strong&gt; folder and pages are in the &lt;strong&gt;stories&lt;/strong&gt; folder.&lt;/p&gt;
&lt;p&gt;Finally, I uninstalled WordPress from my domain via &lt;a class="reference external" href="https://www.simplescripts.com"&gt;SimpleScripts&lt;/a&gt; on my cPanel.&lt;/p&gt;
&lt;p&gt;import_wordpress saves all posts and pages with the &lt;tt class="docutils literal"&gt;.wp&lt;/tt&gt; extension (read by my computer as WordPerfect files). The XML dump, and therefore the folder created by import_wordpress, save the contents of the WordPress database, but &lt;strong&gt;not&lt;/strong&gt; the theme files. So it's important to backup any custom themes before uninstalling WordPress.&lt;/p&gt;
&lt;p&gt;Tutorials on importing WordPress posts into Nikola:&lt;/p&gt;
&lt;ul class="simple"&gt;&lt;li&gt;&lt;a class="reference external" href="http://nikola.ralsina.com.ar/handbook.html#importing-your-wordpress-site-into-nikola"&gt;Official site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://flexion.org/posts/2012-10-migrating-wordpress-to-nikola.html"&gt;Flexion.Org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://kushaldas.in/posts/importing-your-wordpress-blog-to-nikola.html"&gt;Kushal Das&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;
&lt;div class="section" id="hello-nikola"&gt;
&lt;h2&gt;Hello, Nikola&lt;/h2&gt;
&lt;p&gt;I assume that the next step is to upload the Nikola site folder to my domain server. If you're reading this post, you can assume that my assumption turned out to be true.&lt;/p&gt;
&lt;/div&gt;</description><guid>http://www.stephaniehiga.com/posts/goodbye-wordpress-hello-nikola.html</guid><pubDate>Sat, 04 May 2013 14:09:26 GMT</pubDate></item></channel></rss>