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.
or
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
if(is_admin())
{
add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));
define( ‘FS_CHMOD_DIR’, 0751 );
}
Recent Comments