RT Cunningham

RTCMS - The Evolution of My Homegrown CMS - An Intermediate Update

RTCMS I finally named my homegrown CMS. I’m calling it “RTCMS”. It’s a portmanteau of “RTC” (my initials) and “CMS”. I can call it anything, of course. It’s not something I intend to capitalize on.

I’ve spent a lot of time on RTCMS. Perhaps too much time. That’s okay, though, because I’m learning things as I go. In most cases, it’s whether I want to learn them or not.

RTCMS and the Impetus to Finish

To be blunt, I want to get away from WordPress. I’ve used it as my CMS since 2006 and I’ve endured all the changes the developers made, even if I had to disable some of those changes.

What pushed me over the edge, so to speak, was the introduction of a block editor. Gutenberg, they call it. As far as I’m concerned, it isn’t an improvement over the current editor based on TinyMCE. At least, not for my purposes.

WordPress uses a database for storage and a lot of SQL queries to make things work. It’s all overkill for a website like mine (and possibly yours). The PHP language is complex enough by itself.

RTCMS Data Storage

When I wrote about my homegrown CMS back in August, I mentioned a simple file format. Well, it wasn’t quite good enough. Basically, it couldn’t handle line breaks and certain special characters without a lot of string manipulation. After much gnashing of teeth, I settled on the JSON format. I just had to create a couple of helper functions:

function json_d($array) {
  $array = json_decode($array, true);
  return $array;
function json_e($array) {
  return $array;

I’m loading all the data every time a page loads. It may seem like a waste of time and memory but it really isn’t. It makes connecting “records” and “fields” a lot easier than otherwise. To put things in perspective, MySQL uses more memory while idling than all of my data files combined. When it starts processing data, it uses a lot more.

All post types are stored in one file. Post types are article, author, category and static. At least for now. With each record taking up one line, it’s easy to sort and filter the arrays.

The RTCMS Media Library

At the heart of any media library is the file manager. While I don’t really need a web text editor, I settled on using CKEditor 4. I can’t use CKFinder as the file manager. It’s a paid plugin ($10 a head). I can use it for me, but I can’t share a “demo” plugin. No, I decided on Roxy Fileman. Neither CKEditor nor Roxy Fileman are even close to perfect software products but they’ll have to do.

I don’t have the programming chops to invent my own. CKEditor helps me in that I don’t have to add HTML tags. Roxy Fileman makes adding and selecting images easier than doing it manually. I can do it manually but I prefer not to.

This part of the project took me the longest. I checked dozens of web text editors and dozens of file managers. The hurdles I had to jump were caused by incompatibilities and my general lack of JavaScript knowledge. I’m not completely happy with what I settled on but I don’t have the knowledge to do better. I’ll be 58 next month. I don’t want to learn too much more than I already know.

I’ve settled on using 150 pixel “thumbnails” for web page display. When necessary, those thumbnails will link to images no larger than 300 pixels wide. Very few people click through, regardless of device. I’m not going to waste my time catering to larger devices.

I’ll manipulate the images with Irfanview before uploading them with the file manager. Luckily, I know how to use CSS to align and position them and I don’t have to do it from within CKEditor.

Next Steps for RTCMS

I’m working on code optimizations and the theme, which is basically the theme I’m using now. I’ll be building a demo site on a subdomain (probably rtcms.rtcx.net), which will include documentation and download files. I’m not moving fast because I get interrupted multiple times a day. I need dedicated blocks of time where I won’t be interrupted.

In the end, RTCMS won’t be pretty but it’ll be functional. It’ll be simpler and easier to use than WordPress if all you want to do is write articles or blog your life away.

Image attribution: The original Nginx logo is in the public domain. The original PHP logo is by Colin Viebrock (Download Logos and Icons) [CC BY-SA 4.0 ], via Wikimedia Commons. The combined image is by RT Cunningham, with the same Creative Commons license.

Share: Facebook | Twitter

👤 RT Cunningham
📅 October 20, 2018
🗁 Web Development