Remove Block-library/style.min.css from WordPress Frontend

Remove Block-library/style.min.css from WordPress Frontend

If you want to remove the block library CSS file from WordPress, Just follow the simple steps:

What is Gutenberg?

Gutenberg is a new and default editor in 5.0 but WordPress users have options to keep their favorite editor using the classic editor WordPress Plugin. Gutenberg is a part of the WordPress core and it looks quite interesting to enhance the editing level.

Adding or installing one or more special CSS files to manage blocks on the site’s frontend.

Gutenberg fixes the CSS file automatically (wp-block-library-CSS) that pop-up on the head section of your WordPress theme. Fortunately, It’s not too difficult to remove the file.

A quick way to remove the wp-block-library-CSS file:

Use the following Snippets to make your WordPress AMP friendly.

  • Log in to your WordPress Admin Panel.
  • On the Appearance option, Choose Theme Editor.
  • Next, On the Theme File at the right corner of the page Choose Theme Function(function.php).
  • Now, Place the following custom code at the end of the existing code.
function webapptiv_remove_block_library_css()
wp_dequeue_style( 'wp-block-library' ); }
add_action( 'wp_enqueue_scripts', 'webapptiv_remove_block_library_css' );
  • Next, click on the Update file.

By removing this CSS, Your WordPress Page speed gets increased.