Title: wp_trigger_error_always_run
Published: May 20, 2026

---

# do_action( ‘wp_trigger_error_always_run’, string $function_name, string $message, int $error_level )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#wp--skip-link--target)

Always fires when the given function triggers a user-level error/warning/notice/
deprecation message.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#description)󠁿

Can be used to attach custom error handlers even if WP_DEBUG is not truthy.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#parameters)󠁿

 `$function_name`string

The function that triggered the error.

`$message`string

The message explaining the error.

`$error_level`int

The designated error type for this error.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#source)󠁿

    ```php
    do_action( 'wp_trigger_error_always_run', $function_name, $message, $error_level );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/functions.php#L6116)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/functions.php#L6116-L6116)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_trigger_error()](https://developer.wordpress.org/reference/functions/wp_trigger_error/)`wp-includes/functions.php` |

Generates a user-level error/warning/notice/deprecation message.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_trigger_error_always_run/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.0.0](https://developer.wordpress.org/reference/since/7.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_trigger_error_always_run%2F)
before being able to contribute a note or feedback.