Friday, August 21, 2020

Host Images Of WordPress Blog In Subdomain

Host Images Of WordPress Blog In Subdomain Make Money Online Queries? Struggling To Get Traffic To Your Blog? Sign Up On (HBB) Forum Now!Host Images Of WordPress Blog In SubdomainUpdated On 17/04/2017Author : Pradeep KumarTopic : Guides WordPressShort URL : http://hbb.me/2ozelZb CONNECT WITH HBB ON SOCIAL MEDIA Follow @HellBoundBlogHosting images of your site in another subdomain is one of the best ways to improve the loading speed of your website. Last week, I spend some hours (or minutes) doing this.If your pages contain more than one image then you should host those images in another domain. By this, the browser will be able to download those images in parallel with your main domain. It will reduce the concurrent connection.WordPress does not support hosting images in different domain. But fortunately, it supports and allows you to host images in a subdomain. This article is about how to host your website post images in a subdomain along with the old images that were hosted in the main domain. Create A Subdomain For Ke eping The ImagesTo create a subdomain you need to use your domain control panel. The procedure for creating a subdomain depends on respective hosting provider; normally it is not a tedious task.You can create your desired subdomain. But image or images or img recommended! ?? Create a folder with name Images. Change The Default Image Uploads Folder In WordPressLog-in to your WordPress dashboard. Now go to Settings | Miscellaneous. For WordPress 3.0.1, Go to Settings | Media.It should be like this,Store uploads in this folder : ImagesFull URL path to files : http://img.yourdomain.comClick on Save Changes. From now onwards, whenever you upload images, it will be stored in the subdomain img.yourdomain.com Update The Old Images LocationREADHOW TO: Automatically Update The Copyright YearNow you have updated the upload location of your post images, but what about the old post images? You cant change the location of all the old images one by one. Thats a tedious task.First download all th e images in the folder /uploads/ and upload them into the folder Images.Now we have to perform a simple SQL query on your database. You need to use your phpMyAdmin for executing this.Go to phpMyAdmin and the click on the SQL tab.Now put the following query in the boxUPDATE wp_posts SET guid = REPLACE(guid,http://www.yourdomain.com/wp-content/uploads/,http://images.yourdomain.com/)Click on GO. This query is capable of replacing “http://www.yourdomain.com/wp-content/uploads/” with “http://img.yourdomain.com/” in all the images location URLs.Hurray! Now you have completed the process almost 95%. Considering the images Google crawled and indexed, we have to redirect the old image URLs to new image URLs.In order to do that, add the following line in your .htaccess file (What is .htaccess?)P.S. Backup your .htaccess file before implementing.RedirectMatch 301 ^/wp-content/uploads/(.*)$ http://images.yourdomain.com/$1Now you are done, perfect!You can subscribe to our feeds to get q uick updates about such tutorials!Getting any error sort of thing? Do you know any other tip? You are welcome to share!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.