0 %

[How To] Remove Block Library CSS from WordPress

[How To] Remove Block Library CSS from WordPress

Gutenberg editor, that is the default editor for latest WordPress installations, uses special CSS libraries to manage blocks on your site’s frontend. If you are using this new WP editor, it will automatically add this library CSS code on your site;

<link rel='stylesheet' id='wp-block-library-css'  href='https://nextseasontv.com/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' />

But, if you are not using Gutenberg blocks in any way, you can use the following snippet to remove this extra stylesheet from your theme;

function wpassist_remove_block_library_css(){
    wp_dequeue_style( 'wp-block-library' );
} 
add_action( 'wp_enqueue_scripts', 'wpassist_remove_block_library_css' );

I know this is only one less request on your server, but if you are aiming for 5000 users a day, it is 150k fewer requests a month ?

If you love building up with WordPress, you will love our plugins, too. Check them out here!

Việt Lâm Coder

Việt Lâm Coder

Senior Fullstack & System Architect

Cần hỗ trợ website? Gọi / Zalo 0944.71.4545.

Trao đổi về dự án của bạn!

VietLamCoder CMS — Nền Tảng Quản Trị Flat-File Siêu Tốc LamWeb.com.vn — Hệ Sinh Thái Thiết Kế Web & Kho Giao Diện 2026