Grow your CSS skills. Land your dream job.

WordPress Move to New Domain & Server. Image Thumbnail Fail.

  • # March 8, 2012 at 2:37 pm

    So I migrated my WordPress site from the staging domain to the actual site domain. Everything migrated just fine with no problem except for the image thumbnails on the bio pages for the artists. Can someone help troubleshoot this?

    Here’s a page on the staging URL: http://studio7.greenflagseo.com/artists/dorothy-cavanagh/

    Here’s the new page URL with the fail: http://www.studio7gallery.com/artists/dorothy-cavanagh/

    I migrated the site with the WordPress Move plugin to assist me.

    Thanks!

    # March 8, 2012 at 3:01 pm

    The URL is wrong for the images.

    It’s trying to hit:

    /home/content/54/9070554/html/wp-content/uploads/2012/02/Summer-Asters-Limes-117477_260x170.jpg

    Instead of:

    /wp-content/uploads/2012/02/Summer-Asters-Limes-117477_260x170.jpg

    The images have uploaded fine, you’re just pointing to the wrong place. Try using Velvet Blues Update URLs to change them all: http://wordpress.org/extend/plugins/velvet-blues-update-urls/

    # March 8, 2012 at 5:11 pm

    Hey Doc,

    Thanks so much for pinpointing that problem, I feel dumb for missing it :).

    I’m not having any luck getting the Velvet Blues plugin to pick up any of my URLS, I tried a few variations. Do you know of any other methods to search and delete that string of characters in the URL that I don’t want?

    Thanks!

    # March 8, 2012 at 6:55 pm

    You could go through phpMyAdmin, but I’m not 100% sure on the instructions.

    # March 9, 2012 at 1:07 am

    Hmm…yea I’ve been trying to use the Search and Replace plugin for WordPress which apparently allows you to do so. I’m just not sure where this actual URL string is located in the database table. I’ve read that images are saved in the wp_posts and the posts_metadata tables, but not exactly sure to manipulate them.

    If anyone is more familiar with MySQL please chime in!

    # March 9, 2012 at 1:29 am

    Basic code


    < ?php
    $your_db = 'your_db';
    $your_host = 'localhost';
    $your_access = 'root';
    $your_pass = 'password';

    $old = 'your/path/';
    $new = 'your/new/path/';

    $con = mysql_connect($your_host,$your_access,$your_password);
    mysql_select_db($your_db , $con);

    $get_all = mysql_query("SELECT * FROM your_table WHERE your_column LIKE '%$old%'");

    while($row = mysql_fetch_array($get_all))
    {
    mysql_query("UPDATE your_table SET your_colum=$new WHERE id = $row");
    }
    ?>
    # March 9, 2012 at 3:42 pm

    Thanks for the help guys, I got it sorted out by doing a string replace in the image call of my customfunctions.php.

    # March 9, 2012 at 4:31 pm

    That’s definitely not the way you should do it. Make sure to make the changes to your database!

    # March 29, 2012 at 2:13 pm

    Hmmm ok I’ll have to do some more digging then. It’s working fine now, but that might just be a hack so I’ll have to ensure that the changes are made in the database.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".