I'm trying to migrate a WP install using default export and import tool. Everything is peachy except featured images.

For my post thumbnails I'm using default Featured Image option with 7-8 predefined image sizes in my functions.php.

Problem - after importing, Wordpress is just putting original picture in img src for thumbnail. Not resized one as is should be, but largest one which was uploaded originally.

This is not even an option, because there are over 2000 posts, but I can't even fix this by setting featured image again by selecting image from media library -- I have to upload the image again, and then it works.

I guess import/export tool doesn't save all the settings/metadata it should, but I can't figure out how to solve this.

Image files (original and resized ones) are on server and in proper folder, and code is set up properly as well.

  • Is the theme where the additional image sizes are defined activated before running the importer? The importer will only request the original uploaded image from the old site and will cut the new images based on what is defined in Settings>Media and any additional sizes defined in the active theme's functions.php file.
    – aaronwaggs
    Commented Feb 4, 2012 at 23:49

1 Answer 1


The_post_thumbnail is a function that "runs" on the "theme" side of things.. not the DB.

in short - you need to have a theme that supports post thumbnails . That means , to have it work - you need the SAME theme when migrating to be functional , OR adapt the new one.

Open your functions.php on your theme, and search for something like :

add_theme_support( 'post-thumbnails' ); //thumnails
set_post_thumbnail_size( 230, 150, true ); // Normal post thumbnails

AND the following :

//add_image_size( 'single-post-thumbnail', 400, 9999 ); // Permalink thumbnail size choose one !
add_image_size( 'single-post-thumbnail', 400, 300,true ); // single-post-test
add_image_size( 'tooltip', 100, 100, true ); // Permalink thumbnail size
add_image_size( 'nivo', 470, 350, true ); // nivo slider size

note that the names and size in your theme will be different.

If you do not have it on your OLD, you will need to copy that from your OLD theme´s functions.php , to your NEW theme - along with the proper the_post_thumbnail_(arg) that appear on your theme files (like single.php, archives.php etc..)

The simplest way (if you are a beginner in WP) is to activate the old theme on the new migration site and see if all works..

Also - check that the folder structure, permalink structure AND folders/files naming are all the same..

  • Thanks for the answer. Solved problem by uploading wp_postmeta table into new installation. Theme was set up and everything was in place, but it just didn't show proper image size. Importing table fixed that. Hope I don't run into problems down the road because of this, tho.
    – stackhouse
    Commented Feb 5, 2012 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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