• I have tried to remove the legacy ms-files.php from a multisite with this guide and the script: https://anchor.host/removing-legacy-ms-files-php-from-multisite/
    What this script does it moves all the blogs and files from the blogs.dir to uploads/sites in the wp-contet Folder, it also changes the paths in the database and removes the old ms-files.php entry in the database.
    Now the blogs that were in Blogs.dir are in uploads/sites, and some entries were changed in the Database, but the blog won’t find its old pictures, videos and media anymore unless the blog is directly in uploads and not in uploads/sites in the wp-contet folder.
    In the database I didn’t find where the blogs have a link directly to the uploads and/or to the pictures, videos and media, I think WordPress generates those links by itself. Does anyone have the same problem or had experience when trying to migrate from the old legacy structure to the newer structure?

    (Im am testing on en development Blog that ist a clone of the of the productive Blog.)

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Media URLs within post content are static and are part of the post content data. Media URLs generated by template code should be dynamic, though I’ve seen people hard code URLs on templates. (I may have been looking in a mirror when I saw “people”. I know it’s wrong at least)

    The dynamic URLs should lead to uploads/sites/#/. The script you used uses wp-cli to update the static URLs in content, but that could have failed for any number of reasons. If media in uploads/ works, but not uploads/sites/#/, it apparently failed, or the static URLs were not correct to begin with (they were always in uploads/ and not files/

    You could use a plugin like Better Search and Replace to correct errant URLs in content. You’d need to work one site at a time to get the right ID in each site. Hopefully you don’t have too many sites.

Viewing 1 replies (of 1 total)

The topic ‘Removing Legacy ms-files.php from Multisite’ is closed to new replies.