Title: remove_permastruct
Published: April 12, 2016
Last modified: February 24, 2026

---

# remove_permastruct( string $name )

## In this article

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

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

Removes a permalink structure.

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

Can only be used to remove permastructs that were added using [add_permastruct()](https://developer.wordpress.org/reference/functions/add_permastruct/).

Built-in permastructs cannot be removed.

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

 * [WP_Rewrite::remove_permastruct()](https://developer.wordpress.org/reference/classes/WP_Rewrite/remove_permastruct/)

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

 `$name`stringrequired

Name for permalink structure.

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

    ```php
    function remove_permastruct( $name ) {
    	global $wp_rewrite;

    	$wp_rewrite->remove_permastruct( $name );
    }
    ```

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

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

| Uses | Description | 
| [WP_Rewrite::remove_permastruct()](https://developer.wordpress.org/reference/classes/wp_rewrite/remove_permastruct/)`wp-includes/class-wp-rewrite.php` |

Removes a permalink structure.

  |

| Used by | Description | 
| [WP_Taxonomy::remove_rewrite_rules()](https://developer.wordpress.org/reference/classes/wp_taxonomy/remove_rewrite_rules/)`wp-includes/class-wp-taxonomy.php` |

Removes any rewrite rules, permastructs, and rules for the taxonomy.

  | 
| [WP_Post_Type::remove_rewrite_rules()](https://developer.wordpress.org/reference/classes/wp_post_type/remove_rewrite_rules/)`wp-includes/class-wp-post-type.php` |

Removes any rewrite rules, permastructs, and rules for the post type.

  |

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

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

## User Contributed Notes

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