WordPress is more than a CMS, it is a PHP Framework

First of all, let us briefly discuss what a Software Library is

A software library is a collection of resources used to develop software.Β 

Programmers write functions and classes, these are sets of instructions and defined behaviours. They range from the simple to the complex, and each is a resource that can be repeatedly used to build something bigger. Such a collection of resources is a Software Library.

Software Framework

A Software Framework is a software library with certain goals in mind:

  • The framework code itself is not meant to be edited or changed.
  • Frameworks are extensible. Resources can be specialised or overridden.
  • Frameworks have a default behaviour.
  • The framework dictates how it’s set of resources is used.
Hopefully theme and plugin developers will be familiar enough with WordPress to see where I am going with this. Here is a list of items that one should consider when building themes and plugins for WordPress:
  • Don’t edit core files (your changes will get wiped in the next release).
  • WordPress has filters, hooks and pluggable functions.
  • WordPress comes out of the box as a full working CMS.
  • Use action and filter hooks inside plugins and themes, using codex standards.
WordPress Framework Conclusion
From this, I conclude that WordPress is a framework. It provides us with a library of resources that allow us to extend and specialise it into the site and CMS that we want.

Published by


Open Source Architect (Web Geek)

17 thoughts on “WordPress is more than a CMS, it is a PHP Framework”

  1. Agree. Even more, WordPress is a PHP framework and incidentally a CMS and then a blog. The core is an impressive API collection, allowing developers to make powerful solutions.

  2. thank you! i was having this discussion w/ someone recently && they just didn’t seem to get it // glad i’m not the only one who’s thinking this (:

  3. Great post, must agree. I’ve built plenty of web applications on WordPress, such as booking systems, inventory management etc. The WordPress DB class is very like Codeigniter’s active record and super useful.

  4. This is stretching the definition of a framework quite a bit. WordPress is a platform with defined extension points, not a framework. Also:

    “The framework code itself is not meant to be edited or changed.”

    It sounds like you’re implying that a library’s code is meant to be edited, which is definitely not true. Maybe I’m just confused as to why you made this point when comparing libraries and frameworks.

    “Frameworks have a default behaviour.”
    “The framework dictates how it’s set of resources is used.”

    What you’re describing with these two items is the concept of convention over configuration. While many frameworks take this approach, this is not a requirement in order for something to be defined as a framework.

  5. I agree, and we have been using wordpress as a defacto framework for a while now. It’s great because it comes with an easy to use CMS and tonnes of plugins. But I also think WordPress has a ways to go before it is a full framework. For example, it’s missing things such as a way to relate posts in core.

  6. WordPress is a great blog engine, if we start to consider it as a framework it will probably be the worst one of known frameworks. It’s so bad written in many aspects of software engineering that it couldn’t be compared to real PHP frameworks like Symfony, Zend, Cake, CodeIgniter and many more. Let’s better consider WordPress as a very good blog engine that can be extended in many various ways. It is easy extensible by people with minimal programming knowledge – and this is its main advantage. Although it shouldn’t be uses as a base for professional web applications, any of (real) PHP frameworks would be better in this case.

    1. I agree with you Darraski. The author defined a framework in a way that is totally incomplete. I only use WP when my clients specifically requested it and very rare.

      WP is optimal for blog where you should not expect a lot of business logic, data processing before outputting result on a template file. I do see some plugins are trying to put the MVC programming pattern into it but why ??? Other frameworks have it as the core. If you are selling plugins to WP end users, that’s fine. But if you are building websites that you gonna reuse some big chunk of code then don’t ever never choose WP.

      Sorry WP fans that WP code is the ugliest code i ever seen in such an open source that many people claim that it’s maintainable and extendable. Those must come from WP team.

  7. Have some respect to real frameworks out there and please, don’t call WordPress “framework”. Even calling WordPress a “CMS”, knowing solutions like Drupal, sounds like a huge joke.

  8. >>WordPress comes out of the box as a full working CMS.

    No, it’s not. WordPress is a blog, and a very, poorly made blog. I am still surprised how huge it’s userbase is – it’s poorly designed. Yes it does have a stable codebase, and yes it has a huge amount of plugins, however, it’s a terrible peice of software and it’s only used due to lack of alternatives and the fact it’s badly designed structure is easily hacked by beginners.

    It is certainly not a framework or CMS (although it is often used as a CMS via the shoehorn).

    I could not disagree more i’m afraid πŸ™‚

  9. Firstly, I’m interested to ask why people are labelling WP a terrible piece of software? Sure, there may be “prettier” ways of writing the same code, some of the code could be made more secure and the core code could generally be improved. But WP is a piece of software that has made blogging or hosting a website very accessible, to a whole bunch of people that it previously wasn’t. Its opened up avenues and routes for people to get involved on the web.

    Is that so terrible? I think its a brilliant product, albeit if the code falls in the “could be better” category – its certainly not… terrible. Its not the most insecure bit of software, its certainly not got a terrible UI. Of course improvements could be made – show me something thats perfect! Its not all about the code.


    To answer the topic of this blog post, I’m afraid I ultimately don’t think its a PHP Framework. Depending on the context you’re using it, yes it does share some characteristics of a framework. I stress, depending on the context. For the man who is creating a premium content network (tuts plus for example), it acts as a solid base, it manages content (CMS), but it also has a whole load of extensible options to build upon and utilise (Framework). This man may consider it a “framework” for his project. For the man who is creating a stock control system, WP is clearly not the right tool, nor is it a framework – at this point you could consider Codeignitor, Zend or CakePHP as a true PHP Framework.

    It’s all about using the right tool for the job – quite simple really. One man’s rubbish is another man’s gold.

  10. If you come from a software engineering background like myself, looking through the wordpress codebase makes you feel rather uncomfortable. It’s outdated, procedural and monolithic. Any changes you make feel like a hack.

    Does it work? Yes. Is it useful? Yes. Is it a nicely written piece of software? Not in my opinion.

    As a blog platform it’s not too bad, i’ve used it myself. It allows you to get a blog up and running in a few minutes very easily. If you try and use it as a fully blown ‘CMS’ things begin to get messy. Out comes the shoe-horn trying to force things where they don’t want to go adding hacks here and there.

    Because of it’s architecture, making any big changes, or adding features becomes a series of forced hacks.

    How do you unit test your nice monolithic functions files and themes? Good luck with that, hacks needed.
    What if you need to implement a NoSQL backend? very good luck with that one.

    Obviously it’s been around a long time, well before the newer, nicer OOP related functionality we have in the latest versions of PHP, which is fair enough πŸ™‚

  11. WordPress sits well in the spectrum of CMS and even more than that as it is said that it is a PHP framework. I think WordPress suits well like Magento because as it accepts payments and the products. Wish one day it will be like CodeIgniter and Yii framework which will ease our work.

Comments are closed.