WordPress 1.5 as a Web Site CMS

Posted in: Crowd Favorite, WordPress, Development

Note: this is one of a series of posts about the creation of the King Design web site.

I’ve used WordPress as a web site CMS in the past, I think with version 1.0.1 and 1.2.x - and let me tell you that version 1.5 is definitely the easiest version yet to use as a CMS.

In the past, I’ve used categories as sections with posts as pages. I created my own version of the edit interface that listed the posts in each category rather than the standard chronological listing. I handled different categories by including different template files - for example, the news page should be a list of news items first, while a product information page should show content. Some of the custom coding in this process is no longer needed in 1.5.

For the King Design web site, I decided to :scare: black box :/scare: WordPress; using it to provide content, but not to own the navigation or the layout/template system. I prefer to work with a full page shell rather than headers and footers, and I was working on the site before the templating system was really done, and I needed to integrate my own systems in and WordPress functions wouldn’t be available on all pages due to this… anyway, I rolled my own presentation layer.

It became clear very quickly that I was going to need to either create very specific page type templates, or find a way to execute PHP from within the code for the posts and pages. Luckily, RunPHP had already been written and it works great. For example, the sub-navigation and sidebars on the Tasks and Tasks Jr. pages are actually included code that are page aware and behave correctly depending on the page in which they are included.

I decided to use the ‘Pages’1 feature in WordPress for the main content of the site. The home page, product pages, contact page, etc. are all ‘pages’. For the FAQs and News, I’m using ‘Posts’. This is an obvious call for date based information like news items, but there are more subtle reasons for using posts for the FAQs.

As I previously discussed, search is important. One of the search features I wanted to have in the site was the ability to restrict the search to certain areas of the site.2 By making the FAQs posts and putting them all within the FAQ category, it becomes much easier to manage them as a group. Pages can technically have categories attached to them (the schema supports it), but the default interface doesn’t provide access to those features. I decided it would be best to go with the way WordPress already works instead of hacking in support for additional configuration. Also, WordPress has built-in support for category RSS feeds.

Once I set up all my pages and set up the News and FAQs as posts, I then ran into an issue with the Apache mod-rewrite rules. WordPress does a great job of generating these rules, but if you’re managing the site structure yourself, you need to take control of this as well. I did try to set up my pages as closely as possible to match the URLs I wanted, but in some situations it just wasn’t possible.

News items, for example, have URLs similar to a standard blog structure:

/news/2005/03/22/news-item-title/

however the structure for FAQs is entirely different:

/support/faq/faq-title/

To handle these differences, I had to manage the mod-rewrite rules manually. Remember to make your .htaccess unwritable by the Apache user, or WordPress will add rules on you, often resulting in a 500 Internal Server Error. :)

Since there were going to be pages with mod-rewrite locations like ‘/download/’, I needed a solution for where to put the physical ‘download’ directory that I wanted to put certain files in. The solution I decided on was to create a ’static’ directory, with a structure that mirrored the psuedo structure created by the mod-rewrite rules. Then I added a mod-rewrite rule to check in that location for anything that wasn’t already caught by another rule.

For example, the URL:

/tasks/demo/2.5/

is really hitting this physical location:

/mysite/tasks/demo/2.5/

This makes is easy for me to manage file downloads and to integrate installations of other systems at proper URLs without having them clash with the mod-rewrite rules needed for the WordPress content.

I’m very happy using WordPress as a CMS. I plan to convert alexking.org to WordPress (using similar techniques) in the future, just need to find some roundtuit.

  1. A page is just a post with the status of ’static’ - take a look in the database. [back]
  2. I also plan to add additional search features in the future, like the ability to specify searching for information by product. [back]

Popularity: 14% [?]

Posted March 22nd, 2005 @ 11:22 PM

23 Replies

  1. Denis de Bernardy adds this Comment:

    WP as a CMS suffers from one major problem imho: the front page is polluted with posts, whereas you would merely want to use posts as a means to display news. a more ideal behavior would be:

    - if exists, display the page with slug ‘home’ as the home page
    - else run as blog

    March 23rd, 2005 at 4:01 am

  2. echeng adds this Comment:

    Alex - this is excellent. I would like to re-do my site at some point to make it XHTML compliant, and to use Wordpress as a CMS.

    Or, I could use EE, now that I know it very well. ;)

    March 23rd, 2005 at 4:13 am

  3. Matt Smith adds this Comment:

    Have you taken a look at TextPattern? For some reason, even though WP 1.5 supports pages, it still feels like a blog with page support bolted on. TextPattern feels more like a light-weight CMS that can support blogging. Very subtle difference. Everyone’s been waiting on the 1.0 release for a while, but lots of people are running on the new RC3 and many others are running on the older RC1.

    March 23rd, 2005 at 8:07 am

  4. Denis de Bernardy adds this Comment:

    Matt — I have, and I tried many other CMS tools, but I found WordPress was the least counter-intuitive to the average user (read: for a potential customer). Moreover, I did not find anything that even comes close to the WordPress plugin API.

    March 23rd, 2005 at 8:50 am

  5. Elaine adds this Comment:

    @Denis - It’s actually not that hard to do just that with the right set of templates and plugins. I’m having a good experience with the include_page plugin (author’s page seems to be 404, though), using it to fill in the main content of the home page, with the news as just a sidebar.

    (Unfortunately, I don’t yet have an example that’s both live AND public.)

    March 23rd, 2005 at 10:29 am

  6. Alex adds this Comment:

    I’ll talk a little about the home page in the ‘hacking WordPress’ post.

    March 23rd, 2005 at 11:27 am

  7. Bill Bradford adds this Comment:

    I’m using WP1.5 as the CMS behind SunHELP. The big kicker was the “pages” feature; that makes a lot of things easy.

    I looked at Textpattern, but (at least at the time) Dean had no plans to implement any kind of “Show me Archives” auto-functionality (important for a “news” site like SunHELP); that’s very easy to do with a WP plugin and one line of PHP in a “page”.

    March 23rd, 2005 at 2:46 pm

  8. dblookup.info adds this Trackback:

    How to choose an open source CMS ?

    First off, just try it here : http://www.opensourcecms.com

    This site was created with one goal in mind. To give you the opportunity to “try out” some of the best php/mysql based free and open source software systems in the world. You are welcome t…

    March 23rd, 2005 at 3:19 pm

  9. Jason adds this Comment:

    I have taken this a step further at my site and intend to clean up what I have done then contribute it to whoever wants it but what I have done is modify the list_pages function (or whatever it is called, been a while since I’ve looked at it) to create a CSS based drop down menu using the hierarchies within WP to create sub menu’s.

    You can check it out and if you’re interested then just drop me a note and help motivate me to get back to work on it. :)

    March 23rd, 2005 at 3:40 pm

  10. B:log.isch adds this Trackback:

    WP als CMS?!?

    Wirklich sehr sehr interessanter Artikel für eine schnelle und komfortable Lösung. Gerade auch deswegen, weil WP nach erfolgreicher Einrichtung auch für “Dummys” extrem einfach zu bedienen ist. Ich denke, ich werd das mal angehen - das Ergebnis wi…

    March 23rd, 2005 at 8:07 pm

  11. alexking.org: Blog adds this Trackback:

    WordPress (as CMS) Hacking Tips

    Note: this is one of a series of posts about the creation of the King Design web site.

    I knew the WordPress back-end pretty well up through version 1.2.x, but I was so busy during the 1.5 development cycle that I wasn’t able to contribute much to t…

    March 23rd, 2005 at 8:26 pm

  12. Alderete adds this Comment:

    Denis: You wanted a way to control the front page, as something that wouldn’t be “polluted” with posts.

    I am using a plug-in called Page to Front that I actually found in the WordPress documentation wiki (Codex). Worked exactly as I expected.

    March 25th, 2005 at 11:59 am

  13. guyfisher.com adds this Trackback:

    Clean Slate

    I’ve been experimenting with WordPress, and I like it so much that I’ve decided to replace Movable Type as my weblog publishing platform….

    May 6th, 2005 at 10:36 pm

  14. Urdu Blogging اردو میں بلاگنگ adds this Trackback:

    Discussion on Urdu Content Management

    There is an ongoing discussion about the choice of a back-end system for the proposed Urdu portal. I have been asserting the need of a content-management system (CMS) for the creation, integration and management of Urdu content. I have practically…

    May 10th, 2005 at 5:52 am

  15. Gil Coutinho adds this Trackback:

    a song

    WordPress 1.5 as a Web…

    June 27th, 2005 at 4:48 pm

  16. Urdu Blogging » Blog Archive » Discussion on Urdu Content Management adds this Pingback:

    […] WordPress 1.5 as a Web Site CMS […]

    May 18th, 2006 at 8:24 pm

  17. iain adds this Comment:

    I’ve been using wordpress for about a week and its simply bleown me away. I roll out a lot of small brochure sites, and the way i see it, this is a perfect tool for the job.

    June 15th, 2006 at 4:08 am

  18. הבלוג של ×?×—“×™ דקר » וורדפרס להמוני×? adds this Pingback:

    […] wordpress as CMS - Alex King […]

    September 11th, 2006 at 11:52 am

  19. TrueVox adds this Comment:

    This is perfect! I’m designing a website for a friend (I have enough programing sense to hack PHP and HTML if it’s already there, but not enough by a long shot to roll my own + CSS too), and I was looking for something like WordPress, but for just a “Standard” website. THIS IS IT! Thank you!

    March 1st, 2007 at 5:53 am

  20. Anonymous adds this Comment:

    Congrats on a super blog,easy to get around,interesting and friendly,will be back soon

    March 22nd, 2007 at 11:21 pm

  21. Showcase of sites using WordPress as a CMS » WebGrrrl.net adds this Pingback:

    […] googled my way through various articles by bloggers and web site owners who agree about the potential of WordPress as a CMS. I even found one fine […]

    June 2nd, 2007 at 11:16 pm

  22. Mike adds this Comment:

    It’s very beautifully.

    August 17th, 2007 at 5:10 am

  23. Kyle adds this Comment:

    I’m using Wordpress MU to attempt to do the same thing with a University site containing many department sites. The flexibility is the greatest strength of Wordpress. Having lots of great plugins to choose from really opens up the possibilities. Also the admin and maintenance is very simple. It’s easy for users to “get it” and start creating their content.
    Wordpress now allows you to choose whatever page you want to have as the home page. We use categories as the basis for your navigation. It makes a lot more sense once you get out of the “stick a document in a single folder to be done with it” mentality.

    January 4th, 2008 at 2:19 pm

Add a Comment

Please note: Use of a non-personal web site or blog in the field below and/or comments that are off-topic, personal attacks, or support requests will likely be removed at my discretion.

Note: This post is over 3 years old. You may want to check later in this blog to see if there is new information relevant to your comment.

E-mail as Time Sink » « Lifetime Accounts at Use Tasks

About This Site

This is the personal web site of Alex King, an independent developer based in Denver, Colorado USA. More...


Crowd Favorite

Crowd Favorite is my software and web development business.

We build web applications, design and develop custom WordPress themes and plugins, and build custom sites using WordPress as a CMS.


I also have a tumblog that aggregates my online content from other services (Twitter, Flickr, del.icio.us. etc.).

Ads