[wp-trac] [WordPress Trac] #54654: Can flush_rewrite_rules() be called automatically after changing the site URL?

WordPress Trac noreply at wordpress.org
Sat Dec 18 14:19:18 UTC 2021


#54654: Can flush_rewrite_rules() be called automatically after changing the site
URL?
---------------------------+------------------------------
 Reporter:  pikamander2    |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Rewrite Rules  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+------------------------------
Changes (by SergeyBiryukov):

 * component:  General => Rewrite Rules


Comment:

 Hi there, welcome back to WordPress Trac! Thanks for the ticket.

 Replying to [ticket:54654 pikamander2]:
 > Would it be possible to automatically flush_rewrite_rules() in the core
 function that handles the address change?

 As noted above, this does in fact already happen since WordPress 1.5.1.
 Some history here:
 * [2494] If home changes, write rewrite rules to new location.
 * [3373] Cache rewrite rules. Add WP_Rewrite::flush_rules(). fixes #2155
 * [4175] Move home and siteurl update events to action hooks.

 Some other tickets that might be related: #47526, #47686.

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


More information about the wp-trac mailing list