I am getting Installation failed: Could not create the directory. error while installation of WordPress plugin, I have changed the permission of WordPress directory to 775 and also set
sudo chown -R apache:apache /var/www/html/*
i tried to accesss the plugings direcotry by
sudo -u apache touch /var/www/html/wp-content/plugins/test.txt
and i am able to create test.txt file. then also i am not able to istall plugins. i am using fedora 21 system
This error is due to the absence of permission given to the wordpress files. All the folder permissions should be 755.
chmod -R 755 /for all folders
And all the file permissions should be 644.
chmod -R 644 /all the files
You can also check the wordpress GUI and check the site health(Tools > site health)if your health status is not good, scroll down and see the errors over there,needed permission for each file will be mentioned over there and give the permissions accordingly.
Only for try
chmod -R 777 /parent folder where all the files are included
if this works you can confirm that your issue is with the permission.If that didnt work check out the memory and the wp-config.php file
If you are using WP-CLI you could try the command below: sudo wp plugin install [plugin name] --allow-root
This helped me solved the same problem as yours before.
Execute bellow commands
sudo chown -R www-data:www-data /wp-content/plugins/
chmod 777 /wp-content/upgrade/
open your wp-config.php file and place bellow line.
define('FS_METHOD','direct');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.