Sometimes when we install the WordPress themes or WordPress plugins we may failed, just because there are some small problems with the server settings. If you meet the following error, just read this post to find the solutions.
Downloading install package from http://downloads.wordpress.org/plugin/zip.
Unpacking the package.
Installing the plugin.
Could not create directory.
Plugin Install Failed.
There are two main reasons, the folder write permission and the folder with different owner.
-
Folder Permission
Change permissions on the /wp-content directory to 0775
if not work Change permissions on the /wp-content directory to 0777.
Or
uploading the plugin manually via FTP -
Ownership
If you using Linux VPS or Hosting, you can change the folders owner.
Usually, change the root or some other owners to wwwUse putty to login your site, change the ownership.
Command: chown [-cfhvR] [–help] [–version] user[:group] file…
Example:change the wp-content‘s owner from root to www
chown -R www:root wp-content
Done!
By the way, if you want to install the theme or plugins automatically, you can add the folowing code in the wp-config.php
define('FS_METHOD', 'direct');
Just like this:
There is no need to add your FTP info.