In the past few weeks I got contacted several times because of failed Wordpress updates. I knew this was working in the past - that's actually one of the main reasons why I suggest Wordpress to be used as CMS.
At first I suspected a change in the code in more recent Wordpress versions but I doubted that very much. So I went to the bottom of it.
The error message shown during the update procedure was the following:
PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
When I was searching for that particular error message, a lot of results showed up. Unfortunately most of the advices were utter crap ("do manual upgrade instead") and had nothing to do with a technical solution. Here are some advices which I took seriously though:
So after going through many posts and advices, none of them was working to solve my issue and I started debugging myself.
I installed a Wordpress 3.6.1 and ran the update process so it would update the CMS to 3.7.1. To my surprise it was working immediately. What's different then from the complaints I got and my installation? The physical server location! Could it be a network related issue? I was about to find out.
After a login into this particular server, I manually downloaded the package mentioned in the update process (http://de.wordpress.org/wordpress-3.7.1-de_DE.zip):
--2013-11-25 16:43:19-- http://de.wordpress.org/wordpress-3.7.1-de_DE.zip
Resolving de.wordpress.org... 18.104.22.168, 22.214.171.124
Connecting to de.wordpress.org|126.96.36.199|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5489421 (5.2M) [application/octet-stream]
Saving to: "wordpress-3.7.1-de_DE.zip"
43% [=========> ] 2,365,696 15.7K/s eta 3m 36s
Jeez, look at that download speed (15.7K/s)! No wonder the update fails and the explanation is quite simple:
The update script starts. Downloading of the update package starts. After a certain time (a timeout, probably 1-2min) the update script thinks "OK, meanwhile the update package should have been downloaded, so unzip it". As the download is far from being finished, the zip file is incomplete. Ergo the ZIP error message PCLZIP_ERR_BAD_FORMAT!
Together with the network team in the data center I was able to solve this issue. There was a recent change in the network infrastructure where this server was physically located and the communication between the switch port and the server was set to "Auto-Negotiation: No". After activating auto-negotiation on the physical NIC of the server (ethtool -s eth0 autoneg on), the network communication was fixed and the download speed increased rapidly.
Back to Wordpress. Once logged in, I launched another Wordpress update on the admin interface. And surprise, surprise - it immediately worked. Case closed.
Conclusion: If you get the PCLZIP_ERR_BAD_FORMAT error when doing a Wordpress update, make sure your server is actually able to download the update package within 1 minute.
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Icingaweb Icingaweb2 Influx Internet Java KVM Kibana Kodi Kubernetes LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder