Support » Fixing WordPress » Change default upload directory

  • Hi there,

    A current site that we are working on is over at

    The default upload directory has been switched over to a single folder without the date timestmap, this was of course done by switching the Media Settings option in the Settings panel. No problem there.

    The problem is when uploading something for instance an image via the Add Post section, it will link to the default directory, however that directory does not exist and we have to manually enter the upload directory that was created and it works fine. It is quite annoying having to do this, is there a way to switch the upload directory or is there something wrong with the installation / configuration ?

    Any help is greatly appreciated, thanks.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Any takers ?

    I’m really struggling…new WordPress 3.04 install (hosted).
    Everything works except Uploads – which I get the error ‘cannot move to …..\uploads’.

    All the FAQ’s and posts related to this seem to be closed – but with very little resolution text.
    I’ve checked the (lengthy) sticky post about it. nothings works. Permissions are 777 on wp_content.
    Where is this /tmp folder someone spoke about ?
    Any help appreciated.

    Hi jonandel,

    Could you provide me with more information about the problem that you are having ?

    To be more specific, it first uploads the file to a temporary directory on the server (default /temp), if succeeded, and then tries to move it to your account’s specific directory, which failed.

    Try changing the permission on your temp directory and see if that works.

    I have not upgraded to the new version of wordpress site CNA Training, I am thinking of doing it but seeing the problem of uploading I am halt back.

    Hi andrewharry, I doubt that it would cause an issue with the new version, most of the time it is just permission errors

    Hi Guys,

    More info :
    – If I use either the Flash or other loader – I get the same thing.
    – Using the Flash loader, the progress bar shows 100% loaded… then ‘crunching’… then I get the error about it cannot move the file.

    As posted before, I have even tried to set all the WP_content folder (and subdirectories and files) to 777. No joy.
    I’m wondering if there is a special permission on the default/temp directory, such that moving the file isn’t possible

    This is a hosted solution – so I don’t have full access to everything ‘under the hood’. Can I set the path of the temp folder somehow ?

    One common occurrence that I have seen on some hosts is that when you change the file permissions through an FTP program, they refuse to change.

    However when done via cPanel or Plesk, they do actually change.

    Could you clarify what you mean by a hosted solution ? Do you have your own host ? If so, most hosts allow you to change some basic settings at least.

    Its hosted by my ISP (Eclipse). Webserver: Zeus 4.3 r4.
    I am changing the permissions via Filezilla – and I get no error on doing so – and if I close and re-open Filezilla it reports what I set…so I assume its correctly applying them.

    I did have to create a couple of the directories in WP_content (uploads being one) as it didn’t exist in the 3.0.4 ZIP – and wasn’t created by the install…Dunno if this is significant..

    again, I wonder if the webhosting uploads to a central area (not under my control) but is cached – and therefore deletion of the file when WP tries to move it to ‘uploads’ it can’t …?
    Or is it trying to put the file in a specific subfolder in uploads that doesn’t exist ..?

    That is very unusual having to create directories, the copy may have been corrupted as everything that you need to install WordPress is in the zip file.

    Goto Settings -> Media

    Change the Store uploads in this folder to some other directory (do note that you will have to provide the full path, you can get this by uploading a simple PHP file to your webhost

    Save this as fullpath.php
    echo dirname(__FILE__);

    Upload it and access it to get the full path to your account over at your host.

    Many thanks for the tip – I had put simply /wp-content/uploads into the Media Settings (partially, because in the text there, it has an uppercase ‘L’ – and I wasn’t sure if thats significant.
    I’ll try the full path later today…

    I did however, check the 3.0.4 ZIP install again (fresh machine, new download) – nope definitely no ‘uploads’ folder in the wp-content dir….
    Maybe it gets created by the install script ?

    Yup look like it only get created by the install script or only when a user chooses to upload a file.

    Hi, Thanks for the comment.

    After searching around a bit, deleting the MYSQL db, and re-installing WordPress, and recreating the directories that aren’t in teh ZIP file it now seems to work (I’m now getting an error from the flash uploader ‘http error’ !?).

    I notice that PHP SAFE_mode is on for my site (set by my ISP) – so I have to wonder if thats’ what stops the directory creation at install.
    At least I’m up and running – I’ll chase the HTTP error next.
    thanks for your help.
    Given what I’ve read in various posts about safe_mode being fine – I think this thread may demonstrate its not…. although I have to admit to having a large dollup of guessing on my part that this is the route of (at least one of) the problems.

    Does anybody have any idea on how to resolve the main issue ? It is appearing on my other sites as well, it is kind of annoying.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Change default upload directory’ is closed to new replies.