Viewing 5 replies - 1 through 5 (of 5 total)
  • I’ve got the same error message but not from updated WP core. I’ve got 2 plugins that won’t update. I’m getting “Could not create directory.”

    I deactivated my Child Theme. Then tried again, but still Dashboard update can’t find directory. Will try FTP now.

    Wish I had a solution for you.

    Hello guys,

    If security is your top priority, I suggest you contact your server provider to ask them what would be the best steps to take. This method may reduce headache for future update that may happen.

    For the plugin:
    If you want it to be quick, Just change the permission of /public_html/wp-content and /public_html/wp-content/plugins to 775. If the upgrade succeed just revert it back to its default permission.

    For the core update:
    If you want it to be quick, Just change the permission of /public_html/wp-content and /public_html/wp-content/upgrade to 775. If the upgrade succeed just revert it back to its default permission.

    A beautiful q&a about the issue: https://wordpress.stackexchange.com/questions/23174/could-not-create-directory-wp-content-upgrade

    Best Regards,
    Calvin

    Here is resolved issue:
    https://www.ads-software.com/support/topic/core-or-plugin-update-could-not-create-directory-httpdocs?replies=27

    Wish everyone can get solution from that.

    Thanks!

    Changing my plugins folder to 775 worked for me, thank you so much!

    If you have already tried changing ownership and permissions on your wp-content directory, checked and re-checked that the user WordPress/PHP is running under matches the owner of the wp-content directory, then it is possible SELinux could be the cause of permissions still being denied.

    As a quick test (this will disable SELinux enforcement):
    # setenforce 0

    Then try whatever is throwing the “Could not create directory” error in WordPress, and see if it is resolved.

    Remember to re-enable afterward:
    # setenforce 1

    If that fixes the issue, try this as a permanent solution, substituting the path to your wp-content folder as necessary – note that the absolute path is necessary in the first command:

    # semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/nginx/html/wp-content(/.*)?'
    # restorecon -Rv /usr/share/nginx/html/wp-content

    I’ve seen other posts elsewhere which mention changing the context type to “httpd_sys_content_t” when having SELinux/PHP/mkdir permissions issues, but I found that to not be enough. The “httpd_sys_rw_content_t” type was the ticket.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Failed Update WP core from dashboard – Could not create directory’ is closed to new replies.