[Skip to content](#main)

[→](/)

[![Avunu](/brand/avunu-logo.svg)![Avunu](/brand/avunu-logo-light.svg)](/)[Services](/services/)[Consulting](/services/consulting/)[ERP](/services/erp/)[Odoo](/services/erp/odoo/)[ERPNext](/services/erp/erpnext/)[Custom software](/services/custom-software/)[Devices & IoT](/services/devices-iot/)[Websites](/services/websites/)[Infrastructure](/services/infrastructure/)[Partners](/partners/)

[Work](/work/)[Open source](/open-source/)[Knowledge base](/kb/)[About](/about/)

[About Avunu](/about/)[Team](/about/team/)[Insights](/insights/)[Contact](/contact/)

[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

- [Services](/services/)[Consulting](/services/consulting/)
- [ERP](/services/erp/)
- [Odoo](/services/erp/odoo/)
- [ERPNext](/services/erp/erpnext/)
- [Custom software](/services/custom-software/)
- [Devices & IoT](/services/devices-iot/)
- [Websites](/services/websites/)
- [Infrastructure](/services/infrastructure/)
- [Partners](/partners/)

[Work](/work/)[Open source](/open-source/)[Knowledge base](/kb/)[About](/about/)

- [About Avunu](/about/)
- [Team](/about/team/)
- [Insights](/insights/)
- [Contact](/contact/)

[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

[Knowledge base](/kb/)[WordPress](/kb/wordpress/)WordPress debugging snippets

Search the knowledge basePress/

ESC

Jump to

[Browse the knowledge base](/kb/)[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[WordPress](/kb/wordpress/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

↵select↑↓navigateescclose

Search the knowledge base

[Skip to the article](#kb-article)[WordPress](/kb/wordpress/)10 articles

- [Overview](/kb/wordpress/)
- [Admin-only custom post types with custom list columns](/kb/wordpress/custom-post-type-admin/)
- [Docket Cache baseline configuration](/kb/wordpress/docket-cache-configuration/)
- [Gravity Forms](/kb/wordpress/gravity-forms/)
- [Populate Gravity Forms image choices from an ACF image field](/kb/wordpress/gravity-forms-image-choices-acf/)
- [Register custom block styles in a classic theme](/kb/wordpress/block-styles-classic-themes/)
- [Run WordPress cron from the system scheduler](/kb/wordpress/wordpress-cron/)
- [Split a child theme's functions.php into included files](/kb/wordpress/child-theme-file-includes/)
- [WordPress database optimization queries](/kb/wordpress/database-optimization-queries/)
- [WordPress debugging snippets](/kb/wordpress/debugging-snippets/)
- [WP-CLI cookbook](/kb/wordpress/wp-cli-cookbook/)
- [wp-config.php reference](/kb/wordpress/wp-config-reference/)

Other sections[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

In WordPress: 10 articles

[Overview](/kb/wordpress/)[Admin-only custom post types with custom list columns](/kb/wordpress/custom-post-type-admin/)[Docket Cache baseline configuration](/kb/wordpress/docket-cache-configuration/)[Gravity Forms](/kb/wordpress/gravity-forms/)[Populate Gravity Forms image choices from an ACF image field](/kb/wordpress/gravity-forms-image-choices-acf/)[Register custom block styles in a classic theme](/kb/wordpress/block-styles-classic-themes/)[Run WordPress cron from the system scheduler](/kb/wordpress/wordpress-cron/)[Split a child theme's functions.php into included files](/kb/wordpress/child-theme-file-includes/)[WordPress database optimization queries](/kb/wordpress/database-optimization-queries/)[WordPress debugging snippets](/kb/wordpress/debugging-snippets/)[WP-CLI cookbook](/kb/wordpress/wp-cli-cookbook/)[wp-config.php reference](/kb/wordpress/wp-config-reference/)

Other sections[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

WordPressWordPress debugging snippets

Turn on WordPress debug logging safely, list the scripts and styles a page loads, and silence the zlib ob_end_flush() shutdown notice.

UpdatedOct 1, 2026

Applies toWordPress 6.xWP-CLI 2.x

Tagswordpressdebuggingphpwp-cli

Reading time4 min

On this page[Turn On Debug Mode](#turn-on-debug-mode)[In wp-config.php](#in-wp-configphp)[With WP-CLI](#with-wp-cli)[List the Scripts and Styles a Page Loads](#list-the-scripts-and-styles-a-page-loads)[Silence the ob_end_flush() Shutdown Notice](#silence-the-ob_end_flush-shutdown-notice)

These are small tools for finding out why a WordPress site misbehaves: switching on error output, seeing exactly which assets a page loads, and silencing a common shutdown notice. Remove them once you're done.

## Turn On Debug Mode

### In wp-config.php

Add these above the `/* That's all, stop editing! */` line in `wp-config.php`:

```
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'WP_DEBUG'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'WP_DEBUG_LOG'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );      </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Write to wp-content/debug.log.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'WP_DEBUG_DISPLAY'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> ); </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Don't print errors into pages.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'SCRIPT_DEBUG'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );      </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Load unminified core JS and CSS.</span>
```

On a local or staging site where you want errors on screen, set `WP_DEBUG_DISPLAY` to `true` and add `@ini_set( 'display_errors', 1 );` in case the server's `php.ini` turns display off.

### With WP-CLI

From the WordPress directory:

```
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">config</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">set</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">WP_DEBUG</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">--raw</span>
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">config</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">set</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">WP_DEBUG_LOG</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">--raw</span>
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">config</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">set</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">WP_DEBUG_DISPLAY</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">--raw</span>
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">config</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">set</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">SCRIPT_DEBUG</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">--raw</span>
```

`--raw` writes the value as a PHP boolean instead of the string `'true'`. Turn everything off again with the same commands using `false`, or remove the constants with `wp config delete WP_DEBUG`.

Warning

Never leave `WP_DEBUG_DISPLAY` on in production. Error output reveals file paths, plugin names, and sometimes query details to every visitor. Also, `wp-content/debug.log` is publicly downloadable on most servers. On a live site, point the log somewhere outside the web root:

```
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'WP_DEBUG_LOG'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'/var/log/php/example.com-debug.log'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
```

Make sure the PHP user can write to that path.

Follow the log while you reproduce the problem:

```
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">tail</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">-f</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">wp-content/debug.log</span>
```

## List the Scripts and Styles a Page Loads

Use this when you need the handle of an asset so you can dequeue it, or want to see what a plugin adds to a page. It prints the handles of every script and style that was output as an HTML comment at the bottom of the page, and only for logged-in administrators.

Put it in a must-use plugin (for example `wp-content/mu-plugins/asset-debug.php`) while you investigate, then delete the file:

```
<span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E"><?</span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">php</span>
<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">/**</span>
<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781"> * Print enqueued script and style handles as an HTML comment (admins only).</span>
<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781"> */</span>
<span style="--shiki-dark:#D2A8FF;--shiki-light:#8250DF">add_action</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'wp_footer'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">function</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> () {</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">	</span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">if</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> ( </span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">!</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#D2A8FF;--shiki-light:#8250DF">current_user_can</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'manage_options'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> ) ) {</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">		</span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">return</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">;</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">	}</span>

<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">	</span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">printf</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">(</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">		</span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">"</span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">\n</span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069"><!-- Styles: %s --></span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">\n</span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069"><!-- Scripts: %s --></span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">\n</span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">"</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">,</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">		</span><span style="--shiki-dark:#D2A8FF;--shiki-light:#8250DF">esc_html</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">implode</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">', '</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#D2A8FF;--shiki-light:#8250DF">wp_styles</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">()</span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">-></span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">done ) ),</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">		</span><span style="--shiki-dark:#D2A8FF;--shiki-light:#8250DF">esc_html</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">implode</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">', '</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#D2A8FF;--shiki-light:#8250DF">wp_scripts</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">()</span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">-></span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">done ) )</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">	);</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">}, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">PHP_INT_MAX</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
```

`done` holds everything already printed, including dependencies pulled in automatically. Use `queue` instead to see only what was explicitly enqueued. View the page source and search for `Styles:`.

Tip

The [Query Monitor](https://wordpress.org/plugins/query-monitor/) plugin shows the same information, plus where each asset was enqueued, slow queries, hooks, and HTTP calls. Reach for it first on any site where you can install plugins.

Older versions of this snippet called `wp_print_styles()` and `wp_print_scripts()` inside `wp_enqueue_scripts`. Those functions actually print the tags early in the page and change the output you're trying to inspect, so don't use them for debugging.

## Silence the ob_end_flush() Shutdown Notice

On servers with `zlib.output_compression` turned on, every request can log:

```text
Notice: ob_end_flush(): Failed to send buffer of zlib output compression (1) in .../wp-includes/functions.php
```

WordPress calls `wp_ob_end_flush_all()` on `shutdown`, which tries to close every output buffer, including the one zlib owns and won't release. The notice is harmless but fills logs. The cleanest fix is to turn off `zlib.output_compression` and let the web server compress responses. When you can't change PHP settings, replace the core shutdown handler with one that stops quietly at the first buffer it can't close.

Put this in a must-use plugin or site plugin:

```
<span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E"><?</span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">php</span>
<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">/**</span>
<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781"> * Flush output buffers on shutdown without the zlib notice.</span>
<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781"> */</span>
<span style="--shiki-dark:#D2A8FF;--shiki-light:#8250DF">remove_action</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'shutdown'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'wp_ob_end_flush_all'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">1</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>

<span style="--shiki-dark:#D2A8FF;--shiki-light:#8250DF">add_action</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'shutdown'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">function</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> () {</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">	</span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">while</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> ( </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">ob_get_level</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">() </span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">></span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">0</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">&&</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#FF7B72;--shiki-light:#CF222E">@</span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">ob_end_flush</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">() ) {</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">		</span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Keep flushing until a buffer refuses to close.</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">	}</span>
<span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">}, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">1</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
```

The `@` only hides the notice for the one buffer that can't be flushed; the loop still flushes every other level like core does.

Sources

- [developer.wordpress.org/advanced-administration/debug/debug-wordpress](https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/)
- [developer.wordpress.org/cli/commands/config/set](https://developer.wordpress.org/cli/commands/config/set/)
- [developer.wordpress.org/reference/functions/wp_ob_end_flush_all](https://developer.wordpress.org/reference/functions/wp_ob_end_flush_all/)
- [core.trac.wordpress.org/ticket/18525](https://core.trac.wordpress.org/ticket/18525)
- [www.kevinleary.net/blog/wordpress-ob_end_flush-error-fix](https://www.kevinleary.net/blog/wordpress-ob_end_flush-error-fix/)

Need help with WordPress?

Our notes can take you a long way, but sometimes you'd rather have someone who's done it before.

[Websites](/services/websites/)

[← PreviousWordPress database optimization queries](/kb/wordpress/database-optimization-queries/)[Next →WP-CLI cookbook](/kb/wordpress/wp-cli-cookbook/)

CC0This article is in the public domain ([CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/)), code samples included. Use it however helps you.

On this page

- [Turn On Debug Mode](#turn-on-debug-mode)
- [In wp-config.php](#in-wp-configphp)
- [With WP-CLI](#with-wp-cli)
- [List the Scripts and Styles a Page Loads](#list-the-scripts-and-styles-a-page-loads)
- [Silence the ob_end_flush() Shutdown Notice](#silence-the-ob_end_flush-shutdown-notice)

[Back to top↑](#top)

Services

- [ERP implementation](/services/erp/)
- [Odoo](/services/erp/odoo/)
- [ERPNext](/services/erp/erpnext/)
- [Custom software](/services/custom-software/)
- [Devices & IoT](/services/devices-iot/)
- [Websites](/services/websites/)
- [Infrastructure](/services/infrastructure/)

Resources

- [Our work](/work/)
- [Open source](/open-source/)
- [Knowledge base](/kb/)
- [Insights](/insights/)

Company

- [About](/about/)
- [Team](/about/team/)
- [Partners](/partners/)
- [Contact](/contact/)

Clients

- [Project portal](https://erp.avunu.net/projects)
- [Invoices](https://erp.avunu.net/)
- [Support](https://erp.avunu.net/)

[![Avunu](/brand/avunu-logo-light.svg)](/)[\<av-icon data-jx-static>\<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" stroke="none" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">\<path d="M20.400 20.500h-3.600v-5.600c0-1.300 0-3-1.800-3s-2.100 1.400-2.100 2.900v5.700H9.400V9h3.400v1.600c.5-.9 1.600-1.900 3.400-1.900 3.600 0 4.300 2.400 4.300 5.500v6.300zM5.300 7.400a2.100 2.100 0 1 1 0-4.100 2.100 2.100 0 0 1 0 4.100zm1.800 13.100H3.600V9h3.500v11.500zM22.200 0H1.800C.8 0 0 .8 0 1.700v20.600c0 .9.800 1.700 1.800 1.700h20.400c1 0 1.800-.8 1.800-1.700V1.700C24 .8 23.200 0 22.200 0z">\</path>\</svg>\</av-icon>](https://www.linkedin.com/company/avunu)[\<av-icon data-jx-static>\<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" stroke="none" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">\<path d="M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.2 0 0 1-.3 3.3 1.2a11.500 11.500 0 0 1 6 0c2.300-1.500 3.300-1.200 3.300-1.200.6 1.700.2 2.900.1 3.200.8.8 1.200 1.900 1.200 3.200 0 4.600-2.800 5.600-5.500 5.900.4.400.8 1.100.8 2.200v3.300c0 .3.2.7.8.6A12 12 0 0 0 12 .3">\</path>\</svg>\</av-icon>](https://github.com/Avunu)[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

Avunu LLC · 948 East Philadelphia Street, York, PA 17403 · (717) 814-8540Knowledge base articles are in the public domain[Privacy](/privacy/)[Terms](/terms/)
