Class ZipArchive not found – Dreamhost Fix

I’ve been working with a plugin that allows you to export a zip file of information. I use DreamHost for hosting and have been very pleased with their tech support. When I tried to export a zip file I got the following error:

Upon investigation I found out that you can compile your own PHP and add –with-zip => –enable-zip to make this work, but that gets pretty technical and can take some time to do.

I also learned that you can just change your PHP from 5.2 to 5.3 (works with DreamHost) and I wanted to share how you can do that.

In the above link, someone that worked at DreamHost said that the error was fixed in their update to PHP 5.3, so below I will tell you how to change that.

It’s quite easy:

  1. 1. Login to your Panel
  2. 2. Click Manage Domains
  3. 3. Find your domain and under Web Hosting, click Edit
  4. 4. Under Web Options use the dropdown menu to choose PHP 5.3 (note: You can choose CGI or FastCGI)
  5. 5. Click Save Settings and wait 5-10 minutes for the result

Note: You may have to deactivate or delete your plugin and re-install to see results.

And that’s all. Your PHP is now upgraded and you shouldn’t have any issues with ZipArchive ever again…hopefully.

Notify of
Newest Most Voted
Inline Feedbacks
View all comments
Robert Stark
9 years ago

Thanks – that fix worked for my dreamhost site.

8 years ago
Reply to  Robert Stark

Followed the guide on dreamhost, and I see my other plugins have php errors..

@Robert are your plugins working fine? my Bulletproof Security plugin have line errors, as well as other plugins.. about 4 of them..

@TS is there any way around this?

9 years ago

Ow man.

You saved my life! Thanks!


[…] hosts as well (you might have to open a support ticket with them to get it changed). Thanks to John Hartley for the fix. Introducing the Amazing Nova […]

John Hartley is a Director of Product Engineering at Beam Dental in Columbus, OH. With 5+ years of leadership experience he has worked in startups, agencies, and began his career as a freelance Front End Developer. Always looking to iterate, this blog is a place for him to share his knowledge as well as hone his craft, challenge assumptions, and build a strong base of leadership and management knowledge. Connect with him on LinkedIn

Would love your thoughts, please comment.x