Resets WordPress' rewrite rules (based on registered post types, etc) during Trellis deploys.
Add this role to requirements.yml
:
# requirements.yml
- src: itinerisltd.trellis_flush_rewrite_rules_during_deploy
version: 0.1.0 # Check for latest version!
Add this role to the deploy_finalize_after
hook:
# group_vars/all/deploy-hooks.yml
# Learn more on https://roots.io/trellis/docs/deploys/#hooks
deploy_finalize_after:
- "{{ playbook_dir }}/vendor/roles/itinerisltd.trellis_flush_rewrite_rules_during_deploy/tasks/main.yml"
Note: You should put this role before purging caches, e.g: trellis-purge-wp-rocket-cache-during-deploy, trellis-purge-kinsta-cache-during-deploy, etc.
Deploy as usual. No special action needed.
This role executes $ wp rewrite flush
during Trellis deploys.
- Articles on Itineris' blog
- More projects on Itineris' GitHub profile
- More plugins on Itineris' wp.org profile
- Follow @itineris_ltd and @TangRufus on Twitter
- Hire Itineris to build your next awesome site
Thanks! Glad you like it. It's important to let my boss knows somebody is using this project. Instead of giving reviews on wp.org, consider:
- tweet something good with mentioning @itineris_ltd and @TangRufus
- star this Github repo
- watch this Github repo
- write blog posts
- submit pull requests
- hire Itineris
Please provide feedback! We want to make this library useful in as many projects as possible. Please submit an issue and point out what you do and don't like, or fork the project and make suggestions. No issue is too small.
Please see CHANGELOG for more information on what has changed recently.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
trellis_flush_rewrite_rules_during_deploy is a Itineris Limited project created by Tang Rufus.
Full list of contributors can be found here.
trellis_flush_rewrite_rules_during_deploy is licensed under the MIT License. Please see License File for more information.