• During migration from server A to server B occurs some error i have no idea how to deal with: all images sizes seems to be lost.

    I display thumbnails via
    get_the_post_thumbnail($iID,$sSize)

    But its shown the original image instead. $sSize is defined by
    add_image_size('thumb_xs_footer', 200, 128, true);

    The image is available inside wp-content/2014/03/ and could be requested directly via browser.

    Old Server:
    <img width="200" height="128" title="crazy behavior" alt="crazy behavior" src="https://old-domain/wp-content/uploads/2014/03/crazy-behavior-200x128.jpg">

    New Server:
    <img width="1920" height="640" title="crazy behavior" alt="crazy behavior" src="https://new-domain/wp-content/uploads/2014/03/crazy-behavior.jpg">

Viewing 3 replies - 1 through 3 (of 3 total)
  • How did you do the migration?

    When you move a site, you must replace the old URLs and paths with the new ones. Some of these are stored in the database in ‘serialized’ form where the string length is stored along with the string. You must use special tools to search and replace the old values with the new ones.

    If you replace an old URL with a new one of a different length, it will break the serialization, causing many different problems.

    If the old site is still available, you can use the steps shown in this article to copy the site: https://wordpress.mcdspot.com/2012/08/22/migrating-a-wordpress-site-step-by-step/

    If the old site is not available, and you still have a copy of the database from that site, you should be able to use this tool to make the changes: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Thread Starter essha

    (@essha)

    Thats a really good point. strlength of Hosts differ, so serialize will fail.

    I just wonder why migration didnt fail til last december. I ran into problems during migration last month for the first time…

    Anyway – thanks for your hint!

    Thread Starter essha

    (@essha)

    Someone knows what the key ‘url’ in _wp_attachment_metadata @ table wp_postmeta is about? This seems to be the root of all evil

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Migration: Image sizes broken’ is closed to new replies.