Change default uploads file using wp Skeleton

I am using WordPress Skeleton (https://github.com/markjaquith/WordPress-Skeleton) which pulls the themes etc out of the wp directory. I am trying to set it up so uploads have a custom url (eg: site.com/custom/url instead of site.com/uploads).

var_dump(wp_upload_dir()); 

Gives me:

array
    'path' > '/file/system/path/www/wp/core/assets/2014/08'
    'url' > 'http://site.local:8888/wp/core/assets/2014/08'
    'subdir' > '/2014/08'
    'basedir' > '/file/system/path/www/wp/core/assets'
    'baseurl' > 'http://site.local:8888/wp/core/assets'
    'error' > false

The Codex says:

This path can not be absolute. It is always relative to ABSPATH, therefore does not require a leading slash.

Is there any way to remove the wp from the url and baseurl while moving the path to a different directory?

Like this:

array
    'path' > '/file/system/path/www/core/assets/2014/08'
    'url' > 'http://site.local:8888/core/assets/2014/08'
    'subdir' > '/2014/08'
    'basedir' > '/file/system/path/www/core/assets'
    'baseurl' > 'http://site.local:8888/core/assets'
    'error' > false

Note: although they are the same in the example, the path and url may be different ().

EDIT:

I forgot to mention I am currently using this to set the path in wp-config:

define( 'UPLOADS', 'core/assets' );

so I want to remove /wp/ from it (the subfolder where WordPress is).

0

Leave a Comment