Solution to fix WordPress update failure issue 2

I was having problem while updating one of my plugin weeks ago, telling me that

Could not create directory. /home/<>/public_html/wp-content/plugins/download-manager
Plugin install failed.


Unable to locate WordPress Content directory (wp-content).

By then, I turned to Google for solutions, however, tried every way I got, such as:

  • 1. Remove the plugin and re-install it.
  • 2. Change permission of wp-contents direcotry and sub-directories to 777
  • 3. Change the ftp accout of wp-config.php

But none of them can fix my problem, so I have to upload the plugin mannually, and got it fixed.

Days ago, WordPress 4.1.1 is released, and a bunch of plugin updated. When I tried to update them turned out none of them can be updated.

So I can not avoid it now.

Obviously, this issue is permission relevant. After digged more into the issue, finnally got a solution for it, and this is the antidote, fix it by adding the following code to the end of your wp-config.php

    add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
    define( 'FS_CHMOD_DIR', 0751 );

Share with u.

Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “Solution to fix WordPress update failure issue

  • Problemloesung

    This paragraph will assist the internet visitors for
    creating new webpage or even a blog from start to end.

  • v1205

    I am genuinely grateful to the owner of this site who has
    shared this enormous piece of writing at at this place.