[wp-trac] [WordPress Trac] #25449: wp_upload_dir() doesn't support https

WordPress Trac noreply at wordpress.org
Fri Jun 27 15:36:48 UTC 2025


#25449: wp_upload_dir() doesn't support https
-------------------------------------------------+-------------------------
 Reporter:  ryanhellyer                          |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Upload                               |     Version:  3.8
 Severity:  major                                |  Resolution:
 Keywords:  https has-patch needs-refresh        |     Focuses:
  needs-test-info                                |
-------------------------------------------------+-------------------------
Changes (by SirLouen):

 * keywords:  needs-testing https has-patch => https has-patch needs-refresh
     needs-test-info


Comment:

 == Reproduction Report
 === Description
 ❌ This report can't validate that the issue can be reproduced.

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.29.0
 - Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 137.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty-One 2.5
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Reproduction Instructions
 1. Configure an HTTPS WP setup
 2. Add the code in Supp artifacts
 3. Check with the `[upd_dir]` shortcode the results
 4. ❌ In my case these are the results, both happening to have the right
 scheme

  Base URL: https://localhost:8890/wp-content/uploads
  URL: https://localhost:8890/wp-content/uploads/2025/06


 === Actual Results
 1. ❌ Error condition is not occurring

 === Additional Notes
 - I have not reviewed the `wp_upload_dir` code deeply to see what's going
 on and searched to see if any new implementations are solving this
 problem. But at a first glance, I can't see much change. So at this point
 I'm not 100% confident where the issue is. I'm providing a very simple
 code to display what theoretically is not working for me. If anyone,
 reporter of patch submitters can comment on what I'm doing wrong, I would
 be able to further test this.

 - Also patch needs refresh, there is a `$url` variable that doesn't exist
 any more and maybe considering @luigipulcini
 [https://core.trac.wordpress.org/ticket/25449#comment:40 idea] could be a
 good thing (in case this can be again reproducible)

 cc @ryanhellyer @thomaswm

 === Supplemental Artifacts
 Test Code:
 {{{
 function upload_dir_shortcode() {
     $upload_dir = wp_upload_dir();
     return 'Base URL: ' . $upload_dir['baseurl'] . '<br>URL: ' .
 $upload_dir['url'];
 }

 add_shortcode( 'upd_dir', 'upload_dir_shortcode' );
 }}}

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


More information about the wp-trac mailing list