Make WordPress Core

Opened 14 years ago

Closed 9 years ago

#11642 closed enhancement (maybelater)

Allow to define upload path and url in wp-config.php

Reported by: sirzooro's profile sirzooro Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9
Component: Upload Keywords: needs-patch
Focuses: Cc:


When someone wants to move default directories elsewhere, he/she must do work in two places: add defines to wp-config.php and change upload path on settings page. I think it will be good to introduce two new defines: UPLOAD_PATH and UPLOAD_URL_PATH. When they will be defined, WordPress should use them and do not allow to change these on settings page - similarly to home and site url options.

Change History (8)

#1 @sivel
14 years ago

You can define the upload path in wp-config.php, not the url however. The url is decided based on the relative path you provide for UPLOADS. The constant you would use is UPLOADS, and it is relative to ABSPATH.

From the code:

    if ( defined('UPLOADS') ) {
        $dir = ABSPATH . UPLOADS;
        $url = trailingslashit( $siteurl ) . UPLOADS;

#2 @Denis-de-Bernardy
14 years ago

  • Milestone changed from 3.0 to Future Release

UPLOADS is not always the best idea. I'd like the url to be (on amazon s3) for (on my server).

Punting pending patch, though.

#3 @mikeschinkel
14 years ago

  • Cc mikeschinkel@… added

#4 @toscho
12 years ago

  • Cc info@… added

#5 @nacin
10 years ago

  • Component changed from General to Upload

#6 follow-up: @jbkkd
10 years ago

  • Resolution set to invalid
  • Status changed from new to closed

This option does not exist anymore on the Settings page.

#7 in reply to: ↑ 6 @nacin
10 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Replying to jbkkd:

This option does not exist anymore on the Settings page.

Correct, but there is still a need to modify these values. I'm still for a patch here. UPLOADS is pretty lame.

#8 @chriscct7
9 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from reopened to closed

Closing as maybelater. Complete lack of interest on the feature on the ticket over the last 2 years. Feel free to reopen when more interest re-emerges (particularly if there's a patch)

Note: See TracTickets for help on using tickets.