Support » Networking WordPress » Mutisite images break after upgrade to 4.9.x

  • d219web


    I currently have a wordpress multisite running 4.8.3. I have the multisite setup by folder, not subdomain, as the subsites are just an extension of the main site. The last couple of months, when I try to upgrade my multisite to wordpress 4.9.1, 4.9.2, or 4.9.4 the images for my main site are broken as the image path changes with the upgrade. For instance, the url path for one of our images is After the upgrade, we lose “…/sites/1…” in the middle of the path name, making the the image path –, which doesn’t exist. This is the case on the front end and in the admin as all of the thumbnails in the Media Library and other areas display as blank images.

    The upgrade seems to only affect the main site (site 1), as the images for the subsites still work fine and the image path for those do not change keeping the url structure the same as in version 4.8.3.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    I just made an installation of 4.8.3 and enabled multisite just for the sake of testing, but on my installation the main site doesn’t use a subfolder for images.

    The main site is always like /wp-content/uploads/year/month and the first subsite goes into /sites/2/ so /sites/1/ isn’t even created here. That being said the update from 4.8.3 to 4.9.4 worked without issues as well.

    Maybe you had set yourself the upload folder or changed the Upload URL of your main site to /sites/1 ? Theses options would be under Network Admin -> Sites -> Select the base site -> Settings -> Upload path & Upload URL Path, and it somehow got reverted to blank resulting to not finding the correct folder ?

    Make sure to keep full backups before going on with any changes.

    Thanks for your reply and your help confirming. After your post, I did the same thing and created a fresh install with a multisite installation starting with version 4.7. I then upgraded to 4.8.3 and then to 4.9.4 and all throughout, my main site has a similar path as you described – /wp-content/uploads/year/month.

    I ended up copying all the files within “/wp-content/sites/1/uploads/” over to “wp-content/uploads”. Then I upgraded to 4.9.4 and the sites was working and displaying all the images. At that point, I changed all instances of “/wp-content/sites/1/” to “/wp-content/”. After that, I searched all files (and subfiles) within the “wp-content” directory that referenced “/wp-content/sites/1/” and changed them all to “/wp-content/”. Finally, I zipped all the files within the “/wp-content/sites/1/” and then deleted them to make sure nothing was referencing them and everything seems to be working for over a week now.

    I’m not sure what happened causing the main site to put everything in …/sites/1/ as we didn’t manually change anything, but going through those steps above seemed to put everything back the way it should be.

    We have the same problem after an upgrade. But ours is not as consistent as yours. Some images are broken, others not. Some use /files/ in the image path and break, others use /files/ in the path and don’t. Others use wp-content/uploads in the path. We’ve been trying for days to get this resolved and so far no luck. We tried inserting new images into a post and some work, some don’t.

    Our uploads are getting uploaded to both /wp-content/blogs.dir/3/files and wp-content/uploads. I don’t know why.

    What do you mean you searched for all files and subfiles that referenced sites/1/? WordPress doesn’t store pages and posts in files you can access. It’s all in the database. I’m confused by what you mean. Are you referring to scripts?

    Here are examples of broken and not-broken images as they display or break in the browser:

    Sexteto Di Sarli

    Dancing at Escuela de tango de Buenos Aires - Marcelo Solis - Milonga

    El bulín de la calle Ayacucho. Argentine music at Escuela de Tango de Buenos Aires.



    José García. Argentine music at Escuela de Tango de Buenos Aires. Collection Marcelo Solis.



    El irresistible. Argentine music from Marcelo Solis collection.

    No way to edit comments here I guess, so let me try again. What I posted rendered the images and took out the code I wanted you to see. So I will have to share a picture instead.
    Screen Shot 2018-04-27 at 7.24.12 PM.png
    Screen Shot 2018-04-27 at 7.24.20 PM.png

    I just discovered something. We can’t get images to work in pages either UNLESS we are using our BUILDER (Yootheme pro). Here is a test page I did with the builder:

    At the top you see the image that breaks when I try to add it to a post. The path to that image HERE is /marcelosolis/wp-content/uploads/Bailando-con-Margaret-test.jpg IT’s NOT ABSOLUTE and it always works. In the post though, it makes one of the paths that you see in the picture in my previous comment.

    So the builder is doing something right when it makes image paths. WordPress is not.
    As it stands we can’t add images to our posts or pages without the builder. This is a serious problem.

    I should add that in our test site, we turned off all plugins and reverted back to the default theme and it still wouldn’t work.

    @xkon I don’t see an option to change upload paths when I look under the settings for the site. This site is hosted by Flywheel which is a dedicated WordPress host. Is it possible they disabled that?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Mutisite images break after upgrade to 4.9.x’ is closed to new replies.