Internally, wordpress splits this data up into four tables: wp_posts, wp_terms, wp_terms_relationships and wp_terms_taxonomy. So it can end up being a chunky query. This should do it... replace 'Text to replace', 'I have been replaced!' and 'YourCategory' with your own values. UPDATE wp_posts AS p JOIN wp_term_relationships AS r ON p.ID = r.object_ID JOIN wp_term_taxonomy AS t ON r.term_taxonomy_id = t.term_taxonomy_id JOIN wp_terms AS tt ON t.term_id = tt.term_id SET p.post_content = replace(p.post_content,'Text to replace','I have been replaced!') WHERE p.post_type='post' AND tt.name = 'YourCategory' PHP: