Menu

How to Render WordPress in Node.js Without Losing Your Plugins
📰

How to Render WordPress in Node.js Without Losing Your Plugins

DEV Community: node·Rickey Gu·3 days ago
#bqjlhZKz
#devtonodejs#devto#dev#wordpress#plugin
Reading 0:00
15s threshold

Most headless WordPress setups move the front end into Next.js and read content from the REST API or WPGraphQL. That works well for posts and pages. It works badly for plugins. A contact form, a lightbox or a cookie banner needs styles and scripts that WordPress prints into the page, and the API doesn't send them. So each plugin's front end has to be rebuilt in React, one by one.

I took a different route with Flx Modernize: WordPress keeps handling the request, and a Node.js renderer produces the HTML. This article explains how that works, what it keeps, and what it costs.

The problem, measured

I set up one WordPress page with two ordinary plugins: Contact Form 7 and Easy FancyBox, a jQuery lightbox.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.