Description
DevFixture Numeric Slugs removes WordPress’s numeric-only slug restrictions. A page requested as 125 can keep 125 instead of becoming 125-2 just because its name is a number.
Built by DevFixture: https://devfixture.com/
- Pages, child pages and deeply nested page trees.
- Posts, including numeric names that overlap date archive patterns.
- Hierarchical and non-hierarchical custom post types.
- Zero and leading zeros are preserved as text.
- Numeric attachment names retain WordPress’s global uniqueness rules.
- Works with the block editor, classic editor, REST API and standard WordPress save functions.
- Real duplicates still receive a suffix. Siblings must be unique; separate parent trees can reuse the same slug.
- No settings screen, frontend assets, database tables, tracking or external services.
Activate the plugin and edit a slug normally. There is no need to resave permalink settings.
URL conflicts
For published, publicly viewable content, an exact numeric permalink takes precedence over a date archive or a page number at the same URL. Private content is resolved only for visitors allowed to read it. Drafts are not made public.
For example, a child page at /guide/2/ takes precedence over page 2 of /guide/. If that child does not exist, WordPress handles pagination normally. A post at /2025/ takes precedence over the 2025 archive. Choose distinct URLs when both destinations need to remain accessible.
WordPress allows pages and posts to share a slug. If they also share the exact same permalink, the page takes precedence. Custom rewrite plugins and two custom post types sharing an identical URL namespace may need their own routing configuration.
The plugin supports standard WordPress pretty permalinks and plain ID-based links. It does not add public URLs to private post types or enable attachment pages disabled by WordPress. Explicit query-string requests retain WordPress’s normal behavior.
Existing content
Existing slugs are not renamed automatically. To change 125-2 to 125, edit the permalink after activation. If 125 is already used in that namespace, the suffix remains necessary. Configure redirects separately when changing a URL already in use.
Deactivation does not rename content. WordPress’s normal numeric restrictions and URL routing apply again, so numeric URLs may require adjustment.
Installation
- Upload devfixture-numeric-slugs to /wp-content/plugins/, or install the release ZIP through Plugins > Add Plugin > Upload Plugin.
- Activate DevFixture Numeric Slugs.
- Enter a numeric slug in a page, post or custom post type and save it.
FAQ
-
Why does WordPress sometimes still append -2?
-
A real duplicate, an attachment in the same namespace, a reserved feed name, or another plugin’s reserved-slug rule can require a suffix. DevFixture Numeric Slugs removes the numeric restriction without removing uniqueness checks.
-
Are 0 and 001 supported?
-
Yes. Numeric names are stored as strings, including zero, leading zeros and numbers larger than a PHP integer.
-
Does it work with multisite?
-
The hooks use the current site’s WordPress APIs and tables. Activation can be per-site or network-wide; no network migration is needed.
-
Is there a settings page?
-
No. The plugin works immediately after activation.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“DevFixture Numeric Slugs” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “DevFixture Numeric Slugs” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release with numeric slug support, exact permalink resolution, zero handling and duplicate protection.
