Normally, when you upload a file on wordpress, it is stored in the default addresses looks like
http://www.webmastersun.com/blog/wp-content/uploads/2014/01/advertise-on-webmastersun-forum.png ( I got image file url from webmastersun.com blog for example
)
Now you want to change file upload path, the path it takes the form of subdomains, ie, how do uploads.domain.com/your_file_name.jpg
Requirements to accomplish this:
- Your hosting support to create subdomains and change the root directory of the subdomain
- Subdomains and main domain on the same hosting
How to do
Download and install the
WP Plugin Original Media Path
After installed. Access Settings -> Media
At Store uploads in this folder setting is wp-content/uploads
At Full URL path to files setting is
http://uploads.domain.com
Log In to create a subdomain Hosting
Create a subdomain in Cpanel as follow information, remember to replace yourdomain.com to your real domain.
Subdomain: yoursubdomain.yourdomain.com
Document root: public_html/wp-content/uploads/
Ok now you can check to see your images stored via sub domain.
Benefits when moving wordpress uploads folder to a subdomain
- Create professional URL
- Easy to use CDN services for subdomain to cache static files (images, css, js, video ...)
- Web acceleration by reducing transmission of unnecessary cookies
All information above I showed you above. You just change to your url on your website.
Hope it helps!