Whats does it *really* mean to develop with WordPress?
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.
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.
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.
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
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.
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.
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.
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.
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”.
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.
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.
So yeah, we need to work together to bring WordPress development into the 21st century and make it better for all of us. So when you aren’t “working” on WordPress you should be helping others, writing about WordPress, reading about WordPress, etc.
Tim Myers — What it means to be a WordPress Developer
Featured and section 2 image source: https://webtegrity.com/our-blog/web-design-tips/12-free-wordpress-wallpaper-screensavers