• I have searched and read everything I can on this and I cant find an answer. I get the following error no matter what I do.

    The uploaded file could not be moved to wp-content/uploads/2016/03.

    I have tried to modify the file permissions, nothing helps. what is the answer to this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • cebuhasher

    You’ve already mentioned you’ve tried changing the permissions, I assume you went with 755 or 750 for the whole uploads directory recursively.

    Now, there’s one more thing in play, the user with which PHP is running, can you tell which user is used to run PHP on the server? and is it the same user that owns the uploads directory? and the 2016 subdirectory as well?

    I have the same problem with cebuhasher and also tried to modify file permissions but still can’t upload.

    “The uploaded file could not be moved to wp-content/uploads/2016/03.” is all that pops up.

    Where do I check on which user is used to run PHP?

    I have this problem when trying to load an image to a post
    elderly-man-and-women-sitting-on-bench.jpg
    File is empty. Please upload something more substantial.

    dannago

    You can find out who is running the PHP on your server by this code snippet

    function who_is_running_php( $text ) {
    	echo 'Current script owner: ' . get_current_user();
    }
    
    add_action( 'wp_footer', 'who_is_running_php' );

    It will print the user who is running PHP in the footer of your site, something like this:
    Current script owner: www-data

    I generally use WordPress with nginx using www-data running the PHP process and the WordPress directory owned by www-data user, but things can be different in your case

    worldedu

    Your issue seems to be different than what cebuhasher is facing, though maybe this thread might be helpful for you, if it still does not help, please create a new support ticket describing the issue you are facing.

    Any resolution to this issue? I’m getting:
    The uploaded file could not be moved to wp-content/uploads/2016/03.
    and I can’t update WP or plugins. I could 2 days ago…what changed??

    zillionsocial

    As I’ve already mentioned, have you checked the folder permissions and the owner of the folder?
    Also, the owner of that folder should be the one that is running PHP, if not, it will fail to create new files in that folder.

    Team, I am new to CMS and In my quest to start my first web site, I see I encounter “The uploaded file could not be moved to wp-content/” while I am working on my LOCAL machine with no server connectivity. Most of the responses I see are around Server configurations. How do I tackle this on my local Mac?

    Please help.

    Thanks
    Pk

    @pramodhpk – This topic is almost a year old. Per the Forum Guidelines please don’t jump into the middle of another support topic; start your own topic instead. Thanks.
    https://make.ww.wp.xz.cn/support/handbook/forum-welcome/#post-in-the-best-place

    • This reply was modified 9 years, 3 months ago by bdbrown.
    • This reply was modified 9 years, 3 months ago by bdbrown.
Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘cannot upload images’ is closed to new replies.