[教程] wordpress 删除数据库所有文章和删除所有标签sql语句

查看: 682|回复: 1
wpocn 发表于 2023-4-6 16:39:17
本帖最后由 wpocn 于 2023-4-6 16:40 编辑

删除所有文章
  1. delete from wp_posts using wp_posts, wp_term_relationships, wp_term_taxonomy where wp_posts.id=wp_term_relationships.object_id and wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id and wp_term_relationships.term_taxonomy_id = 1
复制代码
删除所有标签
  1. DELETE a,b,c
  2. FROM wp_terms AS a
  3. LEFT JOIN wp_term_taxonomy AS c ON a.term_id = c.term_id
  4. LEFT JOIN wp_term_relationships AS b ON b.term_taxonomy_id = c.term_taxonomy_id
  5. WHERE c.taxonomy = 'post_tag' AND c.count = 0
复制代码
xulongzhuiyi 发表于 2023-8-25 11:25:35
(⊙﹏⊙) 删除数据库
https://www.shoudianzuan.com/
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于本站联系我们FAQ友情链接免责声明生存法则

Build with for "make" Copyright © 2020-2022. Powered by Discuz! GMT+8, 2024-4-25 10:20

快速回复 返回顶部 返回列表