Wordpress server image from subdomain

wordpress – serving images from subdomain

Why to server images from subdomain

While Hosting our images on our own webhosting, this is default in wordpress powered websites. while counting the request (this is the http request sent to the server shortly lesser the request the better the performance. This will be dividing the request to multiple domains) specially in wordpress is challenging due to using multiple plugins. So to overcome this we can server images using the subdomain. Which is quite very effective. When the domain will serve only 5-6 parallel request at a time. if there are two domains, it will be serving 12 request at a time, thats why the preformance will be far far better. To split this requests thus more domains are used.

There are steps by step explained below.

Create Subdomain from Cpanel

First of all create the subdomain. Here i have created the cdn.jumsum.com
i. Login to Cpanel, browse the subdomain as shown in the image.
ii. Create subdomain choosing the folder and subdomain name, here i have used the cdn as subdomain part and given the absolute path for the upload folder.

Assign subdomain as image hosting domain path

Now login to the wordpress cms, explore the option page, for you

There you will view all the variables stored on database while its been installed. Just insert the upload path as wp-contents/uploads and upload url path as https://cdn.jumsum.com so where you will use your own subdomain.

Now its done, now upload one image and get its path, all the images now you upload will be in the subdomain.
More Information regarding TLD domain and subdomain visit here

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.