Your Daily Technology
Subscribe today for daily FREE updates in your mailbox or RSS reader.

Wordpress Wordpress (self-hosted) by default stores all your images in the post in wp-content/uploads folder which not only is a bad for SEO but also can cause you trouble in future when your blog gets high traffic. According to Wordpress optimizations if your blog is getting or likely to get high traffic, then all your static files like images, javascripts or CSS files should be moved to another server.

Wordpress options

But as a beginner on shared hosting, you might have not thought this. Though you can any time change the uploads folder to point somewhere else but all your old posts will be having the links to the images in the old folder and of course you won’t like the pain to run the MYSQL queries to edit the absolute link that got stored with your posts.

Better way to organize the wordpress uploads directory to make it more flexible in future is to

Step 1 : Create an upload folder at your root wordpress folder (or may be somewhere else ).

Step 2: Create a subdomain like img.yourdomain.com or let say content.yourdomain.com for general content pointing it to the folder created in step 1.

Step 3: Edit the upload folder from Settings –>Miscellaneous on your Dashboard giving the path to your folder and subdomain created in step 1 and 2 respectively

Wordpress Options

So the image which was earlier at the address  http://www.yourdomain.com/wp-content/uploads/image.png will now simply be at http://img.yourdomain.com/image.png

Advantages:

If in future you think to separate out the static content like images etc to different server then you can simply redirect your subdomain to some other server space without changing the link to your images in the old post and then transferring your old images to that server.

Also you can have multiple such servers running by creating another subdomain if you want to redistribute the static content. Your old posts will point out to old subdomain and the newer posts to the new subdomain.

Changing the image folder also should not be a problem for your old posts as you can point your subdomain to the changed folder now which will preserve the images link to your old posts too.

Liked this article ? You can get your daily technology delivered fresh in your Email or you can subscribe to our RSS Feeds too.

Tags: SEO, wordpress
      Subscribe

you may also like this..


Comments

3 Responses so far!

  1. Frank on September 7th, 2008

    Very Cool! I was trying to do the same but you made the easy easier. Thanks!

  2. Nibbie on September 10th, 2008

    Thanks. Was looking for this thing since quite long.

  3. Whibber on September 12th, 2008

    Thanks Frank and Nibbie.

Post a Comment: