October CMS resources and help articles

Simple and to the point. Optimized by the community.

How to check the October CMS version

by spunky, last modified on May 7th, 2022

Sometimes you need to use different logic depending on the October CMS version. Here is a way for you to check the exact version.

A simple way to check if it is v2 or above:

if (class_exists('System'))  {
    // Running October CMS 2.0 or above
else {
    // Running October CMS 1.0

For more precise checking, this will check if it is v2.2 or above:

if (class_exists('System') && version_compare(\System::VERSION, '2.2') !== -1) {
    // Running October CMS v2.2 or above



We use cookies to measure the performance of this website. Do you want to accept these cookies?