Skip to content

Flush rewrite rules at the end of each deploy#1567

Merged
swalkinshaw merged 1 commit intoroots:masterfrom
joshuafredrickson:master
Apr 12, 2025
Merged

Flush rewrite rules at the end of each deploy#1567
swalkinshaw merged 1 commit intoroots:masterfrom
joshuafredrickson:master

Conversation

@joshuafredrickson
Copy link
Contributor

@joshuafredrickson joshuafredrickson commented Apr 1, 2025

Permalinks aren’t automatically flushed on deployment, so I usually handle it in a deploy hook. Since rewrites function like a cache—similar to Acorn, ACF, or Redis—it makes sense to clear them during deployment.

For example, adding a new CPT requires flushing rewrites manually for the archive page to work. Automating this would help ensure rewrites just work after deployment.

@swalkinshaw swalkinshaw merged commit f9b770b into roots:master Apr 12, 2025
2 checks passed
@swalkinshaw
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants