Title: wp_deregister_style
Published: April 25, 2014
Last modified: August 20, 2026

---

# wp_deregister_style( string $handle )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#user-contributed-notes)

Removes a registered stylesheet.

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

### 󠀁[See also](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#see-also)󠁿

 * [WP_Dependencies::remove()](https://developer.wordpress.org/reference/classes/WP_Dependencies/remove/)

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

 `$handle`stringrequired

Name of the stylesheet to be removed.

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

    ```php
    function wp_deregister_style( $handle ) {
    	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );

    	wp_styles()->remove( $handle );
    }
    ```

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

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

| Uses | Description | 
| [wp_styles()](https://developer.wordpress.org/reference/functions/wp_styles/)`wp-includes/functions.wp-styles.php` |

Initializes $wp_styles if it has not been set.

  |

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

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

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/wp_deregister_style/?output_format=md#comment-content-2443)
 2.   [tazotodua](https://profiles.wordpress.org/tazotodua/)  [  9 years ago  ](https://developer.wordpress.org/reference/functions/wp_deregister_style/#comment-2443)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_deregister_style%2F%23comment-2443)
    Vote results for this note: 3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_deregister_style%2F%23comment-2443)
 4. Example:
 5.     ```php
        add_action( 'wp_enqueue_scripts', 'remove_default_stylesheet', 20 );
        function remove_default_stylesheet() {
            wp_dequeue_style( 'original-enqueue-stylesheet-handle' );
            wp_deregister_style( 'original-register-stylesheet-handle' );
    
            wp_register_style( 'new-style', get_stylesheet_directory_uri() . '/new.css', false, '1.0.0' ); 
            wp_enqueue_style( 'new-style' );
        }
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_deregister_style%2F%3Freplytocom%3D2443%23feedback-editor-2443)

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