Whats does it *really* mean to develop with WordPress?

Image for post
Image for post

The last time I told someone I am a WordPress developer, they replied: “So you’re in charge of managing the content”? This kind of reaction is quite common and illustrates what people who don’t use WordPress (and even some people who use it) think: WordPress is just an interface where you choose a theme, post articles and have a brand new site in a short time.

Image for post
Image for post

When one admits this idea, it is normal to come to the conclusion that a WordPress developer spends his whole life on the CMS admin panel managing content or even that the expression “WordPress Developer” has no reason to exist!

While commuting to home yesterday, I wondered if these people who are skeptical or even hostile towards WordPress would change their minds if they realized that developing with WordPress is not so different from developing with popular and highly acclaimed frameworks or libraries like Laravel, Django or React (my favorite of the moment). So I suggest you to discover my daily life as WordPress theme developer, one of the many facets of a WordPress developer (I will talk briefly about the others at the end of the article).

WordPress development workflow

Workflow is probably one of the most important aspects of any developer’s work. It defines our productivity, our efficiency and also the speed at which we work. It’s the same with WordPress.

Development environment

WordPress, it is a lot of PHP (63%) and since a few years, JavaScript (23%). So I use a local development environment, Laragon, to run my WordPress installations. It embeds the Apache HTTP server with a MySQL database + phpMyAdmin. The Laragon terminal has a native integration with git, which simplifies deployment on GitHub or GitLab. Next to that, I use Sublime Text 3 as editor with a few WordPress macros and snippets.

WP-CLI

Angular has Angular CLI, Laravel has Artisan and WordPress has WP-CLI. The WordPress command line is one of the least known components of the CMS. That’s normal, since it’s not the first thing you usually learn when you start with WordPress. Nevertheless, it is very powerful, intuitive and allows you to automate the management of a WordPress installation. It is compatible since 3.7 version of WordPress. We will see a use case later on.

Ngrok

Who has ever wanted to share the link of a platform being developed locally with third parties. Ngrok is the ideal tool for this and integrates perfectly with Laragon.

The default structure of a WordPress installation is regularly criticized. You can therefore choose a boilerplate that integrates the latest development recommendations such as management of environment variables, management of development, production or staging environments, management of core files, etc… I recently discovered Bedrock, that works with Composer and which I promised myself I’ll test very soon.

Building a web platform using WordPress

Image for post
Image for post

Now, what really happens when I want to build a website with WordPress?

Creating and setting up a WP installation

As I said earlier, the WordPress command line (WP-CLI) allows to do absolutely incredible things, from creating and configuring an installation, creating page or post to adjusting certain parameters such as permalink structure. So I usually start by downloading the latest version of WordPress from the terminal, then I do some basic configs for the database. I configure the database and install the downloaded WordPress instance.

Image for post
Image for post

Note that I define here the url of my site in the format site.test. This is a Laragon feature to create custom urls for installations.

At this point, when I enter the address thehat.test in my browser, I get the site that I just created and that works the Twenty Nineteen theme, which is the default theme since version 5.0 of WordPress.

Image for post
Image for post

By default, WP creates articles, pages and example comments. The structure of native links is not so pretty. So I fix these details with a few commands.

Image for post
Image for post

I now have a clean and ready-to-use WordPress installation and the process only took me less than 5 minutes.

Creating a new WP template

The next step will be to create a new theme for the site. WordPress themes are used to manage the display of the site, like views with Laravel. Again, I rely on my command line.

Image for post
Image for post
And that’s it, everything fits in one line.
Image for post
Image for post
Image for post
Image for post

Note that at no time since the beginning I have accessed the WP dashboard or any other GUI. This is one of the main criticisms made against WordPress, which is supposed to be made only of GUI and without any “development spirit”.

The extras

Theme development is only a small part of what a WordPress developer makes. Plugin development, contribution, maintenance of components are many other interesting things that dot the world of the WP dev.

The downside of the coin

Developing exclusively with and for WordPress has some handicaps. In the long term, we move away from other technologies and start confining ourselves into the WP bubble. We are also getting used to the coding standards of WordPress, which could make the appropriation of other frameworks working on other principles less obvious.

I have, for that reason, recently started learning React, which makes me see things in a different way than the default templating system of WordPress. This is all the more interesting as it will be the flagship library of the CMS in the coming years and although WordPress was about to abandon this project.

Well, myth of reality?

What makes WordPress the most popular CMS today is certainly its community. This is, with all its implications, the main difference I find between WordPress and most of the other technologies I mentioned above.

A large and active community allows CMS users to have more choice. They can therefore build their platforms with or without the WordPress GUI dashboard. They can decide to create their own templates or use existing ones precisely because of this multiplicity of choices. They can choose to download third-party plugins to extend the functionality of their sites or create new ones.

Even better, with WordPress features such as custom post-types, metadata management, Rest API or WP-Cron, it is possible to build high-performance and complex systems by coupling WordPress with the best of what currently exists in web development. For example, I could use React to build a traffic management SPA for a railway company, and use the Rest API associated with the power of the WP-Cron to handle the logic.

Calypso, WordPress.com’ new codebase, is a good example of what WordPress can bring to a complex web platform. It uses a Node.js server with a SPA client runing on React.

Image for post
Image for post

The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving JSON (JavaScript Object Notation) objects. JSON is an open standard data format that is lightweight and human-readable, and looks like Objects do in JavaScript; hence the name. — REST API Handbook

But this plethora of choices should not arouse contempt for WordPress. It’s probably a double-edged knife, but that doesn’t make it any better.

Featured and section 2 image source: https://webtegrity.com/our-blog/web-design-tips/12-free-wordpress-wallpaper-screensavers

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store