WordPress is officially a JavaScript Project

2023 July 29

I'm going to say something that could be controversial - WordPress is now a JavaScript project. I've written before about how I've been betrayed by the project that I've built my developer career on. These two posts, first a Mastodon post by Antonio Cambronero, then a blog post by Mika Ariela Epstein, have just reinforced those previous thoughs.

Antonio discussed how block patterns are changing in 6.3. It's not so much that they are changing things, but this line specifically in his post gave me pause:

...the reusable block has been removed...

Here's the thing --- my day job is still in the WordPress "dark ages." About 90% of the sites are still using the classic editor, and fortunately for me, we rely on PHP to introduce custom components. The sites that do take advantage of the block editor are using what could be considered oudated code. In fact, what has been preventing an upgrade to a more current release is the custom blocks that have been built are incompatible with those more curent releases. This, combined with Antonio's post convinced me that WordPress has embraced JavaScript with all of its faults.

I'm all about tech advancing and the improvements in recent years with the web being more reactive and responsive. However, in the JavaScript realm, the advancements consistently break what came before. You only need to look at how as a devloper, I need to make sure I'm using a specific node version -- even as far back as 8.0 (the current long term support version is 18) -- to ensure my dev environment won't crash and burn. I could probably find a multitude of posts and articles on how JavaScript and backwards compatibily are strangers.

Now, bring in Mika's post. She talks about how Gutenberg is moving at such a rapid pace that the breaking changes aren't properly documented, it turns into a quest via the browser console to track down what is broken. Not to mention how it's nigh-impossible to step debug through compiled JavaScript. I rely on step debugging in PHP, and feel lost when I do not have access to it.

Finally, before Gutenberg, the WordPress project prided itself on its backwards compatibility, almost to a fault, and that you can run WordPress on the oldest, crankiest versions of PHP. I strongly believe this is no longer the case. The constant evolution of Gutenberg, and the pace that it has been developed, has abandoned on of the strongest attributes of WordPress. This also is one of the reasons I am reluctant to try to learn any JavaScript framework, project, or library: as soon as I get the hang of it, the next changes will completely change what I just mastered.