php Wordpress 主题上传错误 PCLZIP_ERR_BAD_FORMAT
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17771578/
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 theme upload error PCLZIP_ERR_BAD_FORMAT
提问by dShringi
I'm new to php as well as wordpress however because of some need I had to work with wordpress only. So just to start I read a tutorial and created a wordpress theme of my own and when I tried to upload my theme I got the below error:
我是 php 和 wordpress 的新手,但是由于某些需要,我只能使用 wordpress。所以刚开始我阅读了一个教程并创建了我自己的 wordpress 主题,当我尝试上传我的主题时,我收到以下错误:
The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Searching for the same I've found that usually the cause of such an error is maximum available space or upload file size issue. However since I'm working on localhost I don't think it could be the case. Moreover I've increased the upload_max_filesize
, post_max_size
and memory_limit
as well. But still I'm getting the same error.
搜索相同的我发现这种错误的原因通常是最大可用空间或上传文件大小问题。但是,由于我在 localhost 上工作,因此我认为情况并非如此。而且我已经提高了upload_max_filesize
,post_max_size
和memory_limit
也。但我仍然遇到同样的错误。
I'm using Wordpress 3.5.2.
我正在使用 Wordpress 3.5.2。
回答by Ashwin Parmar
This error due to you are trying to upload Other than ZIP
Compressed version. Other format is not supported while uploading the plugin in wordpress.
此错误是由于您尝试上传非ZIP
压缩版本。在wordpress中上传插件时不支持其他格式。
You should unzip your plugin and make sure you compress with ZIP
format and upload it will be working fine.
您应该解压缩您的插件并确保您使用ZIP
格式压缩并上传它会正常工作。
回答by Jeckerson
One of simple alternative is to download theme package, upzip it and upload through FTP whole theme folder into
一种简单的替代方法是下载主题包,将其压缩并通过 FTP 将整个主题文件夹上传到
/wp-content/themes
Then go to Admin CP and switch to new installed theme.
然后转到 Admin CP 并切换到新安装的主题。
回答by user1589375
I had this problem while trying to install Wordpress plugin from the Wordpress interface. Turns out the disk space quota was full for that specific account. I went to WHM manager and increased the quota and the problem was solved.
我在尝试从 Wordpress 界面安装 Wordpress 插件时遇到了这个问题。原来该特定帐户的磁盘空间配额已满。我去了WHM经理并增加了配额,问题就解决了。
回答by Dushyant Singh Yadav
please check that only those file are here that you wan to upload. i was getting same problem, then i search on folder, there was already zip folder in it. after uploading that zip file. the problem was solved. Now the themes is activated.
请检查此处是否只有您要上传的文件。我遇到了同样的问题,然后我搜索文件夹,里面已经有 zip 文件夹了。上传该 zip 文件后。问题解决了。现在主题已激活。
回答by Daniel Jankowski
I had a similar problem when I was installing plugins for a theme. It appeared that in the meantime plugins' download url had changed, updating it solved the problem :)
我在为主题安装插件时遇到了类似的问题。看来在此期间插件的下载 url 已更改,更新它解决了问题:)
回答by Cybersupernova
I found one more case which may help you.
我又找到了一个可能对你有帮助的案例。
It throws the same error if the zip file is incomplete
or corrupt
.
如果 zip 文件是incomplete
或 ,它会抛出相同的错误corrupt
。
回答by graphypro
This is because you are uploading the theme as a ".rar" file.
这是因为您将主题上传为“.rar”文件。
Convert the theme into ".zip" file and then upload it to your site.
将主题转换为“.zip”文件,然后将其上传到您的网站。
For converting into the ".zip":
转换为“.zip”:
Right-click on the folder of your theme folder.
Select "Send to".
Click on "Compressed (zipped) folder".
Upload ".zip" file to your WordPress site.
右键单击主题文件夹的文件夹。
选择“发送到”。
单击“压缩(zipped)文件夹”。
将“.zip”文件上传到您的 WordPress 网站。