WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In order to parallelize downloads, i created already a subdomain for images. images.mydomain.com

Now, i don't know how to move my media files, without breaking attachments, and after that, in the future, how to automatically store media file in subdomain.

Eventually, what i was thinking of doing was something like , redirect images.mydomain.com to mydomain.com/wp/content/uploads and after that replace all strings 'http://www.domain.com/wp-content/uploads/'with'http://images.mydomain.com/' using the wordpress plugin "search and replace".

Does someone believes to know how to get around this?

thanks in advance

share|improve this question
up vote 1 down vote accepted

You can move the uploads folder to the sub domain by doing this

Open up your wp-config.php file, located at the root of your WordPress installation, and add the following code:

define('UPLOADS', 'http://images.mydomain.com/uploads');

The codex specifies that it should be added before the line that says require_once(ABSPATH.’wp-settings.php’);.

Make sure the uploads folder is writable.

share|improve this answer
Thanks!! It's done! – Bdalte Sep 18 '13 at 11:57

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.