Import Images from one self-hosted WordPress install to another

Although Chip’s method may work for some it did not for me.
I did get it working however this way:

  1. Do the normal export of pages and posts and import them to your new blog (having deleted the original pages and posts)
  2. Download the wp-content/uploads folder via ftp from your old site and upload it to your new site, replacing what’s there.
  3. Go into phpmyadmin on the old site and use an SQL query to select all posts that have post type = “attachment” in the wp_posts table. Export the results of this query and save on your PC.
  4. Export the wp_terms table from your old site.
  5. Import both the mySQL exports from your old site into your new site via phpmyadmin.
  6. Use the “search and replace” plugin to replace all occurrences of your old domain in your database with your new domain.

If all goes well you should have all your attachments in your new site along with all thumbnails stored and referenced correctly.