I'm working on an open-source Wordpress replacement right now. (No link yet. I want to get a little farther before I put it out there.) The basic concept is:
1) Use Rails, to ease development of plugins and per-site functionality.
2) Don't save content or site config in the database. Save it to disk.
3) Git keeps track of your content and config, just like a regular Rails project. The user-friendly admin interface is actually just a wrapper around Git plus a text editor and some menus. Developers can work in a text editor and a terminal while the client works in the GUI.
4) Because content and config are Git-controlled text files and not database records, you have a sane workflow for developing locally then deploying.