# Do you support Zip files with PHP?

> Yes. PHP on Ruachost hosting supports Zip archives, so your scripts can create, read and extract .zip files with the ZipArchive class.

Source: https://helpcenter.ruachost.com/faq/guides/do-you-support-zip-files-with-php/

**Yes.** PHP on Ruachost hosting supports Zip archives.

The **zip** extension gives you the `ZipArchive` class. Your scripts can use it to:

- Create `.zip` files, for example to let visitors download several files at once.
- Read the contents of a Zip file.
- Extract uploaded Zip files.

Many applications rely on it. WordPress, for example, uses it to install plugins and themes from `.zip` files.

```php
<?php
$zip = new ZipArchive();
if ($zip->open('archive.zip', ZipArchive::CREATE) === true) {
    $zip->addFile('report.pdf');
    $zip->close();
}
```

## If you get a "Class ZipArchive not found" error

1. Log in to cPanel.
2. Open **Select PHP Version**.
3. Click **Extensions** and make sure **zip** is ticked.

See [Changing PHP versions and settings using PHP Selector](https://helpcenter.ruachost.com/cpanel/software/changing-php-versions-and-settings-using-php-selector/).

> **Tip:**
You don't need PHP to unzip files yourself. In cPanel, **File Manager** can extract and compress files.
