The New WordPress

Today, WordPress is a jam-packed CMS filled to the brim with features and functionality. Not only that, but it includes an archaic layout system (theming) that requires anyone who wants to work with it to know both PHP and the intricacies of the functions laid out in the WordPress Codex. Our templates become messy (🍝 code) as we mix PHP calls and logic with our HTML and JavaScript. Almost all interactive elements are built using jQuery, which, while a great library in many respects, is weak in comparison to many of the emerging front end frameworks we have today — ReactJS, AngularJS and others. And as we look to the end of this year and into next, every version of WordPress brings more and more functionality into the core, much of which may never get used by the majority. However, it doesn’t have to be this way.

Imagine a world where WordPress is lean, fast, and efficient. In this world, WordPress has just one task: to manage your content. Out of the box, WordPress should contain the bare minimum functionality to get up and running:

An easy-to-use management interface

Basic data structure for posts and pages

Authentication and user management

A RESTful API for interfacing with your data

A simple extension architecture

Basic site configuration — e.g. site title, localisation

Luckily, we have most of this already:

The WordPress admin interface is it one its best features, and provides a clean and elegant way of viewing and managing data

We also get our basic data structure, and authentication / user management — great news!

The work being done by the WP-API team on the REST API is great, and version 2.0 should be out of beta soon. The good news is we can start using this right now (either version 1.x or 2.x), regardless of if and when it makes it into core.

WordPress’ plugin architecture is reasonably good — however, the dependency on PHP can turn many developers away from using it. Here, we need to investigate the potential of JSON configurations and third-party integrations as a route to offering more people a way of working within the WordPress ecosystem.

It’s worth noting at this point that having a RESTful API eliminates the need for many things plugins are currently relied upon for — although — not everything.

What! No theming?

You might have spotted that I haven’t included any theming functionality in the above list, and with good reason. After building a number of websites and apps using WordPress and the REST API, I’ve come to the conclusion that WordPress isn’t the best tool for handling layout and presentation. Not only is it restrictive in terms of functionality, but it also limits the people who can work on it, as only PHP developers are able to decipher even the most well-structured WordPress theme. Other developers are often left out in the cold.

Yet again, the RESTful API comes to our rescue. Thanks to its simple JSON output, we’re able to use JavaScript to its full potential, using ReactJS or AngularJS to craft beautiful and fast front end experiences, taking advantage of many of the new HTML5 browser APIs that have become available over the past few years, including localStorage and more recently, service workers. Even better, we don’t have to use jQuery.

The other major component missing from this list is menus. In many cases, menus can be unnecessary depending on the nature of the app you’re creating. This functionality should be included as an optional plugin that can be activated to provide it.