Could not create directory /wp-content/upgrade/

When I try to automatically install updates to WordPress or plugins, I receive an error:

An error occurred while updating… Could not create directory
…/wp-content/upgrade/…

Read More

My web host runs an Apache environment, and other WordPress websites I own don’t have this problem. I have CHMOD the /wp-content/upgrade folder to both 777 and 2777, without any change in the error message.

I have installed the Core Control plugin, and the Filesystem Access module says the only error is that SSH2 is not available, but this is not required for automatic updates.

How do I perform the command:

chown www-data:www-data /path/to/wp-content/ -R

from a Windows machine? Is it telnet, or putty? What commands do I use to login? Thanks.

Related posts

Leave a Reply

2 comments

  1. First do not use 777, change it back to 755.

    Second you need to add the proper group permissions most likely to the same that Apache is running under.
    To find that out try:

    ps aux | grep apache 
    

    You will see the Apache user group on the left.

    Now change your WordPress folder to the same user group, you can do this in a parent folder or sub folder but for sanity it usually best for parent folder, use -R to recursively do it.

    chown -R www-data:www-data /path/to/wp-root-folder
    
    • To login on windows use Putty
    • Enter your hostname and port
    • Choose connection type depending on server settings
    • Click open

    If you try to chown and get denied you will need root privileges , type sudo su and your password.

    ps. It would help if you mentioned what OS your server is running and if your running a php permission script like suPHP.

  2. If you are using vsftpd as your FTP server and have enabled passive connections, you need to add pasv_promiscuous=YES to /etc/vsftpd/vsftpd.conf.