Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

If I go in Dashboard -> Settings -> Media I don't see field where I can change upload folder. Is it possible now? For example my website is myblog.tld, by default all media content uploads into wp-content/uploads/year/month. I want uploads all media to sub.myblog.tld/year/month

Thanks for advance.

PS WP 3.5, Sorry for my english.

share|improve this question
    
What is sub.myblog.tld? is it another server, another directory on your server-root? –  Pontus Abrahamsson Jan 4 '13 at 15:01
    
Oh, I don't understand your questions.. Sorry. I use as subdomain subdomain.myblog.tld, not myblog.tld/subdomain/. Similar google.com and subdomain is plus.google.com. –  user15194 Jan 4 '13 at 15:16
    
Is the subdomain sub.myblog.tld on the same server as myblog.tld ? –  Pontus Abrahamsson Jan 4 '13 at 15:22
    
Yes, on the same server. –  user15194 Jan 4 '13 at 15:29
add comment

1 Answer

up vote 0 down vote accepted

In WordPress we can change the default location of the wp-content folder by defining a couple constants in wp-config.php about it here on Codex

So if the structure on the server looks like this:

/root/
 1. myblog.tld - its own directory
 2. sub.myblog.tld - its own directory 

You can use this in your wp-config.php:

define( 'WP_CONTENT_DIR', dirname( $_SERVER['DOCUMENT_ROOT'] ) . DIRECTORY_SEPARATOR . 'sub.myblog.tld' );
define( 'WP_CONTENT_URL', 'http://sub.myblog.tld');

It will change the upload dir to the one above the current root (myblog.tld to sub.myblog.tld). And the content-url will be sub.myblog.tld

share|improve this answer
    
Oh, yeah, how I could forget about wp-config.php? Thank you very much! –  user15194 Jan 4 '13 at 15:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.