• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Actual Wizard

Actual Wizard

Great Content From Actual Wizards

  • Blogging
  • Programming
  • Social Media
  • Marketing
You are here: Home / Programming

How to Remove the WordPress Gutenberg Stylesheet

December 6, 2018 by Kevin Marszalek

If you have just installed any version of WordPress 5.0 or higher and don’t plan to use the Gutenberg editor, then you may want to remove the Gutenberg style sheet as a minor performance tweak.

Since Gutenberg is part of the WordPress core and has many bugs, some people choose to continue to use the Classic Editor instead.

The problem is that the WordPress developers have registered an extra CSS file in script-loader.php file whether you use Gutenberg or not.

Fortunately, fixing this isn’t too terribly difficult.

You will have to place this code inside of your functions.php which is typically located in your theme’s folder.

//kill Gutenberg stylesheet
function wp_dequeue_gutenberg_styles() {
     wp_dequeue_style( 'wp-block-library' );
     wp_dequeue_style( 'wp-block-library-theme' );
}
add_action( '_print_styles', '_dequeue_gutenberg_styles', 100 );

The typical path is public_html/wp-content/themes/the_name_of_your_theme/functions.php

Code to Remove the Gutenberg Stylesheet
This is what the final code should like in a code editor:

You may optionally put this code into a simple WordPress plugin if you are unable to edit your theme’s functions.php file.

If you’re not a programmer and you’re scared to add this code and are wondering “is this really necessary?”

If you are trying to optimize the speed of your pages, removing it will save a little bit of bandwidth, but it’s not critical.

If you’re not sure what it is and are not sure that you don’t need it, then I suggest that you leave it alone.

Filed Under: Programming

Read More From Actual Wizard

  • Understanding the Different Parts of an Email Address
    An email address has four parts; the recipient name, the @ symbol, the domain name, and the top-level domain. …
  • How to Get the Last Element of an Array in JavaScript
    There are a number of different ways to get the last element of an array in JavaScript. Below we will explore …
  • How to use document.write() in JavaScript
    How to use document.write() in JavaScript The document.write() function is commonly used when testing simple …
  • How to Open a New Tab with JavaScript
    Opening a new browser window in a new tab can be done easily in JavaScript. Modern web browsers provide a …

Primary Sidebar

More posts from this section

  • How to Get the Last Element of an Array in JavaScript
  • How to use document.write() in JavaScript
  • How to Open a New Tab with JavaScript
  • PX to EM Converter – Online CSS Font Size Tool
  • How to Hide the URL Address in the Browser Status Bar
  • Heart Symbol HTML Code with Examples
  • HTML Trademark Symbol Code Example
  • Prevent a Phone Number from Wrapping to a New Line in CSS HTML
  • Html Tutorial Hello World Example with Code
  • Force a File to Download Instead of Opening it in a Browser with HTML

Copyright © 2025 ActualWizard.com

  • About
  • Terms of Service
  • Privacy Policy
  • Cookie Policy