• Resolved tomasz1976

    (@tomasz1976)


    I am trying for days already to solve a problem, and could not find any real answer. Maybe someone can help me here.
    I installed wordpress on http:/ /mydomain.com. I made subdomain too: http:/ /img.mydomain.com
    Obviously I want all my images to be stored on my subdomain for faster page load.
    In uploading files options in Media Setup, I made the following entries: Store Uploads in this folder: /images
    Full URL Path to files: http:/ /img.mydomain.com
    When I am trying to upload an image it goes OK till the crunching. After I see the picture settings, but not the thumnail image, and the file is never saved anywhere.
    I am getting crazy. Help please…

    P.S.: I have hosting by GoDaddy, maybe this is the problem?

Viewing 8 replies - 1 through 8 (of 8 total)
  • 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…

    Thread Starter tomasz1976

    (@tomasz1976)

    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?

    Thread Starter tomasz1976

    (@tomasz1976)

    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: https://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]

    Persephone33

    (@persephone33)

    @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/(.*)$ https://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,’https://www.yourdomain.com/wp-content/uploads/’,’https://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! ??

    Thread Starter tomasz1976

    (@tomasz1976)

    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. ??

    Persephone33

    (@persephone33)

    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!

    Thread Starter tomasz1976

    (@tomasz1976)

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Media Setup uploading files setting don't work’ is closed to new replies.