Possible Duplicate:
Which Content Management System (CMS) should I use?

I need the most simple way to publish code snippets in PHP, Javascript, HTML and CSS.

What is the best free CMS to use with PHP / MySQL with these requirements?

  • Made for code snippets, or very good at it.
  • Syntax highlighting for the code snippest, when published but even when writing if possible.
  • Possible to write some documentation around the code snippet.
  • Nice urls, like /html/input-search/
  • Tags or categories for code snippets.

I'm using Wordpress for other things but I don't think it's simple enough for code snippets.


Almost any CMS you choose answers those requirements (save for the syntax highlighting when typing, that I've never seen unless in ace or cloud9).
You could close your eyes and just randomly pick one.
Here are my personal recommendations:

  1. If you want something set up in less than an hour, I'd recommend wordpress with crayon syntax highlighter. In wordpress, if you set up your categories well, you can easily have any url you like.

  2. If you want more flexibility (for example "yoursite/html/" shows all html snippets instead of 404ing, then I'd advise for Drupal. The URL scheming is extremely variable and you can create new types of content and views very easily. This is how it would go:

    1. Download drupal and the views plugin, and a syntax highlighter plugin (there is a plethora)
    2. Create a new type of content, call it "snippet", add two fields: language and text
    3. Create a view, and set rules to display and filter snippets according to url parameters /snippets/%language%/%snippet-id%
  3. If you want something even more flexible (and my personal favorite), then get silverstripe. It's extremely flexible, extremely coder-friendly. But you'll have to code a little. As I am a coder, I think this is faster and easier than wordpress/drupal/other cmses that try to avoid you having to type anything.


As Xananax already wrote there are many to choose from. In our company we use WikkaWiki. It has a pretty good syntax highlighter based on GeSHi. And you can have categories too.

  • I like that WikkaWiki uses similar syntax that is used by this Q&A in the editor. That way I can paste code without it beeing destroyed by a parser (like TinyMCE). I will try it out and see if it's what I'm looking for. – Jens Törnell Dec 17 '11 at 20:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.