Frontity and the Future of WordPress as a Dev Platform
Last week Automattic, the company behind WordPress, continued its recent run of acquisitions by snapping up a React framework company called Frontity. While the acquisition itself was primarily an “acquihire”, since Frontity’s technology is open source, it also revealed something about Automattic’s plans for WordPress going forward. It’s clear that Automattic now sees WordPress as not just a content platform, but a development platform too. What’s more, a development platform that embraces the “headless CMS” approach — which, as I’ll explain in this article, is a usage of WordPress that hasn’t always been advocated by Automattic.
To find out more about how WordPress might benefit from Frontity’s technology, I reached out to Frontity co-founder and CEO Pablo Postigo.
“WordPress is already the best content platform on the web. We want to help it become the best development platform on the web,” wrote Postigo and his co-founder Luis Herranz in their announcement post. These words echoed those of WordPress co-creator and Automattic CEO Matt Mullenweg, who wrote on his blog that the Frontity acquisition “will benefit our efforts as we continue to make the block and theme APIs a joy to use and WordPress the best development platform on the web.”
“In my opinion, WordPress has always been a web dev platform,” Postigo told me. “Thanks to the WordPress extensibility patterns, you can take advantage of third-party plugins or themes.”
That may be so, but it does seem that Frontity has upped the ante on how people develop for WordPress. Mullenweg himself acknowledged this last October when he name-checked Frontity in a debate with Netlify founder Matt Biilmann. “[…] there’s things like Frontity that allow you to build WordPress [with] serverless pre-rendering using React,” Mullenweg had said, as a counter to Biilmann claiming that developers are no longer interested in the WordPress ecosystem.
What Is Frontity?
What Postigo and Herranz have created is a React framework for WordPress, which launched in 2019. It allows developers to build a React app that uses WordPress as a so-called “headless CMS.” In other words, WordPress itself is just used to create and manage the content — it’s no longer a part of the design or publishing processes. Instead, Frontity accesses the content via the WordPress REST API, and then “generates the final HTML that is displayed in the browser using React.”
This can result in faster page loading times and offer more flexibility in terms of presentation, but it also complicates the publishing process. As explained on its architecture page, a Frontity project “will always require two servers”: the normal WordPress server running PHP for the content, and a Frontity server running on Node.js for the presentation and publishing.
Complicating things even further, there are two different “modes” (configurations) to set up a Frontity project: decoupled and embedded. In de-coupled mode, the primary domain points to the Node.js server hosting Frontity. In embedded mode, the primary domain points to the WordPress server. The decoupled mode has a simpler architecture:
As you can see, a key aspect of Frontity is that it only uses WordPress for the content — which has become known in the industry as a “headless CMS” approach, because it separates the frontend (presentation) from the backend (content). Headless has become more popular in recent years partly due to the rise of the Jamstack architecture, created and popularized by Netlify, which includes headless CMS in its stack.
Matt Mullenweg has been famously skeptical about both Jamstack and the headless CMS concept. Back in September 2017, he opined on Twitter that “I will take a long bet against anything branded ‘headless.’” But he seems to have come around to the benefits of headless CMS since then, at least judging by the Frontity acquisition. In his blog post about the Frontity news, Mullenweg wrote that “I believe there’s still a lot that we can learn from decoupled systems and we can incorporate those learnings into WordPress itself as we emphasize performance, flexibility, and ease of development.”
It’s worth noting here that WordPress VIP, a managed service for enterprises that is owned by Automattic, includes a headless option — although it cautions that “one of the inherent disadvantages of headless CMS is complexity.” Others in the WordPress industry have made similar moves towards headless. WP Engine, a competitor of WordPress VIP, announced its first headless WordPress service in March, called Atlas.
Although Automattic seems to have accepted the headless trend somewhat reluctantly, it’s less of a surprise that it is interested in integrating React more into the WordPress ecosystem. React has now overtaken jQuery as the most commonly used web framework, according to the latest Stack Overflow developer survey. So if WordPress has designs on being “the best development platform on the web,” it makes sense to target React developers.
Although, according to Postigo, this doesn’t necessarily mean that React will be brought into the WordPress interface.
“Currently, React is used in the Block Editor UI (in the admin side of WordPress). But this acquisition [of Frontity] doesn’t mean that we will bring React to the WordPress PHP or full site editing themes, nor that Frontity Framework or any substantial part of it will be merged into WordPress.”
Leaning into Headless and Other Web Dev Trends
WordPress sometimes unfairly gets criticized for its innovations. The Gutenberg interface has been controversial in the WordPress community, but despite its occasional quirks it is undeniably the right UI for the modular web world we now live in. Likewise, in the 2020 Stack Overflow developer survey, WordPress was singled out as “the most dreaded” platform (although it went mysteriously unmentioned in this year’s survey).