The SQL statement to change all references of a string in WordPress posts is: UPDATE wp_posts SET post_content = REPLACE(post_content, ‘staging.server.com’, ‘www.productionserver.com’);
Tag: SQL
Spam all pending WordPress comments SQL statment
SQL code to change all pending comments to spam: UPDATE `wp_comments` SET `comment_approved`=’spam’ WHERE `comment_approved` = 0; If you’re not using Akismet, and you’ve let your pending, most likely “spam” comments, pile-up; the above SQL code will help convert all pending comments to spam. So comments like: What an insightful idea has been written here.… Continue reading Spam all pending WordPress comments SQL statment