# Inline Small Block Stylesheets Instead of Loading Files

> Lets WordPress print more of the small per-block stylesheets directly in the page instead of as separate files, which saves several network requests on pages with many different blocks.

- Type: PHP
- Runs: Frontend only
- Category: [Performance](https://wpide.com/library/category/performance/)
- Tags: css, blocks, requests
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/perf-inline-small-block-styles/

## Code

```php
// Total bytes of block CSS WordPress may inline per page (the default is 20000).
$wpide_inline_budget = 40000;

add_filter( 'styles_inline_size_limit', function () use ( $wpide_inline_budget ) {
    return (int) $wpide_inline_budget;
} );
```

## Notes

Works together with loading block styles separately; raise or lower the byte budget to balance page size against request count.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Inline Small Block Stylesheets Instead of Loading Files" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
