Per Søderlind

I code for fun

WordPress and Pow

Apple + WordPress = POW!

Here is my second take on running WordPress and WordPress Multisite locally on my Mac (first is here). I just discovered Pow; “Pow is a zero-config Rack server for Mac OS X. Have it serving your apps locally in under a minute”, and my first thought was “can I run WordPress on Pow?”.  Well, here’s how I did it (I’ll also show you how to install MySQL, PHP 5.4 and Ruby 1.93 on Mac OS X Mountain Lion):

This guide is work in progress, I’ll keep you updated on twitter


  • Mac OS X Mountain Lion. I did this on a fresh Mac OS X Mountain Lion installation.
  • Download and install Command Line Tools (Mountain Lion) for Xcode. If you’re not already registered for a free Mac Developer account, do so.
  • Download and install Xquartz so that the png.h header exists for compilation of certain brews. Mountain Lion removes X11, which contained many headers.
  • Install Homebrew, “The missing package manager for OS X“. Open Terminal, and from the command line run:

There’s going to be a lot of cut and past from now on, but in 15 minutes you’re up and running with WordPress on Pow :).

One by one, copy the commands below and run them in Terminal


When you run mysql_secure_installation (line 7 below), answer Y to all the questions.

Add WordPress database and user to MySQL

PHP 5.4

PHP is no longer part of the default Homebrew repository, and hence you need to add the Homebrew-PHP repository. WordPress and Pow only needs mysql and php-cgi. If you’d like to add more features, run brew options php54 from the command line to see the available configurations.

Ruby upgraded using rbenv

The default Ruby version on Mountain Lion is a bit old (yepp, that’s an understatement). Pow is a Ruby/Rack web server, and it runs best on the latest version of Ruby. rbenv in combination with ruby-build, allows you to install Ruby in your user space.

Pow and Powder

Pow was created to run Rails/Rack applications, but we want to run legacy applications on Pow (ie PHP / WordPress) and need the rack-legacy rack-rewrite gems.
Pow is easy, but Powder makes it even easier, with a lot of management commands for Pow.


Ta-da, finally there, just have to grab wget first.
The file, saved in ~/Sites/config, is a configuration file with rewrite rules (think .htaccess) for WordPress. At the moment it doesn’t support multisite, but I’m working on it. Forked the git below and added support for WordPress Multisite

Adding another WordPress site

Yes, you can :)

WordPress Multisite on Pow

I highly recommend that you create a separate database for your multisite, so let’s do that first

next, install WordPress

When you’re finished adding your site to the multisite database and it’s up and running, edit multisite/wp-config.php and add the following just above the line reading
/* That’s all, stop editing! Happy blogging. */

You will need to refresh your browser to continue, then go to Tools > Network Setup.

In Network Setup, select Sub-domains (more about why, below), fill in the Network Details and click Install. On the next page follow step 1 and 2. You don’t need a .htaccess file, added above handles rewrites.

Why sub-domains:

In Pow, once a virtual host is installed, it’s also automatically accessible from all subdomains of the named host. For example, the virtual host added above can also be accessed at and, which is perfect for a WordPress Multisite installation.


WordPress plugins and permalinks, how to use pretty links in your plugin


MemCachier backend for the WP Object Cache


  1. derry

    Hello, Thanks for this post. I executed everything in your tutorial and recieved this error message:

    Any help would be appreciated.

    • PerS

      Please check if php-cgi is installed by running the command brew list php54

    • I got the same error, so to fix it, I made sure that pow can see php-cgi:

      echo 'export PATH="/usr/local/opt/php54/bin:$PATH"' >> .powenv

      (where that directory is the output of dirname which php-cgi)

  2. So I had pow working great. But it suddenly doesn’t serve the PHP files anymore. Any idea?

  3. Jochen Fuchs

    Hi Per,
    thx for your great blog entry on behalf of WP on Mac! Unfortunately, when running the init script “mysql_install_db” I get an abort “[ERROR] /usr/local/opt/mysql/bin/mysqld: unknown option ‘–skip-bdb'” w/o the system tables being built, and I am currently unable to nail down where within “mysql_install_db” the mysqld option string is assembled in an obviously false manner. Any clue or heard about that before? Sorry for this… Am using 10.8.2 and completed all prerequisites mentioned in the upper part of your post.
    Thx & regards, Jochen

  4. Just an FYI…
    I’m successfully using this method on a fresh install of Mac OS X Mavericks 10.9 on 15″ MacBook Pro Retina.

    These instructions are up to date and still relevant.

Leave a Reply

Powered by WordPress & Theme by Anders Norén