我无法在Centos 6 VPS上安装插件.当我尝试安装时,我得到了这个:
Installing Plugin: BotDetect WordPress CAPTCHA 3.0.Beta1.7 Downloading install package from [web path to:]botdetect-wp-captcha.zip… Unpacking the package… Could not create directory. Return to Plugin Installer
更新:这似乎与权限有关 - 我猜是有一些组织wordpress需要成为更改文件夹,创建文件等的一部分,但我无法弄清楚该组应该是什么是.我没有www-data组 - 我在某处读到了有关此要求的内容.有人可以告诉我WP需要存在哪些组和权限?
更新:我已经chmodded权限,以我的插件和上传文件夹,777我也已经创建了一个FTP用户专门针对WordPress的和做的主目录是用户同我WordPress的根文件夹作为推荐这里.然后我在wp-config.php文件中更改了这些行:
/** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__ . "/")); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php');
至:
/** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__)); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . '/wp-settings.php');
这应该消除HERE提到的双斜线冲突.
注意 - 我在上传媒体时遇到了问题,但问题已经通过chmod解决了777.
现在,当我尝试安装插件时,我得到了这个:
Unable to locate WordPress Plugin directory.
Return to Plugin Installer
更新:根据我的wordpress目录运行chown -R的建议,并将我的wp-config.php文件还原为:
/** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . "/"); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php');
我的权限看起来像这样.我还有问题.
[root@ip-MY_IP/wordpress]# ls -l total 180 -rw-r--r-- 1 apache apache 418 Dec 16 07:07 index.php -rw-r--r-- 1 apache apache 19929 Dec 16 07:07 license.txt -rw-r--r-- 1 apache apache 7183 Dec 16 07:07 readme.html drwxr-xr-x 2 apache apache 4096 Dec 17 14:57 tmp -rw-r--r-- 1 apache apache 4892 Dec 16 07:07 wp-activate.php drwxr-xr-x 9 apache apache 4096 Dec 16 07:07 wp-admin -rw-r--r-- 1 apache apache 271 Dec 16 07:07 wp-blog-header.php -rw-r--r-- 1 apache apache 4795 Dec 16 07:07 wp-comments-post.php -rw-r--r-- 1 apache apache 3087 Dec 16 07:07 wp-config-sample.php -rw-r--r-- 1 apache apache 3124 Dec 19 06:10 wp-config.php drwxr-xr-x 6 apache apache 4096 Dec 18 21:03 wp-content -rw-r--r-- 1 apache apache 2932 Dec 16 07:07 wp-cron.php drwxr-xr-x 12 apache apache 4096 Dec 16 07:07 wp-includes -rw-r--r-- 1 apache apache 2380 Dec 16 07:07 wp-links-opml.php -rw-r--r-- 1 apache apache 2359 Dec 16 07:07 wp-load.php -rw-r--r-- 1 apache apache 31909 Dec 16 07:07 wp-login.php -rw-r--r-- 1 apache apache 8235 Dec 16 07:07 wp-mail.php -rw-r--r-- 1 apache apache 10880 Dec 16 07:07 wp-settings.php -rw-r--r-- 1 apache apache 25665 Dec 16 07:07 wp-signup.php -rw-r--r-- 1 apache apache 4026 Dec 16 07:07 wp-trackback.php -rw-r--r-- 1 apache apache 3015 Dec 16 07:07 xmlrpc.php
Nathan Dawso.. 13
您遇到的问题是文件的所有权.该文件夹由与Web服务器不同的用户拥有,因此WP无法为您尝试下载的插件创建目录.
您对wp-config.php所做的更改需要反转.
然后SSH进入您的服务器并运行:
sudo chown -R apache:apache /path/to/wordpress/dir
替换apache:apache与不同的用户:group如果您的配置不同.
您遇到的问题是文件的所有权.该文件夹由与Web服务器不同的用户拥有,因此WP无法为您尝试下载的插件创建目录.
您对wp-config.php所做的更改需要反转.
然后SSH进入您的服务器并运行:
sudo chown -R apache:apache /path/to/wordpress/dir
替换apache:apache与不同的用户:group如果您的配置不同.