Dieter Petereit December 2nd, 2013

Pico: Free, File-based Content Management System for PHP-Developers

Pico is the name of a fairly new CMS, which doesn't need any database connection at all. Its developer Gilbert Pellegrom calls the system "stupidly simple". I'd object and say, that this is only true for developers. If you are a PHP aficionado and like to write your posts using Markdown, Pico might just be the CMS for you.


Pico: No Database, Pages are Individual Files

Pico is a CMS, that will have a special group of people rejoice. Are you more of the bureaucratic type? Do you like to keep everything thoroughly sorted, each in its folder? Are you into PHP and Markdown? If so, great. If not, stay away from Pico and look at more established solutions, such as WordPress.

It's not that Pico is a bad idea; don't get me wrong. Pico requires PHP 5.2.4 and an Apache server with mod_rewrite. Creating a website with Pico definitely is simple. You do not have to install anything. A simple upload of the CMS and its folder structures to your web space is all it takes. The system is ready to serve.


Content is now produced using Markdown. Upload the creates files with the extension .md to the folder content. Naming a file index.md defines this file as the homepage of your site. Just like you'd do in HTML, putting more index.md into sub-folders leads to being able to reach an URL such as www.testpage.com/content/sub-folder/index.md by typing www.testpage.com/sub-folder/ .

As is common in Markdown, files are allowed to contain HTML code, too. HTML code will not be changed on parsing the Markdown file. Meta information is added to the header of each file like so:

Title: Welcome
Description: This description will go in the meta description tag
Author: Joe Bloggs
Date: 2013/01/01
Robots: noindex,nofollow

This meta information can be read and processed from inside your theme. You might have asked yourself, how the connection between all of these individual and separate files is made. How do we add the glue that sticks it altogether? Where is the navigational part, our information architecture? This is where Pico's theming comes into play.

Pico: Themes Based on the Twig Engine

There is no shortage of theming engines for PHP. Pico's developer decided to go for a relatively fresh approach to theming, named Twig. Twig is created and maintained by Fabien Potencier, developer of the Symfony framework. Since version 2 Symfony uses Twig, too. Is it any wonder?

Twig's way of installation is very similar to that of Pico. Download, unzip and re-upload top your webspace. Now embed Twig into your Markdown. Twig-based themes are raw text files, that might or might not carry the HTML extension. XML does the job, too.


If you're into the customization of WordPress themes, Twig will not be a total stranger to you. Similar to WordPress theming, Twig embeds function calls into the theme. Twig knows variables, expressions and tags. A very basic Twig theme might look like this:

< !DOCTYPE html>

        My Webpage


My Webpage

{{ a_variable }}

Quite a few of the better known IDEs, such as Sublime Text, Notepad++, Coda, Eclipse and more, support the Twig syntax and care for proper highlighting and auto-completion. Theming with Twig will not make PHP developers wonder, yet is no real alternative for the average Joe.

Pico as well as Twig comes at no cost. Both are freely available, Pico under MIT, Twig under BSD license.

Conclusion: The templating is the hardest part. Once done, Pico can be used by lesser skilled people. The only precondition is, that they are able to write Markdown and utilize an FTP client. I doubt, though, that there'll be many average users feeling attracted to this mode of operation. A niche where Pico might succeed because all the preconditions are set, is the documentation of code projects. Are you writing large docs in Markdown anyway and are you looking for a decent way to present these docs without having to change too much, Pico is a valid choice. Otherwise, you'd need to be a die-hard fan to decide to go for it...

By the way: Don't mix Pico with picoCMS.

Related Links

Dieter Petereit

Dieter Petereit is a veteran of the web with over 25 years of experience in the world of IT. As soon as Netscape became available he started to do what already at that time was called web design and has carried on ever since. Two decades ago he started writing for several online publications, some well, some lesser known. You can meet him over on Google+.

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *