I removed Gutenberg CSS in WordPress. Was it worth it?

I’m Kayla. I build and fix WordPress sites for a living. And I get picky about bloat. One small thing kept bugging me: Gutenberg CSS loading on sites that don’t even use blocks. So I tried removing it. I did it on my own blog and on two client sites. Here’s how that went—good, messy, and real.

Curious readers can also check out my in-depth case study over on CSS Menu Tools: I removed Gutenberg CSS in WordPress—was it worth it?.

Why I even bothered

On a slow Monday, my gardening blog felt heavy. Nothing wild—just a tiny lag. I opened the waterfall chart and saw this file: wp-block-library.min.css. Around 45 KB. Sometimes more with extra stuff. My site uses the Classic Editor. No blocks. So why load that file? You know what? I wanted it gone.

What I did (three simple paths)

I tested three ways. All worked. Some had gotchas.

  • Code in functions.php (fast and free)
  • A lightweight speed plugin (Perfmatters)
  • A page-by-page tool (Asset CleanUp)

Let me explain.

Method 1: Code snippet that just works

This is what I use most. It’s clean. No plugin. I add it with the Code Snippets plugin or right in the theme’s functions.php.

function ks_remove_gutenberg_css() {
  if (is_admin()) return;

  // Core block styles
  wp_dequeue_style('wp-block-library');
  wp_dequeue_style('wp-block-library-theme');

  // Global styles and classic theme styles (newer WP)
  wp_dequeue_style('global-styles');         // WP 5.9+
  wp_dequeue_style('classic-theme-styles');  // WP 6.1+
}
add_action('wp_enqueue_scripts', 'ks_remove_gutenberg_css', 100);

That removes the CSS site-wide. It’s bold. It’s great if you don’t use blocks at all. If you want to dive deeper into the reasoning (and a few extra code variations), check out this excellent walkthrough that helped me the first time I tried it.

But what if you use blocks on some pages? Then do this instead:

function ks_maybe_remove_gutenberg_css() {
  if (is_admin()) return;

  // Only keep the CSS when a post actually has blocks
  if (is_singular()) {
    $post = get_post();
    if ($post && function_exists('has_blocks') && !has_blocks($post)) {
      wp_dequeue_style('wp-block-library');
      wp_dequeue_style('wp-block-library-theme');
      wp_dequeue_style('global-styles');
      wp_dequeue_style('classic-theme-styles');
    }
  } else {
    // Archives/search usually have no blocks in content
    wp_dequeue_style('wp-block-library');
    wp_dequeue_style('wp-block-library-theme');
    // Careful with these two if your theme uses theme.json
    // wp_dequeue_style('global-styles');
    // wp_dequeue_style('classic-theme-styles');
  }
}
add_action('wp_enqueue_scripts', 'ks_maybe_remove_gutenberg_css', 100);

Tiny note: if your theme uses theme.json, don’t yank global-styles unless you test. It can change colors, spacing, and fonts (the nuance is covered nicely in this Stack Overflow thread).

Method 2: Perfmatters (quick toggle)

On a client shop, I used Perfmatters. In Settings, there’s a Block Editor setting to remove Block CSS on the front end. One click. Done. It also has script manager control, which I like. Super handy when I’m tired and just want a clean result.

What I saw: same speed gain as code, no weird side effects. But remember, if any page uses blocks, styles can break.

Method 3: Asset CleanUp (surgical)

This one lets me unload wp-block-library per page or site-wide. I used it on a portfolio site that had one page with Buttons block. I kept Gutenberg CSS there and removed it elsewhere. It took a few extra minutes to set up, but it felt safe.

Real results from my own work

  • My gardening blog (Classic Editor, no blocks)

    • Before: 1.21 MB, 42 requests, LCP ~2.4s (Fast 3G in Lighthouse)
    • After removing Gutenberg CSS: 1.16 MB, 41 requests, LCP ~2.29s
    • Savings: ~50 KB, 1 request, ~110 ms faster LCP
    • Vibe: It felt snappier. Not magic. Just tidy.
  • Local bakery site (uses ACF layouts, no blocks)

    • Before: LCP ~2.1s
    • After: LCP ~1.95s
    • No visual changes. Owner texted “It feels lighter.” Same.
  • Photographer portfolio (mix of Classic + a few Button blocks)

    • I removed CSS site-wide first. Bad idea. The Button block lost spacing and hover styles.
    • Fix: I used Asset CleanUp. Kept the CSS on the gallery page only.
    • End result: no breakage, small speed boost across the rest of the site.

What broke (and how I fixed it)

  • Buttons block lost its rounded corners and spacing.

    • Fix: keep CSS on that page, or add a tiny custom CSS snippet.
  • Wide and full-width images got weird margins.

    • Fix: keep block CSS where needed, or add a few lines of custom CSS.
  • Themes with theme.json lost color presets and fonts.

    • Fix: don’t remove global-styles for those themes, or replace with your own CSS.

Honestly, the rule is simple: if you use blocks, you need their styles—or you need to rebuild those styles yourself.

How I test changes fast

  • Run Lighthouse before and after. I check LCP and total bytes.
  • Load the homepage and three inner pages. Look at buttons, lists, galleries.
  • Switch to a phone. I tap through menus and forms. Feels silly, but it helps.

You know what? Sometimes I even clear cache and walk away for five minutes. Fresh eyes spot things.

Tiny CSS you may want to add back

If you do remove things and want basic block looks, here are tiny helpers I’ve used:

.wp-block-image.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.wp-block-image.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.wp-block-button .wp-block-button__link { padding: .7em 1.2em; border-radius: 4px; display: inline-block; }

Before I whip up my own navigation styles, I sometimes grab a lean snippet from CSS Menu Tools, which keeps the payload small but still looks polished. If you ever wrestle with injecting custom styles in a no-code environment, my walkthrough on Website.com lays out exactly what sticks and what doesn’t: How I add CSS in the Website.com builder and what actually stuck.

This is not a full set. It’s just enough for simple pages.

Who should remove Gutenberg CSS?

  • You use Classic Editor or ACF layouts only.
  • Your theme is custom and doesn’t rely on theme.json.
  • You want a tiny bump in load time and one less file.

Who should leave it in place?

  • You use blocks often (Buttons, Columns, Group, etc.).
  • Your theme uses theme.json presets.
  • You don’t want to write or maintain custom CSS.

A quick detour: not all of my consulting happens in the corporate or e-commerce world. Some adult-content publishers run sprawling WordPress installs and face the same bloat issues—only amplified by HD imagery and video embeds. After a recent call, I pointed one such publisher to a public write-up that illustrates exactly how trimming block styles freed up bandwidth for more, well, exciting assets: Slut Wife case study which walks through the step-by-step removal process, shows side-by-side waterfall charts, and quantifies the speed gains that keep visitors engaged (and paying).

Along the same lines, I once optimized a WordPress install for a regional sugar-dating community; if you’re curious how niche dating brands position themselves online and what kind of content structure keeps users clicking, check out this Missouri-focused sugar baby guide — it breaks down the exact features, tone, and landing-page elements that convert casual visitors into registered members.

My take

Was it worth it? For sites without blocks—yes. It’s a small win that adds up with other small wins. For mixed sites, I go page-by-page or I keep it. Speed is great, but broken styles are not.

I like clean stacks. Fewer files. Fewer surprises. Removing Gutenberg CSS gives me that, when it makes sense. And when it doesn’t, I back off. Simple as that.

If you want a safe start, use the conditional code or Asset CleanUp. Test.