Many projects or products nowadays require you to manage data, day-to-day.
With many “off-the-shelf products” helping you do this.
What happens if you need to build a custom CMS for your project? Tailoring the solution to work exactly as you would like. There are many things that you could or should consider.
Cost, skill availability, use an existing framework? Develop it from scratch? Which underlying Operating System to use?
The list goes on.
I had a similar task when building a custom CMS a few years ago.
For our project, I used the Codeigniter framework.
This blog runs through why I chose Codeigniter and how I found developing the custom solution.
Building a Custom CMS
A few friends and I decided to start our own business.
To build a mobile app for travelling football fans.
Our main requirement was to collate and record information into a central database which the mobile apps could pull data from. We decided to build a CMS which any of us could log in to and manage the data.
As we were funding the business ourselves we had to keep costs to a minimum.
With my experience working in the web hosting industry, I suggested we go with a Cloud VM which can be cheap. Also reliable and easy to scale up if needed.
I opted for a Linux VM running Ubuntu to reduce costs further. Linux requires very little hardware to run smoothly.
Even though I was predominately a programmer who used Microsoft technologies.
I kept away from using Windows as you have to pay a license fee each month and need more hardware resources to run Windows. Increasing the monthly costs twofold.
Picking The Framework
Deciding to use a Linux VM had already swayed me to which programming language to build the CMS in.
I had chosen to use PHP.
Luckily at the time I had done a fair bit of programming using PHP in my day job. I had also decided that this time I wouldn’t build something from scratch and use a framework to speed up development time.
I had been looking at a few frameworks and had narrowed it down to two.
At the time Zend Framework and Codeigntier were the two main players in MVC frameworks, built using PHP.
After spending a day or two playing around with each framework, I decided to ditch the idea of using Zend. Even though it was the more popular and powerful of the two, I just found it to overcomplicate things.
I wanted to get the CMS out the door ASAP.
The framework needed to be simple to use. Allowing me to get each section of the CMS live in the quickest time possible.
Working With The Codeigniter Framework

Straight away I found the Codeigniter framework easy to use and really quick to set up.
At its basic level, you download a zip file, extract the contents and upload it to your server.
It is a case of then editing two files to set up your website and database connection. That’s it.
Result!
Even increasing the security of your website is relatively straightforward with Codeigniter. The more experience I get in software development the more conscious I am of implementing security first and foremost.
Sadly, I’ve had too much experience in trying to lock down systems that are already live.
This gives me achy balls.
Security around the implementation of your solution should be done first and foremost. Sounds boring, but trust me it will save you time, money and a lot of pain in the long run.
As Codeigniter is built using the Model-View-Controller architectural pattern.
I have a bit of experience using the MVC pattern from my ASP.Net background (I won’t bore you by going into the MVC pattern).
Within an hour I had a few pages knocked together displaying some basic information I had entered into our new database.
Simple As 1,2,3 (Files)
To start the ball rolling. I began by creating a “dashboard” screen which would be the CMS’ homepage.
It was as easy as creating 3 files. One file called dashboard.php in the controllers’ folder which acts as the “brain” when a user browses to that page.
A file called league_model.php in the models’ folder which retrieves and stores data from the database.
Finally, a file called dashboard_index.php is in the views folder. This file contained the HTML to render the page and display the information about each league.
That’s it job done! Well not as an MVP, as a proof of concept it worked.
Building a Custom CMS for our little business was possible.
We would soon have a central point where we could start developing our products.
Another thing I liked about Codeigniter is the built-in libraries that it comes packaged with. From form validation up to security and session management.
You can import the library using one line of code, so you only load what you need on each page of your website.
Another benefit is it allows you to again just focus on what you are trying to achieve in managing your data.
Design and UX
Now as a programmer, I’m not blessed with the best UX skills.
Even though I was pretty good at Art & Design at both school and college.
I always try to improve the look and usability of the software I develop.
It can be a challenge and I find it difficult to get the design out of my head and implemented. Because of this, I decided to the Bootstrap library as my design toolkit to style the CMS.
Using Bootstrap not only gives a consistent theme to a website. It has been designed to be “mobile first”. Which means we could use our CMS on any device.
It was fairly quick and easy to drop the Bootstrap library into the CMS.
To make things easier I created a template within the Codeigniter framework. Which would ensure any page within the CMS would load all the required styles or libraries in the page header.
You then tell the template which view you want to display and this would get rendered in the main body of a page.
To keep things simple and in keeping with the Codeigniter framework. I developed the template so I could pass in a list of which Javascript files I wanted to load for a particular page.
Making sure each page only loaded what it needed (similar to the way Codeigniter allows developers to import libraries as and when required)
Challenges
Most of the setup and development while building a custom CMS was straight forward and I was able to achieve what I wanted from each page.
As mentioned in the previous section.
I built a custom way to load a Javascript file into each page.
Codeigniter does have an in-built Javascript library which allows common jQuery functionality to be available. I struggled to get this to work.
Whether it was my lack of experience in using jQuery. Or a limited knowledge of Codeigniter. It could be I read the documentation wrong (Even though I went through it several times over a week). No matter what I tried, I could not get the library to load.
When I originally started building a custom CMS I was using an older version of Codeigniter.
So it could have been isolated to the version I was using. Either way, it led me to code a template to load specific Javascript files that used jQuery and Bootstrap Javascript to achieve what I needed.
The only other small issues I had were resolved quickly by using Codeigniter’s documentation.
It is very comprehensive and with a bit of reading you should be able to work out how to use the framework to meet your needs.
MVP Or ITB (In The Bin)?
As of February 2018 when writing this blog the CMS is still up and running.
We started using it in October 2014. It has been over 3 years since the initial version was put live and it is still going strong. There have been some additional development and improvements over the years (As with all IT projects).
I will be writing a few more blogs documenting what improvements we made. Utilising Codeigniter to quickly achieve what our business required.
I have a few more plans for our CMS. Firstly to upgrade the version we are using. Along with integrating third-party APIs to help us collate the information into one single dashboard.
Conclusion: Building a Custom CMS
I would recommend Codeigniter to anyone who is on a tight budget but needs a framework to build out their solution.
I have helped a few people out with their websites over the past 18 months which have been built using Codeigniter and that hasn’t dampened my view.
There are a few new kids on the blog in terms of PHP-based MVP frameworks such as Laravel.
Which if you are starting from scratch may be worth looking into. That said I still think that Codeigniter is the quickest to get up and running and the easiest for programmers to get to grips with.
If you would like to know more about the projects that I have used Codeigniter on. Or have any questions please get in touch. Cheers





