Cleanup uploads folder, Media Library db structure

I am doing an upgrade and cleanup of an old blog that started on Blogger.com, then moved to self-hosted WordPress 2.1, 2.3 and now 3.0. Images in the posts are scattered around: most of them are in /wp-content/, but not all in /wp-content/uploads/ or /wp-content/uploads/year/month/. Others still reference the blogger.com image servers. I want to consolidate them all in /wp-content/uploads/year/month/, which I think is the “correct” place? This should make later upgrades easier.

What is the best way to do this? I would like to update the metadata too, so that the Media Library can manage all of them. I could not find any documentation on this, so sorry if I missed it, please point me to it.

Of course, I would provide redirects from the old locations to the new. What is the best way to do this? A template 404.php, of a plugin? I would like to add some logging, so we can find the referring pages and maybe correct them.

(This question was originally asked on the WordPress support forums, but got no useful answer there).

4 s
4

W3-Total Cache has a feature that will scan all your posts and import any external images into the media library and change the paths to the new location.

See Screenshot

alt text

Leave a Comment