It is due to using a fully qualified subdomain, as opposed to a sub-folder within the root of your site…and no it’s not a Godaddy issue as I have blogs using them using the siteroot/images setup…
Thank you for quick answer.
What it means: fully qualified subdomain?
Can you tell me what should I do to have this problem solved?
Thanks a lot π
The image folder needs to reside within the domain of your WordPress install…,i.e., //domain.com/images/file.jpg and not //sub.domain.com
unless you have installed a plugin for CDN or otherwise modified the way WordPress handles media through PHP.
I am unclear of your goal, is it to load your media from an external site, such as with a CDN?
Hi. Yes my goal is to load media from external place, so it can be loaded paralel with the other reqest by browsers and speed up the page load time.
I read, that WP dosen’t support to do that with external domains, but its possible to do it with the subdomain.
Here is the article: http://hellboundbloggers.com/2010/06/13/host-images-of-wordpress-blog-in-subdomain/
So if I just change to subfolder, then really nothing wil change.
Do you think its possible what I want to achive?
Thank you again.
[no bumping please]
@tomasz1976, did you ever get this worked out? I tried it and finally did!
Store uploads in this folder: img
(NO beginning slash!)
Full URL Path to files: http:/ /img.mydomain.com
IF you have any existin images on your site in the wp-content/uploads folder:
in your .htaccess you need:
# Begin redirect for existing images
RedirectMatch 301 /wp-content/uploads/(.*)$ http://images.mydomain.com/$1
# End redirect for existing images
And run this SQL query in your mySQL database:
UPDATE wp_posts SET guid = REPLACE(guid,βhttp://www.yourdomain.com/wp-content/uploads/β,’http://images.yourdomain.com/β)
Clear your browser cache (Ctrl+F5 in Mozilla Firefox Shift+F5 or Ctrl+F5 in Chrome) and see what happens.
It took me hours and hours of frustration, searching & trying to get it to work. I can now not only have all new uploads go onto the subdomain, but without permissions issues either.
Hope this helps you! π
Hi Persephone,
thanks for the help. Yes the issue is solved. The slash before the folder name was the problem.
Now it works great, thank you. π
Tomasz1976, I was wrong about the beginning slash before the folder name – check on your server – without the beginning slash, WordPress will just make a folder called img in your WP installation, which defeats the purpose of the subdomain!
I’m now struggling with this and I get a permissions error whenever I try to upload an image – this is much more difficult than it should be. π I’m sorry about the wrong info – I really thought it was working the way I wanted it to work!
It works for me fine. The WordPress is not making any folder by it self, and the pictures are uploaded to the subdomain. I checked it thru FTP too.