On March 22, 2024, I learned...

How to fix the “Incompatible Archive” error in WordPress

Let’s say you build a little WordPress plugin. The files are all in tact and you zip it up before heading into the WordPress admin to upload and install it to your site.

But it never uploads. In fact, you get an ominous error message that tells you nothing but “Incompatible Archive.”

Generic WordPress error saying Incompatible Archive.
Yep, that’s the one.

Turns out there’s some sort of compatibility issue that cropped up in WordPress 6.4.3 where files zipped with macOS that makes WordPress cranky. Several posts say a fix is in the works.

Several articles also propose fixes, some involving re-zipping the files in Windows instead (no access), using a terminal command (umm, no), or downgrading to WordPress 6.4.2 (seems backwards). But this one has what might be the best fix since it addresses the issue on the WordPress side of things with a one-line function:

// Quick fix 'Incompatible Archive Error'
add_filter('unzip_file_use_ziparchive', '__return_false');

That did the trick for me! The article doesn’t have a byline for the author but it looks like it’s Dirk Dewever, at least that’s what the metadata tells me. So, Dirk, if that’s you… thanks!

⌥ Permalink

2 Comments

  1. # March 25, 2024

    You’re welcome!

    Reply
  2. # November 22, 2024

    Thanks for the detailed guide, Geoff! I was really struggling with the “Incompatible Archive” error and your tips made all the difference. Especially the advice on checking file types and ensuring they were properly compressed. Keep up the great work!

    Reply

Leave a Reply

Markdown supported