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 black box
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.
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
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. 😉
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.
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.
@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.)
I’ll talk a little about the home page in the ‘hacking WordPress’ post.
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”.
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…
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. 🙂
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…
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…
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.
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….
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…
a song
WordPress 1.5 as a Web…
[…] WordPress 1.5 as a Web Site CMS […]
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.
[…] wordpress as CMS – Alex King […]
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!
Congrats on a super blog,easy to get around,interesting and friendly,will be back soon
[…] 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 […]
It’s very beautifully.
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.