[wp-trac] [WordPress Trac] #54582: Problem with deleting old files at the end of a core update when the filesystem is case-insensitive

WordPress Trac noreply at wordpress.org
Mon Jul 7 17:32:23 UTC 2025


#54582: Problem with deleting old files at the end of a core update when the
filesystem is case-insensitive
-------------------------------------------------+-------------------------
 Reporter:  pbiron                               |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  high                                 |   Milestone:  Future
                                                 |  Release
Component:  Upgrade/Install                      |     Version:
 Severity:  major                                |  Resolution:
 Keywords:  early early-like-actually-early      |     Focuses:
  has-patch has-test-info dev-feedback           |
-------------------------------------------------+-------------------------

Comment (by iamadisingh):

 == Test Report
 === Description
 This report validates whether the indicated patch works as expected.

 Patch tested: https://github.com/WordPress/wordpress-
 develop/pull/3842.diff

 === Environment (Case Insensitive, mac os)
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.27.3
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 138.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-Five 1.2
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Actual Results
 1.  ✅ Issue resolved with patch.

 === Additional Notes
 - Testing validates the patched _cleanup_old_files() function successfully
 handles case-insensitive filesystem conflicts that occur during WordPress
 core updates.

 - Test methodology: Applied the patch to WordPress core and tested the
 modified function against simulated update scenarios where filenames
 change case (e.g., IRI.php → Iri.php).

 - Before patch: WordPress would delete both old and new files during
 updates on case-insensitive filesystems, causing fatal PHP errors.

 - After patch: The modified `_cleanup_old_files()` function correctly
 detects case conflicts and preserves essential files.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54582#comment:63>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list