I migrated a site from my testing server to the live server. Everything transferred normally only the featured images are broken and not displaying. The URL's are being rendered incorrectly even if i re-upload the image.

the testing server is dave-conner.com

the live server is qmpdirect.com

the page where the issue is happening on is http://qmpdirect.com/cpap-kits/

the first image path should be:


but is instead rendering as:


If anyone can tell me why this is happening and how i can fix it I would greatly appreciate it. I have been banging my head against the wall for a while now.

  • You likely just used an incorrect path in your template file. Can you pastebin your template file?
    – tollmanz
    Apr 8, 2012 at 4:59
  • I didnt specify any path. I just uploaded the featured image through the wordpress dashboard. And these images are working fine on the testing server. If you would like me to post something I will but i didnt modify the template file.
    – Davidicus
    Apr 8, 2012 at 5:23
  • I would like to see the template file. I think something might be wonky in there.
    – tollmanz
    Apr 8, 2012 at 5:36
  • pastebin.com/GMD7svzx This is the template file of the page that im having the issues with. Let me know if there is anything else I can provide. Thanks for your help. Been at this for days now.
    – Davidicus
    Apr 8, 2012 at 5:43
  • I think we are on the right path. There is a function, print_thumbnail, that is printing the images. Can you post the function definition? It is not in that file.
    – tollmanz
    Apr 8, 2012 at 6:03

2 Answers 2


I'd recommend taking a look at the database.

1) check the upload_path option and correct directly if needed (well, this one can be altered here too: wp-admin/options.php)

SELECT *  FROM `wp_options` WHERE `option_name` = 'upload_path'

2) check the guid of the attachments and use this plugin if needed

SELECT guid,post_mime_type  FROM `wp_posts` WHERE `post_type` = 'attachment'

Found the problem. The location of the temporary files in the database was still set to the absolute hosting path of the old server. Once i changed this to the absolute hosting path of the live server the problem was corrected. I'm still not sure why this caused the image to break since wordpress moves these images to permanent folders but...problem solved. Thanks for everyone that offered suggestions. This is the only forum that even offered help. Thanks.

Your Answer

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

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