Unable to create directory in wp-content/uploads in Wordpress

前端 未结 19 1056
孤独总比滥情好
孤独总比滥情好 2020-12-29 02:20

I am not able to upload any images to the Media section. I get this error message:

\"Unable to create directory wp-content/uploads/2015/05. Is its par

19条回答
  •  生来不讨喜
    2020-12-29 02:57

    I'm an Arch Linux user. My WordPress location is (/srv/http/wordpress). I faced this problem before.

    At first, I change my WordPress ownerships to $USER:http.

    sudo chown -R -c $USER:http /srv/http/wordpress
    

    (don't go root to change ownership with this command then $USER will be root)

    you can check who is the user with

    echo $USER
    

    I created an uploads folder in wordpress/wp-content/uploads. Then give the read, write, and execute permission to the user and group of wp-content and wp-content/uploads directory.

    sudo chmod 774 wp-content/
    sudo chmod 774 wp-content/uploads/
    

    hope it will helps someone.

提交回复
热议问题