Quantcast
Channel: Small Biz Geek
Viewing all articles
Browse latest Browse all 16

WordPress Duplicator Plugin ZipArchive Failure… My Solution

$
0
0

I tried to take a backup of my WordPress site using Duplicator but was struck down immediately with a problem I’ve never seen before: a PHP support failure.

In this post I’ll share what I did to solve this nuisance issue.

Duplicator ZipArchive Failure

ZipArchive Failure

Below is a screenshot of exactly what happened. I am using the latest version of WordPress and the latest version of PHP on my GoDaddy Linux shared host.

I expanded the window and learned that something called ZipArchive had failed.

Without this crucial functionality I wouldn’t be able to make my backup.

Duplicator Plugin ZipArchive Failure

Unable to Build Package

This is the first time such an error has occurred but it isn’t the first time a plugin has become unstable.

WordPress plugins (especially free ones) should not be relied upon for any crucial part of business website backup.

Despite trying to wean myself off backup plugins I still wanted to get this one repaired. When it works it works well.

This post might also help if you’re using BackUpBuddy or another plugin using zip file compression to build archive packages.

I’ll walk you through my experiences with screenshots included. The solution is at the end.

Problem with the Host?

After some quick research I was certain this is something GoDaddy would have to deal with their end.

Most of the forum threads indicated I would need to have a conversation with the host and get them to resolve it.

Here’s a few links I found:

Zip Extension: How to Turn On? Please Help

ZipArchive extension required for compression

GoDaddy Phone Call

Once I got through on the phone I explained I’d been talking to the hosting support earlier in the day regarding php.ini and that in the course of that conversation the technician had upgraded my version of PHP to 5.4.36 as well as making some changes to php.ini.

It was my opinion that something might have happened that had stopped ZipArchive working.

I would turn out to be right.

It was nothing to do with version compatibility as is usually the case with plugins.

While I talked to GoDaddy support I searched online, combing the Life In The Grid support knowledgebase (they’re the authors of Duplicator).

I found the following link which proved useful:

Working With PHP ZipArchive

The section titled Working with PHP ZipArchive suggested looking in the Duplicator settings to check if  ZipArchive was enabled.

Here’s what it suggests:

“For creating Packages the Duplicator currently requires the ZipArchive class to be installed and working. For installing a package it is not required. Below are instructions for getting the ZipArchive working in your environment if it is not already setup.

Duplicator Settings

ON HOSTED SERVERS

Just contact your hosting provider and tell them you want PHP with Zip support so that the “ZipArchive Class” will work. This is a very common feature and is available on almost all shared hosting environments. Please view the following link for a list of approved hosting companies that we personally recommend for working with the Duplicator.”

By the way, some of that above information is out of date: you want Duplicator > Tools > Diagnostics > PHP Information.

Once I was on the right part I took a screenshot of what I could see:

ZipArchive Enabled in phpinfo

Notice how --enable-zip=shared is visible.

This means ZipArchive is enabled but for whatever reason was not being detected by my PHP configuration.

Me and the Godaddy technician were stumped. Stumped I tells ya.

We continued discussing the problem until the answer presented itself.

The Solution: extension=zip.so

The Working with PHP ZipArchive section of the Life In The Grid knowledgebase had the solution.

The fix was that I needed to add a single line of code to php.ini.

“ON YOUR COMPUTER

On your own computer you will to to make sure the Zip extensions are enabled for PHP. Check your php.ini file for the following:

On Windows: extension=php_zip.dll

On MAC and Linux: extension=zip.so”

Seeing as I am a user of GoDaddy Linux Shared hosting I dropped extension=zip.so in my php.ini.

ZipArchive was enabled all along, but the additional command line gave what I describe as “the kiss of life” to the PHP configuration.

After I copied php.ini to the server root I logged into cPanel and visited the PHP processes area.

PHP Processes in Linux cPanel

From there I killed all the processes to flush the PHP cache and then went back to my WP dashboard to refresh the Duplicator package build area.

Kill PHP Processes

So yeah… it worked! What a relief. Here’s  screenshot showing all Duplicator requirements as having passed:

Duplicator ZipArchive Success

To be doubly sure everything was okay I built a new package. This went without incident.

Analysis

If you’re using Duplicator, I hope this has helped. I also hope you will not rely completely on automatic plugins for backing up WordPress sites.

WordPress Manual Back UpIt’s strongly advised to take manual WordPress backups in addition to creating .zip archive packages.

You’ll sleep much better at night knowing you have multiple options for taking database backups.

I’m in the middle of writing a post about exporting/importing .SQL files and these plugin shenanigans have spurred me on to continue writing that post.

Edit: Here’s my own manual method of backing up a WordPress database using mysqldump via a command line interface called PuTTY.


Viewing all articles
Browse latest Browse all 16

Trending Articles