Creating subdomain for wordpress images is best way to increase your wordpress download speed. Many shared hosting and wordpress bloggers and websites are using the apache webserver for hosting the wordpress sites. Aapache Webserver is having his own rules and behavior. By default when you open webpage of your website. That time you are making so many requests to apache web server with same domain name. That will create queue to apache webserver with same domain name.
For reducing the load time you should keep image file on different subdomain. Means though image subdomain you can send parallel request to Apache webserver. It will reduce the concurrent connections to webserver. WordPress provides the functionality to set different domain or subdomain for images.
In this article I will show you how easily you can set the wordpress images from subdomain. First create subdomain through your control panel. Use following step for creating subdomain.

I recommend to create the images subdomain because images subdomain is good for SEO. Here I created the wordpressapi.com/files/ subdomain for my images. Then set your wordpress images path in document root setting. Normally your wordpress images are stored in wp-content/uploads directory. You can use following setting for setting the document root.

After creating subdomain for images and setting up the correct document root for images subdomain. Go to your wordpress admin panel. From right side panel you should go to settings -> Media panel. This page will look like as follows:

In “Full URL path to files” textbox put your image subdomain name and click on save changes button. Uncheck the organize my uploads into month- and year-based folder option because which is not good for SEO purpose.
After this your images will came from image subdomain but old uploaded image files will still come from older location and same domain. For changing the older images file location and domain information you should use the following steps.
Go to your Mysql databases and select the your wordpress database. You can use the phpmyadmin sql manager for this or you can use command prompt for this if you are having dedicated hosting server. If you taken shared hosting then I recommend to use PhpMyAdmin.
Use following two SQL query: (Note: You should use your images subdomain and your domain name in SQL query)
UPDATE wp_posts SET post_content = REPLACE(post_content,'http://images.wordpressapi.com/','http://images.wordpressapi.com/'); UPDATE wp_posts SET guid = REPLACE(guid,'http://images.wordpressapi.com/','http://images.wordpressapi.com/');
After this your old images files will point to images subdomain. If your images and wordpress website is old then google and other search engines already indexed your images. So We need to write the redirection rewrite rule for images in your .htaccess file. This file you will find in your Root directory of wordpress installation.
Use following line of code in your .htaccess file.
RewriteEngine On RewriteBase / RedirectMatch 301 ^/wp-content/uploads/(.*)$ http://images.wordpressapi.com/$1
Above all steps are important to change the wordpress images into images subdoamin. If you are having any issues or questions about this article. Then please write to me.
Incoming search terms:
- wordpress images subdomain
- host images of wordpress blog in a subdomain for better speed
- wordpress images and theme files on subdomain
- setting wordpress images to subdomain
- serve wordpress themes from a subdomain
- Separate domains and sub domains upload images in WordPress
- parallelize domain wordpress nginx
- load theme images from subdomain
- how to use wordpress
- wordpress images subdomains






However thank you for this blog.I will are available back again.
but .from now on ,i know that ,there have some one good care of the comment which have useful information.
but .to any extent further ,i know that ,there still need someone proper care of the comment which have helpful information.
Agreed. This was my First time to your blog. Thanks for sharing . I have to bookmark this website. I was a home stlist for a while. Our home decorating hint of the century is: Don’t overclutter a home. Room flow is required. Until next time!!
This is more update from my side for wordpress mu users. use the following mysql query.
UPDATE wp_posts SET post_content = REPLACE(post_content,’http://wordpressapi.com/files/','http://images.wordpressapi.com/‘);
UPDATE wp_posts SET guid = REPLACE(guid,’http://wordpressapi.com/files/','http://images.wordpressapi.com/‘);
and use the document root as follows
domainname.com/wp-content/blogs.dir\1\files
For wordpress mu users, if you are having any issues then get back to me.
Good article, thanks! Could you tell me about the second paragraph in more detail?
Thanks for this useful article. I just want to ask if you want to load theme images from subdomain, what SQL query should i place?
Best Regards
This is very nice tutorial for images subdomain in wordpress.The future is very help for page speed(Parallelize downloads across hostnames).
Thank you very much.
Regards,
Kannan.
thanks for comment.