Custom Gutenberg Blocks vs Page Builder Plugins: One Rebuild
What I saw replacing a page-builder-and-plugins WordPress site with custom React Gutenberg blocks, and when a page builder is still the more practical choice.
· 3 min read · Erik Kubica
Over my thirteen years building client sites, one of the harder jobs has been taking over an existing WordPress corporate website built with a visual page builder.
A typical case looks like this: you open wp-admin and find Elementor or Divi plus thirty-eight add-on plugins. One renders an animated heading, another a testimonial slider, a third pricing tables.
Each of those plugins enqueues its own stylesheet and JavaScript bundle on the frontend:
/wp-content/plugins/mega-slider-pro/assets/css/slick.min.css (180 KB)
/wp-content/plugins/ultimate-elements/assets/css/frontend.min.css (840 KB)
/wp-content/plugins/fancy-accordion/assets/js/accordion.min.js (210 KB)
On one such site, by the time the browser finished with the head tag it had downloaded about 5.2 MB of styling assets over sixty-four separate HTTP requests. First Contentful Paint took around 1,800 ms, and the mobile performance score was 24 out of 100.
Native React Blocks
When Gutenberg launched, many developers complained about React being pushed into a PHP CMS. I came to like it: it gives you a component-driven foundation inside WordPress, which can reduce the need for page builder add-ons.
Instead of installing a plugin to display a testimonial card, I build a custom block with @wordpress/block-editor:
import { registerBlockType } from '@wordpress/blocks';
import { RichText, useBlockProps } from '@wordpress/block-editor';
registerBlockType('netlime/hero-card', {
edit: ({ attributes, setAttributes }) => {
const blockProps = useBlockProps({ className: 'custom-hero-card' });
return (
<div {...blockProps}>
<RichText
tagName="h2"
value={attributes.headline}
onChange={(headline) => setAttributes({ headline })}
placeholder="Enter section headline..."
/>
</div>
);
},
save: ({ attributes }) => {
const blockProps = useBlockProps.save({ className: 'custom-hero-card' });
return (
<div {...blockProps}>
<RichText.Content tagName="h2" value={attributes.headline} />
</div>
);
},
});
The editor renders with standard React state updates. The saved HTML is serialized into post_content on save. On the frontend, that kind of block needs no extra SQL queries and no runtime JavaScript dependencies.
Keeping the Editing Experience Contained
Page builders give editors a lot of freedom, which is also how a layout ends up with odd colors, extreme paddings and a broken tablet grid.
With custom blocks I can limit the design choices while still letting content teams edit copy, images and layouts. Through block.json supports and theme.json, typography scales, color palettes and container widths stay tied to the brand design tokens:
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"name": "netlime/hero-card",
"title": "Hero Card",
"category": "design",
"supports": {
"color": {
"background": true,
"text": true
},
"spacing": {
"padding": true
}
}
}
Editors can change copy, swap images and compose layouts with less risk of breaking the CSS.
For a simple three-column card layout, a custom block was a lighter option than a full page builder on this project.
What Changed on That Project
I once rebuilt an enterprise marketing site by removing Elementor and replacing thirty-six plugins with twelve custom Gutenberg React blocks. On that site:
- Frontend CSS/JS weight: from 5.2 MB to about 42 KB total.
- Server time to first byte (TTFB): from about 1,800 ms to about 65 ms on standard PHP-FPM.
- Mobile performance score: from 24 to 98, without caching tricks.
- Annual maintenance cost: about €4,200 lower, mostly from dropping commercial plugin renewals.
Custom blocks take developer time to build and maintain, so they're not always the practical choice. If a client needs to build many different layouts themselves and has no developer budget, a page builder can be the better fit. For sites with a stable design and a small set of components, custom blocks worked well for me.