The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Moved sites from multisite network a to b and now images are broken (5 posts)

  1. Jesse Friedman
    Posted 2 years ago #

    Here's a weird problem.

    I moved a few sites from Multisite instance A to Multisite instance B. I did this through the database and made sure nothing changed but the url from subdomain.domain.com to subdomain.domain2.com

    I ftp'd down the blogs.dir files and ftp'd them back up on the new server. Everything works find except the link to featured images.

    On the Multisite instance A the url output by WordPress to the featured image is:

    On the Multisite instance B the url output by WordPress to the featured image is:

    notice the extra /sites/121 in the url.

    I checked the upload path under Network -> Sites -> and they are exactly the same

    Also I noticed that WordPress or something is creating the following directories sites/121/2013/11 even after I delete them.

  2. Jesse Friedman
    Posted 2 years ago #

    Now that I think about it, blogs.dir should be hidden at all times right? What might be a reason it's showing on the front end?

  3. Jesse Friedman
    Posted 2 years ago #

    So it looks like the files are displaying with the url http://subdomain.domain.com/wp-content/blogs.dir/121/files/2013/05/benefits.jpg because the upload path explicitly says: wp-content/blogs.dir/121/files

    When I remove it, the img src becomes


    The images still don't link properly and we still see the 121 site id in the url.

    Any ideas?

  4. So the problem here is that your OLD install probably started its life as a pre WP 3.5 version of Multisite.

    The new install started on 3.7 (guessing there, but if it was 3.5, 3.6 or 3.7, it's the same thing).

    In 3.5, we changed where images are stored.

    http://subdomain.domain.com/wp-content/uploads/sites/121/2013/05/benefits.jpg is what the files SHOULD live in.

    Easiest fix? Search/Replace the wp_x_posts tables and change wp-content/blogs.dir/121/files to wp-content/sites/121 in your post content. Should take care of it.

  5. Jesse Friedman
    Posted 2 years ago #


    Thank you for your wonderful insight. That solved the problem.


Topic Closed

This topic has been closed to new replies.

About this Topic