Running Drupal on Debian 8 with Apache 2.4, event MPM and PHP-FPM (via socks and proxy)

I’m building a new Ansible playbook for setting up web servers with Debian 8. I have always used mod_php before and it has been very stable but have some well known drawbacks. Since Debian 8 comes with Apache 2.4 and PHP 5.6 I wanted to implement PHP-FPM that seems very promising.

With mod_php every Apache process will need to load PHP and therefor use a lot more RAM than needed, even for just serving static content like images and css. I have been running Lighttpd as a static file server to mitigate this problem.

Markdown editor for BUEditor on Drupal

The Markdown editor for BUEditor now has a stable 1.0 release for Drupal 7. I was recently made co-maintainer and are now preparing a 1.1 release. Please help by testing 7.x-1.x-dev. My goal with Markdown editor, besides making it even better, is to make it 10 to 100 times more popular.

If you want to see Markdown editor 7.x-1.x-dev in action I have posted an screencast Introduction to Markdown editor for BUEditor on Vimeo.

Resize me - I'm responsive and mobile first

I have been working with targeted CSS in Drupal themes for modern mobiles like the iPhone for some time now. has implemented it since early 2009, incidentally at the same time I got my first iPhone. This approach has worked well but now with over a third (34 percent) of the visitors to using Android or iOS devices it’s time to take them more seriously.

Upgrade from Drupal 6 to Drupal 7 with Migrate 2

When I planed the upgrade to Drupal 7 for I decided to rebuild the site from scratch and use the Migrate module to migrate over content, users, terms etc.

Rebuilding the site made it easy to get rid of some old junk and get a cleaner and more modern structure for It also gave me a reason to try out the relative new Migrate 2 module. Migrate modules main use is to migrate content from other systems in to Drupal. It works equally well for migrating Drupal to Drupal.

Amazon CloudFront as a CDN for Drupal

When I access from Sweden the site feels reasonable quick and responsive. From other parts of the world it feels less so, even when the Internet connection is good.

The reason is of course that my server is located in Sweden and that location matter on the Internet. Latency and capacity gets worse, in most cases, the bigger the distance is. Ping time to a server close by can be something like 10-20 ms. With a server on the other side of the world the ping time is most likely 300+ ms.

The solution is to move the content closer to the visitors and that can be done with a Content delivery/distribution network, CDN.

Really big players like Google and Facebook build there own systems. They simply build a bunch of data centers all over the world. Big players use CDN services from companies like Akamai and Limelight.

Both options is a bit over my budget for

BBEdit Clippings for Drupal 7

Rainy days, the just released BBEdit 10 and the fact that all new sites I build now are Drupal 7 has inspired my to update and vastly improve my BBEdit clippings for Drupal.

My BBEdit Clippings for Drupal 7 includes:

  • All hooks
  • All drupal_* functions
  • All devel module print/debug functions
  • Common functions like t, l, url, check_*
  • Control structures like for, if and switch
  • Snippets for doxygen and function
  • Some theme functions for quick insert into template.php.

Download/clone/fork from

Drush 4, more awesome than ever - DrupalCamp Stockholm 2011

Posting my slides for the “Drush 4, more awesome than ever” session.

Not using Drush yet? Only using it for installing and updating modules? Come then and see what you can do with Drush 4.

This session will briefly mention the basic Drush commands and some of the new features in Drush 3 and 4. The main focus will be on advanced uses of Drush.

  • Set up Drush site-aliases to easily access remote Drupal installations as well as sync databases and files between them.
  • Make scripts with Drush commands to automate Drupal site maintenance tasks.
  • Build your own Drush command.

Add a iphone.css file to

The web site, nice as it is after the redesign, is not a pleasure to access on a mobile device like the iPhone. In issue #951114: Mobile phone support (iPhone / Android) there are some discussions and suggestions how to improve this. My contribution is a iphone.css file for, see below or in the issue.

I have two simple goals for mobile devices:

  • Avoid the need to zoom in and scroll sideways, making the text readable directly.
  • Make the navigation and the search function touch friendly with larger buttons/fields and more spacing.

In the screenshots you can see the result of this first ruff draft for an iphone.css file for d.o. With a few lines of CSS we have made a lot nicer to use with an iPhone.

Bazaar workflow for developing Drupal based web sites (2011 update)

I wrote the original Bazaar workflow for developing Drupal based web sites in 2009. I still use basically the same workflow and it serves me well. In this post I include the improvements and changes I have made. They include use of Bazaar shared repository, Bazaar smart server and Git since has migrated from old CVS to Git.

The Site builder guide on describes a very similar workflow but using Git.

So why not simply use Git? It comes down to personal preference. I like Bazaar and while Git is a very good system I feel it’s a bit over complicated. When working with people who are not used to version control systems it’s easier/quicker to teach them Bazaar than Git. If you set them up with a Bazaar checkout and bind it, less things can go wrong.

This workflow works well for when you have a number of small/medium web sites that you need to maintain on a continues basis. Big web sites with many developers have different needs, check out A Rebase Workflow for Git by Randy Fay for some good insights. The same principles can be used with Bazaar as well.

Make a Drupal theme look better on the iPhone and the iPad

When I got my first iPhone two years back I adapted the theme here on to work better with it. I documented it in my post Make a Drupal theme look better on the iPhone.

During the holidays I got to try out the iPad for a few days and found ways to make the theme work better for it as well.

I have two simple goals for the iPhone and the iPad (and all other mobile devices):

  • Avoid the need to zoom in and scroll sideways, making the text readable directly.
  • Make the navigation and the search function touch friendly with larger buttons/fields and more spacing.


Subscribe to planetdrupal