I’m playing around with nginx, a light weight http server. One of the first things I tried was to get PHP and WordPress up and running on an Ubuntu 10.4 machine. To do that I followed the following instructions.
First I had to get PHP working so I followed these instructions for PHP-fpm.
The next thing is MySQL and connecting with PHP. This “just worked” after installing php5-mysql.
Finally WordPress which also worked fine – except for permalinks which in the default installation relies on Apache .htaccess redirects. After doing this things sort of worked, but I’m running WordPress in a subfolder (http://localhost/wordpress) so I had to modify the redirect to look like this:
location / {
root /var/www;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^.*$ /wordpress/index.php last;
}
}
…and now it works with any permalink structures.
WordPress, Drupal or Roll Your Own?
When should you use existing CMSs as WordPress or Drupal and when should you build one yourself?
Of course, building a CMS from scratch would be insane but with emerging technologies and standards such as git (for version control), Markdown (for editing), Neo4J (for metadata) and Solr or ElasticSearch for indexing the data, you can get extremely far by putting the pieces together yourself.
Add to that the recent rise in popularity of Javascript frameworks such as AngularJS or Backbone, with which you tend to get a cleaner split between REST-API and UI, and you don’t even have to render the web pages on a server. Static HTML-files with Javascript are fine.
So maybe the time has come to say goodbye to the web CMS that tries to do everything and say hello to a toolbox of world class, open source and free components that you put together yourself to build a framework?