我无法在我的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。我还专门为WordPress创建了一个FTP用户,并将该用户的主目录设置为与我的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');
to:
/** 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');
这应该可以解决这里提到的双斜杠冲突问题。
注意--我也遇到了上传媒体的问题,但通过将chmod设置为777来解决了这个问题。
现在当我尝试安装插件时,出现以下错误:
Unable to locate WordPress Plugin directory.<br>
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