Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am redeveloping a client's site and, for a number of reasons, in the process changing hosts. I'm developing it on the new host and to get the site orgainised I have attempted to import all the pages from the old site using the WordPress export/import plugins.

During the import I checked the "import images" checkbox but it doesn't seem to have worked. All the images in the pages are being loaded from the old site and the media library in the new site is empty. Here are the URLs for reference:

new site: http://sergedenim.es

old site: http://sergedenimes.com

share|improve this question
    
What WP version are you running? And the Importer plugin version? I suppose it'll be the latest, but just in case... Are you trying the import just after having installed the new site or do you already have plugins and new theme activated? Also, what does the new server error_log shows? –  brasofilo Nov 14 '12 at 11:30
add comment

3 Answers

Did you tried to use plugin that updates urls after changing url of medialibrary?

Velvet Blues Update URLs

share|improve this answer
1  
that plugin only appear to change the URLs of the image links in the posts/pages. It doesn't say anything about actually downloading the images from the old server to the new. –  harryg Nov 14 '12 at 9:41
1  
Just repalce you wp-content/uploads directory by new site wp-conten/uploads. –  Oleg Butuzov Nov 14 '12 at 9:44
    
OK, but this still won't solve the problem that none of the images are "attached" to their respective pages. I.E there is nothing in the "media" section of WordPress backend –  harryg Nov 14 '12 at 10:35
add comment
  1. Ensure both domains are active
  2. Ensure the same version of WordPress is installed on both domains
  3. Ensure the Same Theme is active on both domains
  4. Ensure the Same Plugins are active on both domains
  5. Ensure that the images are hosted and attached in the old domain.
  6. Delete all default/dummy post data from the new domain (Test Post, About page, etc.)
  7. Export all content from the old domain
  8. Import the resulting XML file to the new domain
  9. Ensure download and attach media is enabled/checked
  10. Note any errors printed during the import process
share|improve this answer
    
Thanks Chip. Ha I didn't realize you were active here. You have helped me in the past on the WP forums. I will try your method when I get a chance this evening. –  harryg Nov 14 '12 at 14:25
add comment
up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.