Tackle PHP ZipArchive error while using Duplicator wordpress plugin. (GoDaddy shared hosting)

Posted on Posted in Blogs, Technology

Recently while transferring a client’s website from my development server to his Godaddy shared hosting server using the awesome wordpress plugin “Duplicator” I encountered the PHP ZipArchive error. I searched through the internet, reading through forums and blogs and was finally able to solve it. So I wanted to share my experience and provide you the complete solution in one single blog.

 

 

What is PHP ZipArchive error?

PHP ZipArchive error occurs when the server doesn’t have the means to unzip a “.zip” file (or that’s what I understood). In my case, the server couldn’t unzip the “.zip” file that Duplicator plugin creates when we bundle the website in the dev server.

A screenshot of PHP zipArchive error

 

To solve this issue you need to install a PHP extension called PHP zipArchive or ‘Archive_zip (0.1.2)’ in the hosting server. For this you should have access to cPanel in Linux Hosting environment, which godaddy shared hosting plan provides.

How to tackle this error?

You don’t need to run complex linux commands to add PHP extensions in the server (now that’s a relief!!!). You can do this using the GUI by clicking a few buttons. Let me show how.

  1. First login to your cpanel.

    screenshot to tackle php zip archive error

  2. Under software, click PHP Pear Pacjkages.

    screenshot to tackle php zip archive error

  3. In this new screen, in the search box under “Find a PHP Extensions and Applications Package” type “zip”.

    screenshot to tackle php zip archive error

  4. The module ‘Archive_zip (0.1.2)’ will appear in the list. Click the install button in the right side.

    screenshot to tackle php zip archive error

  5. It should install without throwing any errors. Click ‘go back’.

    screenshot to tackle php zip archive error

  6. Now you have to activate this extension. Again under software, click Select PHP version.

    screenshot to tackle php zip archive error

  7. You’ll see a list of available extensions. Scroll down to find ‘zip’.

    screenshot to tackle php zip archive error

  8. Click the checkbox and hit ‘save’. Now you are good to go.

    screenshot to tackle php zip archive error

 

This should enable you to smoothly transfer your site using duplicator. But sometimes due to other parameters set in php.ini or apache settings, Duplicator may throw error 500. Now error 500 is a bit difficult to diagnose. So firstly you should try manually unzipping the archive file created by duplicator in the ‘File Manager’ window itself, then run the installer.php script in your browser. Hope that makes sense. If not, feel free to comment below and I’ll help you the best I can.

 

If you liked this article please comment and show your support and interest so that I’ll be motivated to continue this effort. Like our facebook page if you haven’t already.

 

 

Comments

comments