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.

  • What is sub.myblog.tld? is it another server, another directory on your server-root? 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 ? Jan 4 '13 at 15:22
  • Yes, on the same server.
    – user15194
    Jan 4 '13 at 15:29

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:

 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

  • Oh, yeah, how I could forget about wp-config.php? Thank you very much!
    – user15194
    Jan 4 '13 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy