Getting a theme that's installed in a subfolder to use images in a folder on the root

I want to have all images on the root so the paths don’t change when I move the site from the test folder into the root. The Theme won’t display images whose path is outside the folder that wordpress is installed in. The root image folder is set to 777 so I don’t think it’s a permissions thing?

PS This seems like best practice to me, in case of theme change, etc. I find the ‘/uploads/2012/5/’ folder structure that wordpress defaults to be weird and disturbing. Is there a way to change that default behaviour of the media component? Or what am I not understanding?

  • aecnu
    • WP Unicorn

    Greetings jjsararas,

    I want to have all images on the root so the paths don’t change when I move the site from the test folder into the root. The Theme won’t display images whose path is outside the folder that wordpress is installed in. The root image folder is set to 777 so I don’t think it’s a permissions thing?

    No it is not a permissions thing but an internal WordPress security thing.

    PS This seems like best practice to me, in case of theme change, etc. I find the ‘/uploads/2012/5/’ folder structure that wordpress defaults to be weird and disturbing. Is there a way to change that default behaviour of the media component? Or what am I not understanding?

    Then this must not be a MultiSite? Then it gets even weirder when it is /blogs.dir/blogid/year/month/

    By default WordPress puts uploads in year- and month-based folders. Custom Upload Dir plugin allows you to construct paths from variables like post title, category, post author, post date and many more.

    Thank you for being a WPMU Dev Member!

    Cheers, Joe

  • jjsararas
    • Site Builder, Child of Zeus

    Thanks for the plugin tip, I may check that out.

    So are you saying there’s no way to have the images in the root folder? What is normal/best practice for creating a test site and then moving it to a live folder with regard to file paths? I read recently that doing a db find/replace (ie to remove the /testing folder from file paths) isn’t always reliable, as some of the data is encoded/serialized. Any thoughts or helpful links on this?

    Many thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.