uploads folder outside WP root? (13 posts)

  1. beku76
    Posted 7 years ago #

    is there a way to change the uploads folder to one outside the wordpress installation folder?




    I need:

    I tried to change the option in the settings, but I did not succeed :(

    thanks for your help

  2. haochi
    Posted 7 years ago #

    I am not sure if this will work (theoretically, it should) but don't feel like trying it on my blog:
    Settings -> Miscellaneous -> Store uploads in this folder => '../media/uploads' if /media and /wordpress are on the same directory.

  3. beku76
    Posted 7 years ago #

    thanks for the hint,
    but it doesn't work :(

    using this suggestion, WordPress creates a folder named ".." under WordPress directory

    like this:

  4. haochi
    Posted 7 years ago #

    Oops, sorry, it should've been '/../media/uploads', give it one more try. (Turns out that I can't upload files on my WP, doesn't matter to me thought because I use FTP to upload files.)

  5. chriskalani
    Posted 7 years ago #

    I have been trying to figure this out too. It was easy to do before 2.5... I posted the solution here: http://chriskalani.com/archive/upload-outside-of-the-wordpress-directory/

    But that no longer works... :( I really need to find a solution.

  6. beku76
    Posted 7 years ago #

    finally it worked for me,
    the links inside the posts look like:


    The image is stored at:

    I found that the browsers correct this by default.
    they know that /../ means -1 level
    Try it yourself, with any image found in google like this:

    now, modify the url to:
    and copy it to the browser again,
    voila! it goes to the original one.

  7. creativeworldstudio
    Posted 7 years ago #

    I'm trying to move the default folder outside of the wordpress/ install directory and into the / root of the site too. Any tips on how this can be done??

    @beku76 - can you explain your solution more please?

  8. creativeworldstudio
    Posted 7 years ago #

    anyone out there have a solution for this?

  9. yarntomato
    Posted 7 years ago #

    I have found the solution for this.

    Settings -> Miscellaneous
    Do both of the following:

    Store uploads in this folder -> absolute path to folder you want to use
    Example: /home/user/public_html/images

    Full URL path to files -> actual URL of folder you want to use
    Example: http://www.example.com/images

    Note: As shown in the examples above, do not use a trailing slash.

    How to find your absolute path:
    Using a text editor (such as Notepad), copy and paste the following code, and save it as path.php

    $p = getcwd();
    echo $p;

    Upload path.php to the folder you want to use, then open it in a web browser (example: http://www.example.com/images/path.php). It will display your absolute path.

  10. creativeworldstudio
    Posted 6 years ago #


    THANK YOU!!! Your solution worked perfectly. Many thanks!

  11. chriskalani
    Posted 6 years ago #

    Awesome! Works great for 2.5+

  12. stereosushi
    Posted 6 years ago #

    Hello, old topic but i searched this on google and found.
    I tried to change the path and url and also copied my old images to new folder but its funny that images on gallery inside my posts sits on the new directory, others not.
    i dont know why

  13. elvanja
    Posted 6 years ago #

    Any ideas about placing upload folder on another server?

    Namely, I tried defining upload folder location as seen from media server (the other one, using path.php), but although the URL is right and visible from WordPress server, the only thing I get is just another folder in WP root and that of course is not correct.

    I would actually need for WP to upload files to this other server and use them in posts like they were on WP side of the story.

    Any help appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic