[wp-hackers] Proposal: standardize plugin-data path

Stephen Rider wp-hackers at striderweb.com
Wed Oct 1 16:23:17 GMT 2008


On Oct 1, 2008, at 11:16 AM, Otto wrote:

> I don't see how that would help much, as the URL would still be wrong
> for the uploaded images and such in the posts themselves.

Okay, so we add WP_UPLOADS_URL also.  And/or WP can figure it out  
automatically by subtracting the web root from WP_UPLOADS_DIR

> Anyway, if you want to override the upload directory, just stick a
> filter on upload_dir. It gets an array of URLs and paths and
> everything related to that.

Which doesn't work in the example I described -- copying the live  
database to a test setup.  If I have to activate different plugins it  
complicates things.

A CONSTANT override for the uploads folder is every bit as useful as  
an override for wp-content, which we already have.  :)

Stephen

> On Wed, Oct 1, 2008 at 11:13 AM, Stephen Rider
> <wp-hackers at striderweb.com> wrote:
>> Okay, I see.  I wasn't registering that I could set a hard server  
>> path.  I
>> guess that works.
>>
>> In line with other such settings, could we add the ability to set
>> WP_UPLOADS_DIR in wp-config.php?
>>
>> I like these constants in particular because they help me with  
>> testing -- On
>> my local test copy of the site I can use a copy of the live  
>> database and
>> just override to local test paths.  There are other uses as well.
>>
>> Stephen
>>
>>
>> On Oct 1, 2008, at 10:43 AM, Stephen Rider wrote:
>>
>>> It's NOT relative to the web root, that's the problem.  It's  
>>> relative to
>>> ABSPATH.
>>>
>>> On Oct 1, 2008, at 8:18 AM, Otto wrote:
>>>
>>>> I don't see any problem with leaving the uploads folder relative to
>>>> root, since it is an explicit setting that the user can specify. In
>>>> the settings page, it states that the default is wp-content/ 
>>>> uploads,
>>>> which is a ABSPATH relative path.
>>>>
>>>> I mean, what if you want the upload folder to be at
>>>> example.com/wp/uploads/ instead? That's not relative to the wp- 
>>>> content
>>>> folder.
>>>>
>>>> If you want it to be in wp-content and you move wp-content, then  
>>>> you
>>>> need to move the upload folder location as well. It's already  
>>>> custom,
>>>> we don't need to make it confusingly custom.
>>>>
>>>>
>>>>
>>>> On Wed, Oct 1, 2008 at 7:23 AM, Stephen Rider <wp-hackers at striderweb.com 
>>>> >
>>>> wrote:
>>>>>
>>>>> It appears that the upload folder setting is parsed relative to  
>>>>> ABSPATH,
>>>>> rather than web root.  So, if I move wp-content out of the wp  
>>>>> folder,
>>>>> it's
>>>>> then impossible to set the uploads folder to be in wp-content...?
>>>>>
>>>>> Site is at example.com, but WP files are at example.com/wp.
>>>>>
>>>>> Contents folder is example.com/wp-content.
>>>>>
>>>>> Setting uploads folder to wp-content/uploads, that ends up  
>>>>> pointing to
>>>>> example.com/wp/wp-content/uploads/.  I want it to point to
>>>>> example.com/wp-content/uploads/ instead....
>>>>>
>>>>> We've abstracted everything else so that people can move  
>>>>> everything
>>>>> custom
>>>>> (wp-content, wp-config.php) out of the folder with the actual WP  
>>>>> files
>>>>> (which makes updates soooooo much better thanks).  It appears we  
>>>>> need to
>>>>> do
>>>>> the same for the uploads folder.
>>>
>>> _______________________________________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list