Changing WordPress media location and upload path to sub-domain not working

This will not work the way you are thinking. WordPress will try to upload attachments (images, pdfs, etc) to your server using the UPLOADS constant, this path is a file path, local to the server.


If you wish to use a CDN you can get a CDN service to do this (manage files and upload them remotely to their service) or possibly use a tool like this to rewrite URLs on the fly.

I can’t say how good this plugin is but seems like this could do what you are looking for, upload your attachments to another (remote) server.