facebooktwitterskypeRSS Feed
telephone: (920) 215-1842
facsimile: (866) 456-2115

Unable to locate WordPress Content directory (wp-content)

email

This error arised from the installation of a plugin within the dashboad where the permissions where not setup correctly on the web server. First the permissions on the directory need to be set to

$ chmod 07550
on the wp-content directory and folders within.

After doing some more research regarding installing plugins I came across a nice piece of code to allow plugins, updates and themes to be installed without giving the server credentials each time. I see a security issue in both situations. Figure out the best solution for your situation.

Add the following code at the end of your wp-config.php file.

/** Override default file permissions */
if(is_admin()) {
add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
define( 'FS_CHMOD_DIR', 0751 );
}

This snippet override the default file permissions in response to the problem of the core update function failing when needing a username and password for ftp or sftp.

From now on, You can install new plugins in the dashboard without inputting the ftp information!

Post a Comment

Do you have a question or comment about this post. Please share! Your email address will not be published. Required fields are marked *

*