Make WordPress Core

Opened 6 weeks ago

Last modified 4 weeks ago

#63397 new enhancement

Harder Deprecate ms-files.php

Reported by: jorbin's profile jorbin Owned by:
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: Site Health Keywords: has-patch 2nd-opinion
Focuses: multisite Cc:

Description

The legacy ms-files.php handler was introduced during the early days of WordPress Multisite to manage media uploads in a centralized way. However, it has been disabled by default since WordPress 3.5 in #19235.

One thing that #63285 shows is that few, if any, sites that still use this are testing pre-releases. In order to ensure that these sites have the best experience possible, it is time for a harder deprecation.

This deprecation should:

  1. Ensure stability for the networks that haven't been able to move off this legacy file handler.
  2. Help contributors to WordPress make decisions that support 1.
  3. Inform site owners so that they can migrate off this legacy file handler.

Change History (8)

#1 @jorbin
6 weeks ago

I think the solution is 3 parts:

  1. Create documentation on WordPress.org about how to migrate off ms-files.php. Right now, @ipstenu's article https://halfelf.org/2012/dumping-ms-files/ is the best resource.
  1. Add inline documentation to the top of ms-files.php that warns contributors to be careful and also makes clear that only PHP compatibility and security related changes should be made to this file.
  1. Add a site health notice for sites still using ms-files.php

This ticket was mentioned in Slack in #core by jorbin. View the logs.


6 weeks ago

This ticket was mentioned in PR #8775 on WordPress/wordpress-develop by @ankitkumarshah.


6 weeks ago
#3

  • Keywords has-patch added

#4 follow-up: @MadtownLems
6 weeks ago

As one of the people who's still running hundreds of sites on 16 year old networks, I'll share some thoughts.

We'd love to move off of ms-files.php! However, I've investigated it several times over the years, and for large, established networks, it feels like a behemoth of an operation that I've been nervous to attempt (and up until 6.8, really had no reason to).

The deprecation patch points to this article (https://halfelf.org/2012/dumping-ms-files/), which is the most popular and one of the best guides out there, from an incredibly knowledgeable WordPress developer. And yet, even that contains:

"I got about 90% successful with it"
"For most sites, this worked, but in my later work, I determined that it actually wasn’t working. It was ignoring this. I don’t know why"
"Any weird problems? Yeah, two sites"
"I swear I have no idea why three sites got stuck"

I'm not opposed to the idea of ending support, but really want to emphasize @jorbin's point 1 about preparing some more polished information about how to do this successfully. Bonus points for a plugin that does any parts of it.

few, if any, sites that still use this are testing pre-releases.

I'm very active in testing and reporting issues with pre-releases. However, we're in the awkward spot where only our Production multisites still use ms-files.php. We moved hosts several years ago, and decided to start our dev/test environments on a clean slate (but still using the same codebase, of course). I didn't realize at the time that meant we'd be serving files completely differently and how important that would come to be. I imagine others who still use ms-files.php might be in a similar situation, contributing to the lack of sufficient testing.

If anyone working on this wants to connect more about this, feel free to reach out on WP Slack (@madtownlems)!

#6 @ankitkumarshah
4 weeks ago

  • Keywords needs-testing added

Hi @jorbin,
I’ve opened a PR with a proposed solution. I’d really appreciate it if you could take a look when you have a moment. Thank you!

#7 in reply to: ↑ 4 @SirLouen
4 weeks ago

Replying to ankitkumarshah:

Hi @jorbin,
I’ve opened a PR with a proposed solution. I’d really appreciate it if you could take a look when you have a moment. Thank you!

At this point, I still think this is a philosophical topic to be discussed before proceeding with code changes and time-wasting code-testing. This is a big thing, I would suggest you to introduce this in a dev-chat to start conversation around this and see which would be the common opinion on which will be the ideal code-proposal. For this reason, I will be switching needs-testing for 2nd-opinion (not even needs-test-info because as I say, here we need for now more opinions than definitive actions).

Moreover, I find interesting giving a second thought to this part, before taking more action:

Replying to MadtownLems:

I'm not opposed to the idea of ending support, but really want to emphasize @jorbin's point 1 about preparing some more polished information about how to do this successfully. Bonus points for a plugin that does any parts of it.

#8 @SirLouen
4 weeks ago

  • Keywords 2nd-opinion added; needs-testing removed
Note: See TracTickets for help on using tickets.