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


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.

Your Answer

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

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