title: Extracting URLs from Wordpress post_content using MySQL
body: <p>I'm in the process of moving a few thousand articles from an old Wordpress site to a new one. Each article includes at least one, and possible a handful of outbound links in the text itself. We need to manually review all of the URLs. Ideally I would have a list of the URLs that I can sort to make the process go quickly.</p>
  
  <p>I am looking for a way to extract a list of every single URL that is referenced, along with the Post's ID so that we can go back and edit it if need be.</p>
  
  <p>My first attempt was something simple like <strong>"SELECT ID, post_content FROM wp_posts WHERE post_content LIKE '%http%';"</strong>, but that just resulted in a list of (almost) all of the posts.</p>
  
  <p>There are two parts to this I guess, the first is getting a hit for every single URL, not just every article, since articles may contain one or more URLs. Maybe some kind of JOIN? I'm going to start on that, since I think it's something I can figure out.</p>
  
  <p>The second part would be trimming the results back so they just showed the URL itself. I'm experienced with MySQL but haven't really used any of the string manipulation functions at all.</p>
  
  <p>Thanks in advance for any help.</p>