Wordpress theme upload error PCLZIP_ERR_BAD_FORMAT
Asked Answered
O

9

28

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.

Occupant answered 21/7, 2013 at 10:56 Comment(5)
Try uploading the files manually to your theme folder - /wp-content/themes/yourThemeFolder/Karlin
@AmalMurali its working that way. I need to make it work using wordpress theme upload option so that I may not get into trouble while uploading the theme on server.Occupant
I've experienced this when specifying certain mbstring.* values, it maybe worth giving those a once over.Rata
@AnthonySterling I guess mbstring.* is in php.ini right ? I don't think I've made any changes there, can you elaborate what was the issue and how you resolved it ?Occupant
Sadly not, I did not investigate further. Here's my default, custom, php.ini settings: pastie.org/8160888 removing the mbstring.* settings resolved the issue you describe.Rata
V
46

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.

Vowell answered 7/6, 2014 at 6:23 Comment(3)
That was my problem too. Thank you.Veloz
Wordpress will complain on some environments and not others even though it's a valid ZIP, it seems to depend on server environmentDropout
I had same issue. but I'm able to fix it after installing curl read more information from this postOperable
K
2

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.

Kitkitchen answered 21/7, 2013 at 11:4 Comment(1)
I already kept the theme folder inside /wp-content/themes/ only and it worked that way. However just to check I did same on my another system and on uploading I'm getting the same issue. So I was just worried that I might get the same issue while uploading the theme on my web hosting provider.Occupant
S
1

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.

Southwester answered 3/7, 2015 at 14:53 Comment(0)
G
1

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.

Goethe answered 20/3, 2018 at 8:44 Comment(0)
A
1

I got this error when I had the zip-plugin not installed. For Ubuntu/Debian and php7.4 (Bionic) you can use

apt-get install php7.4-zip
service php7.4-fpm restart
Allantois answered 1/8, 2020 at 13:36 Comment(0)
I
0

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 :)

Ichthyornis answered 20/6, 2016 at 9:47 Comment(0)
I
0

I found one more case which may help you.

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

Indivisible answered 19/3, 2017 at 18:30 Comment(0)
I
0

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.

Interval answered 3/11, 2017 at 12:58 Comment(0)
U
0

I had the same issue, it turned out the problem was that the virtual server had exceeded its quota. (I'm using Virtualmin, and had a 1GB quota on that website's virtual server).

After increasing the quota, the problem went away.

Upland answered 7/3, 2021 at 16:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.