Wordpress 插件安装失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10563782/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Wordpress plugin installation fail
提问by user1030768
While trying to install plugins in wordpress site, I get the following error
尝试在 wordpress 站点中安装插件时,出现以下错误
Unpacking the package…
Installing the plugin…
The package could not be installed. No valid plugins were found.
Plugin install failed.
回答by Libin
If you have access to the cPanel, try this:
如果您有权访问 cPanel,请尝试以下操作:
- Download the plugins that you want to install on WordPress.
- Open your CPanel and sign in.
- Open “File Manager”
- Locate your wordpress installation there and Click on the folder marked “wp-content”
- Open the folder marked “plugins”
- Click on “upload file(s)” and upload the plugin you just downloaded.
- Click on the plugin file that you just uploaded and click “extract”.
- Open WordPress and go to the dashboard. Click on “Plugins”. ( You should see your new plugin as one of the selections. )
- Click “Activate”.
- 下载您要在 WordPress 上安装的插件。
- 打开您的 CPanel 并登录。
- 打开“文件管理器”
- 在那里找到您的 wordpress 安装并单击标记为“wp-content”的文件夹
- 打开标有“插件”的文件夹
- 单击“上传文件”并上传您刚刚下载的插件。
- 单击您刚刚上传的插件文件,然后单击“提取”。
- 打开 WordPress 并转到仪表板。点击“插件”。(您应该会看到您的新插件作为选择之一。)
- 点击“激活”。
The above steps are explained assuming your hosting is With HostGator. The steps are similar for other hostings also.
假设您的主机是使用 HostGator 来解释上述步骤。其他主机的步骤也类似。
Cheers !!!
干杯!!!
回答by Rimon Habib
It seems you have put wrong folder/file. wordpress only get realized that there is a plugin when it can get a php file which header contain at lease this line
您似乎放错了文件夹/文件。wordpress 才意识到有一个插件,当它可以获得一个 php 文件时,该文件的标题至少包含这一行
/* Plugin name: your plugin name */
/* 插件名称:你的插件名称 */
So, you have to check..
所以,你必须检查..
- unzip the plugin file and see if there any php file containing header like that. you plugin file should be in.. wp-content/PLUGIN_DIRECTORY/PLUGIN_FILE.php
- 解压缩插件文件,看看是否有任何包含这样的标题的 php 文件。你的插件文件应该在.. wp-content/PLUGIN_DIRECTORY/PLUGIN_FILE.php
check this first and let us know if it works or not
先检查一下,让我们知道它是否有效
回答by chud
One of my co-workers figured this out. Check your wp-config.php and look for these lines:
我的一位同事发现了这一点。检查您的 wp-config.php 并查找这些行:
define('FS_CHMOD_DIR', '02775'); define('FS_CHMOD_FILE', '0664');
定义('FS_CHMOD_DIR','02775');定义('FS_CHMOD_FILE','0664');
Note that the values 02775 and 0664 are encased in quotes and so PHP interprets as strings. They are numeric values and should not be contained within quotes.
请注意,值 02775 和 0664 包含在引号中,因此 PHP 解释为字符串。它们是数值,不应包含在引号内。