Wordpress theme upload error PCLZIP_ERR_BAD_FORMAT

2020-05-24 21:03发布

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:

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.

I'm using Wordpress 3.5.2.

7条回答
可以哭但决不认输i
2楼-- · 2020-05-24 21:16

This is because you are uploading the theme as a ".rar" file.

Convert the theme into ".zip" file and then upload it to your site.

For converting into the ".zip":

  1. Right-click on the folder of your theme folder.

  2. Select "Send to".

  3. Click on "Compressed (zipped) folder".

  4. Upload ".zip" file to your WordPress site.

查看更多
迷人小祖宗
3楼-- · 2020-05-24 21:23

I found one more case which may help you.

It throws the same error if the zip file is incomplete or corrupt.

查看更多
迷人小祖宗
4楼-- · 2020-05-24 21:24

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.

You should unzip your plugin and make sure you compress with ZIP format and upload it will be working fine.

查看更多
Juvenile、少年°
5楼-- · 2020-05-24 21:30

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.

查看更多
小情绪 Triste *
6楼-- · 2020-05-24 21:34

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.

查看更多
唯我独甜
7楼-- · 2020-05-24 21:36

One of simple alternative is to download theme package, upzip it and upload through FTP whole theme folder into

/wp-content/themes

Then go to Admin CP and switch to new installed theme.

查看更多
登录 后发表回答