How to Check CodeIgniter Current Application Version

Last Updated on by in CodeIgniter

Hello, this tutorial answers a fundamental question. How to find out the Codeigniter application’s version, on which we are working on.

Well, this seems extremely easy for those who have years of experience in Codeigniter web development. But, what about those who are just getting started Codeigniter.

Ideally, we are going to answer for newbie developers. I do remember when i first started development with CI. Then i got stuck at the beginning for checking the version of Codeigniter.

But my relentless efforts gave me the answer, and yes, google search also played a vital role in it. But the whole process took time, and i am here to save your time that i put on in finding the exact version of Codeigniter application.

So, let’s understand the gravitas of this tiny topic and start following how to find the CodeIgniter version.

Check Codeigniter Version Example

Basically, there are two ways through which you can reach to your destination.

Codeigniter is a robust and noted framework that creates coherence with developers. The compendium of files is very well documented, and it stores its version in global const `CI_VERSION` in the following app/vendor/codeigniter/framework/system/Codeigniter.php file.

You can open this file and search for “The current version of CodeIgniter Framework” line of text within the Codeigniter class. Below you will see the version of codeigniter somewhere between the line number 63.

class CodeIgniter
	 * The current version of CodeIgniter Framework
	const CI_VERSION = '4.0.4';

The Relentless Way

This method is pretty simple and straightforward; developer’s love this way. Just open your view template and define the below code it will print out the Codeigniter version in one go.

   echo \CodeIgniter\CodeIgniter::CI_VERSION;

We are creating this tutorial considering Codeigniter 4, if you want to check the find out the app version in Codeigniter 3 then use the below line of code.

    echo CI_VERSION;

So, these were the methods through which you can display and check the CodeIgniter app version that you are working on.

Digamber - Author

Hi, I'm Digamber Singh, a New Delhi-based full-stack developer, tech author, and open-source contributor with 10+ years' experience in HTML, CSS, JavaScript, PHP, and WordPress.