Fixing broken links and images [Understanding the aftermath of moving a wordpress blog]
When you decide to move your blog and contents from one directory to another you will encounter a few problems. Not only must you edit your WordPress blog options, but all references to images and possible internal links will be broken. The last is easy to repair if you know the SQL code to manipulate the wp_posts table. This principle can of course be applied to any table or field you want. The next table you want to inspect would be wp_postmeta.
-
UPDATE wp_posts SET post_content = REPLACE(post_content, ‘oldurl’ ,‘newurl’)