Tag wordpress

Switching from Wordpress to Pelican

I run a couple of sites that are based on Wordpress and my blog was one of them. There are several things that annoy me when it comes to Wordpress:

  • too many plugins that you need for a good site
  • updates, updates, updates (I merely spend my time in updating everything and keeping compatible)
  • the Wordpress core code
  • the themes HTML and structure that are PHP files
  • it's PHP
  • PHP-FPM consumes to much memory (if configured to serve a Wordpress site with good performance)

So for my blog, which really is static but for the comments, I looked around what tools or frameworks are there to replace the mighty Wordpress with a static site. I wanted something simple, something pythonic. By reading the blogs of people who also had switched from Wordpress I found two tools: Hyde, a pythonic fork of Jekyll, and Pelican. The majority of people who switched chose Pelican, so I did, too. It has more forks on Github and also a repository of plugins. In fact both tools are not very different from each other. Pelican just felt better while using.

The switch took me some days, I had a couple of problems to solve/things to do:

  • create a theme that comes near to my old one
  • configure Pelican to have behave nearly like the old Wordpress configuration
    • adjust all URLs and pagination
    • create nginx config to serve everything
  • convert all content to Markdown
    • Pelican can convert Wordpress xml exports to Markdown/restructuredText
    • some modification to the generated files had to be made
      • Pelican support only one category
      • I used the time to clean the content, too:
        • convert all tags to lowercase
        • fix all invalid URL slugs and create a nginx config to rewrite the old URLs to the new ones
  • create a sitemap.xml
  • integrate Disqus:
    • as Disqus takes Wordpress xml export files, too, it is easy import Wordpress comments to Disqus. Only thing to consider is to adjust the URLs that have changed, otherwise Disqus will not allocate the comments to the appropriate blog entry

The only thing a little mindfucking was the paging configuration but everything else was pretty easy. I can only recommend Pelican to you if your blog is simple and static. The code syntax highlighting feature using pygments is really nifty!

I'm still not totally happy with the blog, but it's nearly in its final form. The following things will be done in the future:

  • use a more readable font PT Sans (it's PT Sans now)
  • compress javascript and stylesheets
  • make the theme responsive PT Sans (at least it is readable)

Wordpress NextGEN gallery and "Not a valid template"

If you encounter the output [Not a valid template] on your gallery pages after you updated to NextGEN gallery 2.x and you probably moved your blog location on the server, then you should check the plugin settings. In my case, under NextGEN Basic Thumbnails the Template value pointed to a wrong path. After I fixed that, everything worked again:

NextGEN settings