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

WordPress Trac noreply at wordpress.org
Tue Jan 19 20:24:14 UTC 2016


#25449: wp_upload_dir() doesn't support https
-------------------------------------------+------------------
 Reporter:  ryanhellyer                    |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  4.5
Component:  Upload                         |     Version:  3.8
 Severity:  major                          |  Resolution:
 Keywords:  has-patch needs-testing https  |     Focuses:
-------------------------------------------+------------------

Comment (by sharrondenice):

 Another way around this without updating WP core files or other plugin
 files is to update the wp-config.php file.


 {{{

 $protocol       = "http://";
 $domain         = $_SERVER['HTTP_HOST'];

 // If code is on both local and server machines
 if (preg_match("/mymac\.local/", $domain))
     $domain     .= "/~MyMac/www.sharrondenice.com";

 if ($_SERVER['HTTPS'] == 'on')
         $protocol = "https://";

 define('WP_DOMAIN', $domain);
 define('WP_HOME', "{$protocol}{$domain}");
 define('WP_SITEURL', "{$protocol}{$domain}");
 }}}

 This works for me perfectly fine.

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


More information about the wp-trac mailing list