[wp-trac] [WordPress Trac] #44270: Non-public custom post types have rewrite rules enabled by default
WordPress Trac
noreply at wordpress.org
Sun Sep 28 16:24:12 UTC 2025
#44270: Non-public custom post types have rewrite rules enabled by default
-------------------------------+----------------------
Reporter: TheDeadMedic | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version:
Severity: trivial | Resolution: wontfix
Keywords: has-patch | Focuses:
-------------------------------+----------------------
Changes (by SirLouen):
* status: new => closed
* type: defect (bug) => enhancement
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
This has been like this almost from the beginning.
But it's true that given how poor in performance rewrite rules are when it
comes to CPT, I also believe that setting this to what is publicly default
makes a lot of sense at first.
But then I think that some plugins could be using rewrite rules for non-
public CPT. For example. Let's say I have some internal administrative
content, like logs. I could potentially want to access friendly URLs while
not having a front face in the admin.
If this plugin is live, it will be broken after this update, causing a
massive BC if they have not explicitly set up their `rewrites` to `true`.
Yes, it's a total pain having to think of these random use-cases and the
possibility that any edge idea could be profiting from this, but it
appears that BC takes priority.
Knowing that you can simply set your non-public CPT to `rewrite` to
`false`, this bug feels more like an enhancement, and it's not an
enhancement we can take without causing a break.
I'm going to close this for now, because this has been stalling for quite
a long time, and no further ideas have come around the topic (so it
doesn't seem to be a very popular problem that people is aware of, and
still we have easy workarounds; after all setting a new CPT is not
something that comes by default in WP core).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44270#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list