Remove Category from Slug WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Strip "category" from post archive URL slugs in WordPress
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/headwalluk/remove-category-from-slug/releases/download/v1.1.0/remove-category-from-slug.zipA small, dependency-free WordPress plugin that strips the /category/ base from category archive URLs.
/category/news/ → /news/
/category/parent/child/ → /parent/child/
/category/news/page/2/ → /news/page/2/
/category/news/feed/ → /news/feed/
Old /category/... URLs are 301-redirected to the new form, so links and SEO carry over.
No settings page, no telemetry, no third-party SDKs. The whole plugin is a single file.
How it works
Three WordPress rewrite hooks do all the work:
init— overrides the category permastruct to%category%soget_category_link()returns the bare slug.category_rewrite_rules— rebuilds the rule set, emitting root, paged, and feed rules per category. Parent slugs are joined with/. A catch-all rule maps any leftover/<old_base>/...request into acategory_redirectquery var.request— seescategory_redirectand issues a 301 to the new URL.
Rewrite rules are flushed automatically on activation, deactivation, and whenever a category is created, edited, or deleted.
If Yoast SEO is active, the wpseo_canonical filter re-points category-archive canonical URLs at the bare slug too, since Yoast computes its own canonical rather than using core's. The filter is a no-op when Yoast is not installed.
Installation
- Copy the plugin folder to
wp-content/plugins/. - Activate it from the Plugins screen.
Development
PHP_CodeSniffer with WordPress Coding Standards:
phpcs # Check
phpcbf # Auto-fix
phpcs # Re-check
See CLAUDE.md for architecture notes and project conventions.
License
GPL-2.0-or-later. See LICENSE.
Releases
3 releases. Each count is every asset in that release; expand a row for the breakdown.
v1.1.0
latest
Oct 5, 2026 18d ago
remove-category-from-slug.zip
+1 asset
2
Jun 28, 2026 3mo ago
remove-category-from-slug.zip
+1 asset
8
Apr 27, 2026 5mo ago
remove-category-from-slug.zip
+1 asset
3
Active-site estimate ≈10 comes from the median of recent superseded releases. Method.