admin管理员组文章数量:1307062
I am trying to use WP-CLI to do a search and replace on about 10,000 posts that were imported from another CMS and it has a great deal of old inline styles and spans and such. I would like to be able to use the search and replace function to remove a lot of chaff using regex. I have no issue creating the regex or limiting my command to just the content column in the wp_posts table, but I do not see a built in way way to limit my post_type
to only post
, not page
or others that are in the wp_posts
table. Is there one?
Here is a code example:
wp search-replace '<span^.*>' '' --regex wp_posts --include-columns=post_content
本文标签: wp cliHow can I search and replace by post type
版权声明:本文标题:wp cli - How can I search and replace by post type? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741828258a2399775.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论