Image paths are not updated upon migration

I am trying to migrate my site wp***ef.ca. I transferred all the images of one of the subsite in wp***ef.ca called ki******do.com.
The relative paths on the previous server were "/files/..." but they are "/wp-content/blogs.dir/<sub site id>/files/" and this is not being re-written automatically. This causes missing images on the site.

Can someone please assist.

  • Predrag Dubajic
    • Support

    Hi WP Chef,

    Can you tell me how did you migrate your site to our server, did you use our Shipper plugin or some other method?

    From what I can see you have this network installed for quite some time because blogs.dir was used way back in multisite as that folder structure has been changed a long time ago.
    Is your source site running on the same WP version that you migrated to?

    I wrote to your other ticket about sending us access details to your site, can you please include URL to this ticket in there as well so we can check it out further.

    Best regards,
    Predrag

  • WP Chef
    • Site Builder, Child of Zeus

    Hey Predrag Dubajic , the heat is on here... all the websites are broken so I'm going to have to roll back to the old server. This is taking way too long... Vahgan confirmed that the credentials I provided work just fine so I don't know why you're having issues... I get the feeling there are too many cooks in the kitchen.

  • Predrag Dubajic
    • Support

    Hi WP Chef,

    I'm sorry to hear that you had to switch back to old host, we are still in Beta and a lot of stuff is going on behind the scenes which may affect our response times as well but we're working on improving this as well.

    Hopefully, you will give it another try later on and get a better experience.

    Not sure why the login didn't work for me, I tried it a couple of times and failed each time, perhaps some browser issue.
    About the email, your account is registered with epkhosting domain email and that's where our responses are being sent to.
    I would suggest changing your email so you don't miss any emails from our system due to inbox issues.

    Best regards,
    Predrag

  • WP Chef
    • Site Builder, Child of Zeus

    Predrag Dubajic I have cleared my inbox so notifications should be received without issue now. My apologies for the oversight, thanks for bringing that to my attention. I'm keeping the site pointed to the old host until these issues are resolved on WPMUdev at which point I will re-point DNS to WPMUdev.

  • WP Chef
    • Site Builder, Child of Zeus

    Predrag Dubajic I have pointed the wpchef.ca back to the wpmudev host but we have a limited window here. I have also found this article which might help: https://codex.wordpress.org/htaccess

    This multisite is very old... probably WordPress MU (before Multisite) which means that all subsite uploads website o wp-content/blogs.dir/ID/files/

    With HTACCESS there was a rewrite rule so that image paths would appear to be domainname.com/files/year/month/filename.png

    I have tried every version of the HTACCESS rewrite rules but I get the feeling there is a server-side cache that is getting in the way of things.

    I have also updated the image paths within the database using find/replace but the paths are still the same in the front-end source code.

    See here: https://wpmd.help

    Patrick Cohen is the man who fixed the image paths on EPKhosting.com and after re-reading his email all he had to do was add a trailing slash to the paths found within the wp_blogs table

    I have compared the EPKhosting.com database with the WPchef.ca database and matched the format of EPKhosting.com but still nothing.

    I hope these insights help. Perhaps we can ping Patrick for help?

  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hi WP Chef ,

    I've checked your multisite but the images that I spotted in your Media files are actually missing their physical files and that's why they're not showing up.

    Unfortunately since we didn't make the migration ourselves there's no way to know what steps you've taken exactly already and if everything was done properly.

    What I could suggest is to help you by starting fresh. Is there a possibility of providing me of a full backup of your old multisite that you wanted to migrate so I can set it up and convert it from a blogs.dir to a newer version + to a subfolder installation as well and see what the issues might've been ?

    Regards,
    Konstantinos

  • WP Chef
    • Site Builder, Child of Zeus

    Hello Konstantinos Xenos

    I have rolled back the install to the first backup before my migration. I have created a zip file of the old website with all files, content and db.

    The zip file is located within a folder called /migration/ found within the root of the installation. The zip file contains the mysql.sql file within /wp-content/

    Let me know if you require anything else. Thanks for jumping in.

  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hi WP Chef ,

    I've converted your multisite into a subdirectory and the images should now be working properly.

    Some notes, since the site was converted into a subdir and it's working with the old MS way of keeping the files into blogs.dir there where more modifications and conversions needed to make it properly work.

    You will have to re-active Domain Mapping to re-map your domains whenever you're ready and any plugin again that had a license bound to a domain if that domain has changed. I had to disable mapping to be sure that all sites where converted to sub-directories as well.

    On an extra note some subdomains that you had I saw on their options that had 2-3 different urls bound to them for uploading files, url used and actual subdomain. I'm not sure why this was the setup but I've tried to adjust everything, I'm mentioning this just in case you see any hiccups you should check yourself as well since you know the subsites better that all the urls on their settings are as you want them to be.

    Tell us if you need any further help.

    Regards,
    Konstantinos

  • WP Chef
    • Site Builder, Child of Zeus

    Konstantinos Xenos thanks for the help mate. Looks like we've made progress, however, when I enabled domain mapping all the image paths break again. Take the WPMD.help site for instance.

    Here is an example of the image file path without domain mapping:
    https://wpchef.wpmudev.host/wpmd/files/2013/08/wpmd-front.png

    Once I enable domain mapping it goes back to:
    https://wpmd.help/files/2013/08/wpmd-front.png

    Something tells me there is a mod-rewrite rule missing. It's the domain mapping plugin provided by WPMU.dev so hopefully someone on the support team has an idea of what's going on here.

    It doesn't even look like there is an .htaccess file on the new server
    I have uploaded an htaccess file removing junk that wasn't needed from the old server

    I have also referrenced this article on how to configure the htaccess file but I'm not sure one to reference (they all various options of various version of WordPress)

    https://codex.wordpress.org/Multisite_Network_Administration

    Please advise.

    • Konstantinos Xenos
      • Rubber Duck Debugger

      Ah thank you for checking and for the extra information.

      I'll pass it on our Sysadmins so they can work on that. Since we're still on Beta there hasn't been a full-scoped "blogs.dir" support yet since that's the "old" way of having multi-sites ( no idea why so many hosts use that nowadays even with the 1click install scripts to be honest ).

      Please leave the domain mapped as is so we can check it out.

      As for the .htaccess, we're using Nginx so there's are no .htaccess files used, that's for Apache servers.

      I'll get back to you as soon as possible with any news !

      Regards,
      Konstantinos

    • Konstantinos Xenos
      • Rubber Duck Debugger

      Hey WP Chef ,

      As I've mentioned we're still fixing and shifting things around since we're still on Beta. So some edits on our end at the servers configs should be made to fully support the older MS. As for the .htaccess yes you can rename/remove it as it's not read by the system at all since we're utilizing nginx.

      Regards,
      Konstantinos

  • WP Chef
    • Site Builder, Child of Zeus

    Konstantinos Xenos it appears the problem has returned. the only thing I can think of as a possible cause is that the old server was recently shut down or something on the WPMUdev host has changed affecting mod-rewrite or domain mapping. I have tried disabling the domain mapping plugin to see if the media libraries would display images on the child sites but they still aren't displaying.

    Please advise.

  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hey WP Chef ,

    Sorry for that small "step-back", we finalized our implementations today regarding 'blogs.dir' to fully support the older method of uploads in Multisites. Everything should be working properly now. I'm also happy to inform that these changes should now also be applied to all hosting environments by the end of the day so there shouldn't be any other hiccups in the future about this on newly creating hosts as well.

    Don't hesitate to tell me if there's any extra issues in the future so we can resolve them asap!

    Regards,
    Konstantinos

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.