Moved to new subdomain - Lost text widgets and custom header images.

I'm trying to create a training version of our live site. I created a new subdomain and copied the full site to a new directory, modifying the config file as needed.

Then I exported the database and did a find and replace, changing all the references to the old domain and to the old path.

The site came up fine except that text/html widgets are missing (they still exist in the database) and custom header images in my dixi and triden templates are not showing up - instead the blogs show the defaults. The images exist in the blog directories and still seemed to be referenced in the database.

Help??!

  • Mason

    Hiya!

    Sorry that this is giving ya trouble. The easiest solution may be to simply recreate the text widgets and redo the custom headers on the new site.

    Then I exported the database and did a find and replace, changing all the references to the old domain and to the old path.

    Sometimes it's not quite as simple as copying and pasting the new site domain over the old in the database. This is because the information contained in meta_values is often serialized. So it looks like:
    a:22:{s:12:"productimage";s:69:"http://cooldomain.com/wp-content/uploads/products_img/DSC02043web.jpg";}
    You can see the domain as part of the link to an image: cooldomain.com
    If I move the site to a different domain like: yetanothercooldomain.com then simply doing a copy & paste of the domain name will cause errors because of that little part above called "s:69:" This basically refers to the number of characters within the quotation marks.

    For somecooldomainhere.com... a value of s:69 is correct (for the entrie link)
    But if I change to yetanothercooldomain.com then the entire length is now 79, so I must also change the value to s:79.

    In wp_options your home and siteurl option_name values are fine to simply replace, but if you start to see anything like a:22:{s:... then the "s" value must match the number of characters following it in order for it to display on the front end of your site.