Lightweight content management with Barebones

Barely There


Everybody knows about WordPress, Drupal, Joomla, and other heavyweight content management systems (CMSes). But if you want a lightweight alternative, Barebones CMS has a minimalist infrastructure that provides the basics and gets out of the way.

By Joe "Zonker" Brockmeier

What's Barebones CMS, and how does it differ from the others? If you look at the most popular open source CMS available today, WordPress, you get a ton of functionality out of the box. It provides a framework and editor for pages and posts, a comment system, a plugin system, user management, categories, tags, and a bunch more. It's designed for setting up a weblog in record time, and it's great for that.

But what if you don't want a blog? What if you're trying to set up a simple site? WordPress, and the rest, are overkill. The most popular CMSes on the market are designed for specific use cases, and if you don't fit those use cases, then it can be a fair amount of work to bend them to the task at hand. They're also resource-intensive, comparatively speaking. WordPress requires a MySQL back end, and its performance can leave something to be desired.

Barebones, on the other hand, requires no MySQL back end (although it may be employed for some widgets) and is quite speedy. It also makes no assumptions about the kind of site for which it will be created and used. Barebones 1.0 includes just enough functionality for you to build your own site without having to whip up a content management or user management system from scratch.

The licensing scheme is very liberal: It's available under the MIT and the GNU LGPL, so you get to choose which license you want to use.

Getting Bare

Barebones is provided as a ZIP file to be uploaded to your web hosting provider [1]. At minimum, you should have PHP 5.x or later, and MySQL 5.x or later if you plan to use a database. For my project, I did without. I have to admit it was a bit refreshing not to need a database for a website.

You'll need to upload the ZIP file to the site on which you'll be running the CMS and unzip it. So, if your site lives in public_html, for example, you'll want to unzip it under that directory. Next, go to your install.php site URL, which should look something like http://mysite.com/install.php.

Clicking Next shows the Barebones system requirements (Figure 1), and clicking Next again provides a checklist of features necessary to run the software. If you see red, you want to address the requirements before moving on. One requirement that can be skipped is the SSL, but it might be a good idea to have at least a self-signed certificate so you don't send your site username and password in the clear.

Figure 1: The Barebones system requirements screen.

After the system check is satisfied, you'll set up an account with the user's group, username, password, and the length of time a user is allowed to stay logged in. When you log in (Figure 2), Barebones recommends putting the login.php file under a different directory that's hard to guess. This is a pretty good idea, because it's harder for an attacker to worm through if they can't figure out what the login page is, even if they've managed to glean your username and password somehow.

Figure 2: Barebones warning about security.

After you've logged in, you get a big fluffy white screen with nothing. Well, not quite "nothing," if you look closely you'll see the Edit link in the upper right-hand corner. Depending on whether you log in as an author or a developer, you'll see a slightly different screen once you get in. With author permissions, you'll only see enough to edit and deploy content. With developer permissions, you can add widgets and do quite a bit more.

Using Barebones

Navigation is simple. On the left-hand side are the available administrative functions, and on the right-hand side is the page information for whatever you're working on. To start creating content, click Add Widget under Root | Page Options. You'll have the option of creating Code, Content, or Layout widgets. If you start with a Content widget, you can immediately begin laying down content for your front page.

If you want to add functionality to your site, you'll want to use a Code widget. If you're just wanting to add content, the Content or Layout widgets are your friends. The Layout widgets include pre-made two- and three-column layouts. Note that they aren't fancy - they just provide the basic wireframe for the site. You need to supply your own CSS to make them pretty. Remember, bare bones, right?

When you choose a Content widget, you'll be given the Options page. Here, you can configure the security of the page (if you're logged in as a developer) or edit the page. If you're only logged in with author permissions, you won't see the security option. When you click Edit, you'll be shown the WYMeditor page and be able to start writing content (Figure 3). Because security is a major concern for Barebones CMS, if there's a tradeoff to be made between security and usability, you can be sure Barebones is going to err on the side of security.

Figure 3: Editing the index page.

Compared with other systems, Barebones is pretty sparse - it's not even possible to insert an image if you're logged in as an author because the default security settings require you to enable the "shortcode" to add and preview images. To do this, log in as a developer and go to Edit properties then Configure Security (Figure 4). Here, you edit the permissions for images and whether local and remote images can be displayed.

Figure 4: Configuring permissions.

Before leaving a page, make sure you save it or your changes will be lost. Barebones also has a revision and branching system you can use to work on site revisions without losing information.

The best way to learn Barebones CMS is to jump in and start using it. Overall, I found the lack of handholding an interesting way to build a site. Because I've used WordPress since about 2004, it's been a long time since I've worked with a package that didn't make a lot of assumptions about the type of site I was building. It turns out that WordPress makes correct assumptions for my site most of the time, but whether that's because I've adapted to WordPress or it's adapted to me I can't say.

The project has pretty good documentation, although, at the moment, it doesn't offer a live forum, and I couldn't find mailing lists. The forums exist but aren't functional. With any luck, that will change by the time this article is published. For documentation, see the "First Time User's Guide" [2] and take it for a spin.

Is Barebones CMS for Me?

Barebones is an interesting toolkit for creating a site, but it's definitely not for everybody. I spent the better part of a week working with it and found that it would be interesting for some applications but probably would not be the first CMS I'd reach for when developing a website.

The software is developer friendly. Barebones provides enough framework that it's better than trying to develop a site entirely from scratch, and it's a great package if you want to learn more about web development, Barebones would be a great tool for anyone teaching classes on web design. If you want very much in the way of pre-made functionality, though, Barebones is not for you. However, if you want a framework that gets out of your way, then Barebones should be the first on your list.  

INFO
[1] Barbones CMS: http://barebonescms.com/download/
[2] User's Guide: http://barebonescms.com/documentation/first_time_users/
THE AUTHOR

Joe "Zonker" Brockmeier is a freelance technology journalist, editor, community builder, and Software Freedom advocate. Brockmeier, the openSUSE Community Manager from 2008 to early 2010, now writes for Linux Pro Magazine and other open source and technology publications. His personal site can be found at http://www.dissociatedpress.net/, and you can follow him on Twitter and Identi.ca as @jzb.