[wp-trac] [WordPress Trac] #65267: Preserve Query Strings on Old-Slug Redirects, If Any

WordPress Trac noreply at wordpress.org
Tue May 19 18:35:27 UTC 2026


#65267: Preserve Query Strings on Old-Slug Redirects, If Any
--------------------------+-----------------------------
 Reporter:  mkormendy     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Query         |     Version:  2.1
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------
Changes (by westonruter):

 * keywords:   => needs-patch
 * version:   => 2.1
 * milestone:  Awaiting Review => Future Release


Comment:

 This makes sense to me.

 I modified the slug of the Hello World post from `hello-world` to `hola-
 mundo`. Then I renamed it back.

 When I tried going to `/2025/12/25/hola-mundo/?utm=foo` I was redirected
 to ``/2025/12/25/hello-world/` with the query parameter removed.

 The `wp_old_slug_redirect()` function was introduced in WP 2.1. I'm
 surprised this hasn't been raised as an issue before.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65267#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list