3

Setup a sub-domain for WordPress media files

If you want to Setup a sub-domain for WordPress media files, this is the best way to reduce the server load media files are fetched from one location and the content is fetched from another location. First of all setup the sub-domain for your website, And ask your webhost the full path to your web directory on server.

Steps to Setup a sub-domain for WordPress media files

  1. From the WordPress admin panel, navigate to Settings-> Media.
  2. From under the Uploading Files, change the Store uploads in this folder to the directory location on your server.
    Setup a sub-domain for WordPress media files
  3. And other one Full url path to file is the subdomain like
    http://sub.maindomain.com

After that few hours all media links are located to the new location,

Note: You have to manually move the media files to new location.

Vivek Vengala
 

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 3 comments
Jonathan

I personally use a CDN to serve up all images to begin with, so it’s never an issue. I have everything setup as a /media/ folder, rather than /wp-content/uploads/

Reply
Tran Ngoc Tuan Anh

Can WordPress upload files to sub domain after configuring? Does it have any way to work remotely in case the sub domain is not in the same server?

Reply
    Vivek Vengala

    Yes, after completing the setup WordPress can be able to upload media files directly to sub domain…
    For the remote server also it will work, I will write a complete post regarding setting up sub domain on a different server…

    Reply

Leave a Reply:

x

Join My Facebook Group to Receive Coding Tutorial for Free

email-subsribe