Opened 17 years ago
Closed 11 years ago
#11642 closed enhancement (maybelater)
Allow to define upload path and url in wp-config.php
| Reported by: | sirzooro | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Upload | Version: | 2.9 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
Description
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)
#2
@
16 years ago
- Milestone 3.0 → Future Release
UPLOADS is not always the best idea. I'd like the url to be media.example.com/www (on amazon s3) for www.example.com (on my server).
Punting pending patch, though.
#6
follow-up:
↓ 7
@
12 years ago
- Resolution → invalid
- Status new → closed
This option does not exist anymore on the Settings page.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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; }