WordPress.org

Ready to get started?Download WordPress

Forums

The uploaded file could not be moved (8 posts)

  1. krembo99
    Member
    Posted 6 years ago #

    Hello all,
    I have just installed wordpres on a live server and I now get this message :

    The uploaded file could not be moved to D:\inetpub\webs\magmalabnet\wordpress/wp-content/uploads.

    I have read some topics I have found with the search on thi forum, but none gave me a clue.
    My permissions are OK, my files re-uploaded,and the path is saved.

    The strange thing in the error is the BACKSLASH (note that it gets reveresd..) if i manuelly reverse the backslash, it will reverse it still puts the first one in the wrong direction...
    anyone had a clue on how to solve it? or is it really a part of the problem ??

  2. Chris_K
    Member
    Posted 6 years ago #

    Could you elaborate on "the permissions are OK?" What are they and, more importantly, does whatever user the web server use have Write permissions?

  3. krembo99
    Member
    Posted 6 years ago #

    permissions are ok means they are all 777 on all files and folders from level /wordpress..
    But somehow , like I said, the BACKSLASHES are reversed,producing an invalid path.
    I even tried to change the code in function.php line 977 from

    $path = str_replace(ABSPATH, '', trim(get_option('upload_path')));
    	$dir = ABSPATH . $path;
    	$url = trailingslashit($siteurl) . $path;
    
    	if ( $dir == ABSPATH ) { //the option was empty
    		$dir = ABSPATH . 'wp-content/uploads';

    to :

    if ( $dir == ABSPATH ) { //the option was empty
    		$dir = ABSPATH . 'wp-content\uploads';

    or:

    if ( $dir == ABSPATH ) { //the option was empty
    		$dir = ABSPATH . '\wp-content\uploads';

    but also that does not help .

  4. whooami
    Member
    Posted 6 years ago #

    permissions are ok means they are all 777 on all files and folders from level /wordpress..

    lol. and what told you those are okay permissions?

    Fir starters, those are completely not-okay permissions, and a good deal of hosts block scripts from working when world writable files are in use.

    You do NOT need to have your entire WordPress install set up like that. PLEASE try to educate yourself.

  5. Chris_K
    Member
    Posted 6 years ago #

    Say, clearly you're on a Windows server. Are you running IIS or Apache?

  6. krembo99
    Member
    Posted 6 years ago #

    the permissions were 775 before i changed them to 777.
    I have a question that might sove my problem.
    if i change ine 976 in functions.php to

    if ( $dir == ABSPATH ) { //the option was empty
    		$dir = 'D:\inetpub\webs\magmalabnet\somedirectory';

    The uploads works fine.
    but then the WYSIWYG editor does not see the file, and does not POST it, instead it gives me only the link in the post and in the editor i see double backslash.
    like this guys problem :

    LINK

    so the question is:
    Where do i define a GLOBAL upload dir that will not depend on ABSPATH but will be recognized as such by all the functions/scripts/pugins?
    can I define souch a path to be OUT of the wordpress tree of hirerchy ?

  7. caladogan
    Member
    Posted 5 years ago #

    I have the same problem and could not able to find a solution. I'm a windows server user and geting the same error message.

    The uploaded file could not be moved to D:\inetpub\...\...com\www/wp-content.
    I think the problem cause from the 'www/wp-content' the '/' should be '\'

    where can i change it ?

  8. newbie_geek
    Member
    Posted 5 years ago #

    I have JUST finished wrestling this problem to the ground.

    I had the exact same symptoms. All WP DB access actions were working just fine, but when it came to editing WP filed directly, nothing seemed to work!

    I used Filezilla to change permissions to the very unwise, but shotgun solution of "777" for ALL WP files.

    Nadda.

    Turns out the solution was that filezilla is not very good at changing permissions correctly. I had to go in through the Control center for my web server to edit permissions in order to get it all sorted.

    Hope that helps someone else in the same boat!

Topic Closed

This topic has been closed to new replies.

About this Topic