admin管理员组文章数量:1131198
I'm using /@wordpress/env to set up a local docker-based WordPress development environment, which has been working great so far. I'm trying to build a script using WordPress's CLI that sets the permalink structure to '/%postname%/', so that visiting /sample-page
would work without any manual setup.
I've tried all of the following commands:
wp-env cli wp option set permalink_structure '/%postname%/'
wp-env cli wp rewrite structure '/%postname%/'
wp-env cli wp rewrite flush --hard
My problem is that even though the navigation bar shows a link to http://localhost:8888/sample-page/
, actually trying to visit that page yields a "Not Found / The requested URL was not found on this server." page in response.
This situation only resolves itself the moment I visit the WP Admin Settings Permalink pages (no save changes click, and simple logging in doesn't fix it either), but I'd like to do this through the CLI, which I hope would be possible for automating site setup.
Any advice?
本文标签:
版权声明:本文标题:wp cli - @wordpressenv cli doesn't seem to properly update permalink structure until visiting the WP Admin Permalink set 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736751599a1951067.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论