You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docs: Example for blueprint step writeFile flushes permalink rewrites rules on every page load #2195
The after_setup_theme action is called on every page load, so it's not the best way to enable pretty permalinks and flush rewrite rules (which is considered an "expensive" operation).
A better way is to do it once using the runPHP step.
{
"step": "runPHP",
"code": "<?php include '/var/www/html/wp-load.php'; global $wp_rewrite; $wp_rewrite->set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules();"
},
There might be a simpler way to achieve it. This PR seems to have made pretty permalinks the default.
Activity
Docs: replace rewrite-flushing writeFile examples (WordPress#3806)