Incompatible Archive Error in WordPress 6.4.3: Troubleshooting Guide 

RV
By: Raj Vardhman

Stuck with the “Incompatible Archive” Error in WordPress 6.4.3? Here’s How to Fix It!

When you’re trying to upload a new plugin or theme in WordPress 6.4.3, especially when using MacOS, only to be met with the frustrating “Incompatible Archive” error message? Don’t worry, you’re not alone. This issue arises from a recent security update in WordPress that clashes with how Mac-compressed zip files are structured. There are ways to get them working again; in this handy guide, we’ll equip you with a range of solutions, from quick and easy fixes to more advanced options, to conquer the “Incompatible Archive” error and get your uploads flowing smoothly again.

Understanding the Error

The culprit behind this error is the difference in how Mac’s built-in compression tool structures zip files compared to other systems. This difference wrenches WordPress’s 6.4.3 verification process, leading to the dreaded error message. However, the good news is that the fix doesn’t require advanced technical knowledge.

Solutions to the Rescue

Here are four practical ways to tackle the “Incompatible Archive” error:

1. Re-compress the Zip File (The Easiest Fix):

  1. Windows users 

The simplest solution for those comfortable using a Windows machine. Just extract the zip file you’re trying to upload and then re-compress it using the built-in compression tool on Windows to ensure the file structure becomes compatible with WordPress 6.4.3’s expectations, here’s how you do it.

  1. Extract the original zip file you downloaded.
  2. Right-click the extracted folder containing the plugin or theme files.
  3. Select Send to > Compressed (zipped) folder. Creates a new, Windows-compatible zip file.
  4. Upload the newly compressed file to your WordPress site.

2. Use a Terminal Command on macOS:

For advanced users using macOS and comfortable with the command line, here’s how to directly compress the folder using the Terminal:

  1. Open the Terminal app.
  2. Navigate to the directory containing the plugin or theme folder using the cd command (e.g., cd Downloads).
  3. Execute the following command, replacing plugin-name with the actual folder name:
 zip -r plugin-name.zip plugin-name/

4. Upload the generated my-plugin.zip file to your WordPress site.

2. Leverage a Code Snippet Plugin (For Users Comfortable with Code):

If you’re familiar with basic code editing, you can implement a temporary workaround using a plugin like “Code Snippets”:

  1. Install and activate the Code Snippets plugin.
  2. Create a new snippet and paste the following code:
add_filter('wp_archive_uncompress_method', 'custom_unzip_method');

function custom_unzip_method($method) {

    if ('PclZip' !== $method) {

        $method = 'PclZip';

    }

    return $method;

}

This code forces WordPress to use the PclZip library for extraction, potentially bypassing the incompatibility issue.

3. Save the snippet and activate it.

4. Attempt to upload the original zip file again.

3. Implement a Fallback to PclZip (Advanced Users):

For developers comfortable with modifying theme or plugin functions, a more robust solution involves adding a conditional statement to your code.

if (false === ZipArchive::open($filepath)) {

    // Attempt using PclZip if ZipArchive fails
    require_once('path/to/pclzip.lib.php');

    $pclzip = new PclZip($filepath);
    
    if ($pclzip->extract() === false) {
        // Handle extraction failure using PclZip
    }
}

This code attempts to use PclZip if the default ZipArchive fails, offering more flexibility. However, it requires coding skills and a separate installation of the PclZip library.

This option temporarily downgrades your WordPress installation to version 6.4.2, which doesn’t have the zip file verification conflict.  

I strongly recommend sticking to the other solutions described in this article, which offer safe and effective ways to resolve the “Incompatible Archive” error in WordPress 6.4.3.

Final thoughts 

While these solutions should get you back on track, the WordPress community and plugin developers are actively working on a permanent fix for this issue. We’ll post updates on our website and newsletters once we have more information, so stay tuned!

Don’t hesitate to subscribe to our newsletters for the latest updates and solutions delivered directly to your inbox. Together, we can ensure a seamless and enjoyable WordPress experience for all!