简体   繁体   English

安装失败:无法创建目录。 wordpress 4.7.1 插件安装

[英]Installation failed: Could not create directory. wordpress 4.7.1 plugin installation

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安装 WordPress 插件时出错,我已将 WordPress 目录的权限更改为 775 并设置

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.我可以创建 test.txt 文件。 then also i am not able to istall plugins.然后我也无法安装插件。 i am using fedora 21 system我正在使用 Fedora 21 系统

This error is due to the absence of permission given to the wordpress files.此错误是由于没有授予 wordpress 文件的权限。 All the folder permissions should be 755.所有文件夹权限都应为 755。

chmod -R 755 /for all folders

And all the file permissions should be 644.并且所有文件权限都应该是 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.您还可以检查 wordpress GUI 并检查站点健康状况(工具 > 站点健康状况)如果您的健康状况不佳,向下滚动并查看那里的错误,那里将提到每个文件所需的权限并相应地授予权限.

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 chmod -R 777 /parent folder where all the files are included如果可行,您可以确认您的问题与权限有关。如果这不起作用,请检查内存和 wp-config.php 文件

If you are using WP-CLI you could try the command below: sudo wp plugin install [plugin name] --allow-root如果您使用的是 WP-CLI,您可以尝试以下命令: 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/须藤 chown -R www-data:www-data /wp-content/plugins/
chmod 777 /wp-content/upgrade/ chmod 777 /wp-内容/升级/

open your wp-config.php file and place bellow line.打开您的 wp-config.php 文件并放置波纹管。
define('FS_METHOD','direct');定义('FS_METHOD','直接');

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM