• I have quite a number of [youtube=….] tags in my blog but because I’ve migrated it to my own host now, the videos are no longer embedded. Is there a way of using SQL to update these tags to the original embed code provided by Youtube?

    UPDATE wp_posts SET post_content = replace( post_content, '[youtube=', '<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/7hhZd5YX_KQ"></param><param name="wmode" value="transparent"></param><embed src="' ) ;

    I would use the above query but, I need to replace the ending syntax “]” too so is there a wildcard I can use? i.e. So that I can search for “[youtube=%WILDCARD%]” and replace “[youtube=” with “<embed….” and, “]” with “….</embed>”.

  • The topic ‘Best way to update Youtube tags?’ is closed to new replies.