我正在尝试从我的 Wordpress 站点中删除 20,000 个媒体文件和所有数据库引用。
我发现了一些 SQL 语句,但它们都不起作用。存在语法错误。我不是 SQL 专家。
这是我所拥有的。任何见解都会很棒。
DELETE FROM 'wpsq_posts' WHERE 'post_type' = "attachment" AND 'post_date' BETWEEN '2023-03-04 00:00:00' and '2023-03-04 23:59:00';
DELETE FROM 'wpsq_postmeta' WHERE 'meta_key' = "_wp_attached_file" AND 'post_date' BETWEEN '2023-03-04 00:00:00' and '2023-03-04 23:59:00';
DELETE FROM 'wpsq_postmeta' WHERE 'meta_key' = "_wp_attachment_metadata" AND 'post_date' BETWEEN '2023-03-04 00:00:00' and '2023-03-04 23:59:00';