I conserve a Wordpress site for any client of mine. They are doing all of the content, I simply ensure that it stays running and perform the theme work.

A website they have associated with a couple of hundred occasions has transformed domain and they have (very rudely) not rerouted traffic using their old domain, so customers hitting a classic link visit a 404.

So we are left within the position where we have to fix all of the links. The static ones (in theme files) happen to be simple to exchange but, as I only say, you will find 100s of those blighters littered all around the website within the posts.

It is possible to quick approach to find-and-replace links such as this?

If there isn't a Wordpress or PHP method, I am pleased to log to the database over SSH and fire some SQL off by hand... But what SQL will i want?

Managing a totally indeed the simplest and cleanest way.

  1. Support the database obviously

  2. Based on this blog post (I am too lazy to appear the posts on an active Wordpress but this looks about right), the best totally

    UPDATE wp_posts SET post_content = 
                    REPLACE (post_content, 
                             'http://www.oldsiteurl.com', 
                             'http://www.newsiteurl.com');
    

There is another WordPress wordpress plugin for your: http://wordpress.org/extend/plugins/search-and-replace/ I have tried personally it when moving my very own site also it labored nicely.