• Good morning everyone!

    I need to replace content from my posts but I wanna do it just for a particular WP user.

    This code works for every posts but I don´t know how to modify it to fit my need.

    update wp_posts set post_content = replace(post_content,'hml antiguo','html nuevo');

    Thanks for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You need to add a ‘where’ clause and you will have to examine the wp-users table to find the persons ID. Say the ID for the person in teh wp-users table was ‘345’ you would use
    where post_author = '234'
    and that will limit the update to only whe posts with that user

    Thread Starter mmediax

    (@mmediax)

    Thanks! It has worked well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘MySQL query to replace bulk content’ is closed to new replies.