1. Documentation
  2. Troubleshooting
  3. Cannot upload the theme

Cannot upload the theme

Typical error: Incompatible Archive

When attempting to upload a theme or plugin to WordPress (specifically WordPress version 6.4.3), you may run into this error: Incompatible Archive.

How to fix Incompatible Archive:

  1. Go to your site admin area.
  2. Navigate to Plugins -> Add New.
  3. Search for Code Snippets
  4. Install and activate the plugin.
  5. Navigate to your site admin area -> Snippets -> Add New -> add the following code and run it everywhere:
add_filter( 'unzip_file_use_ziparchive', '__return_false' );

This happened because of a bug introduced in WordPress 6.4.3, specifically this changeset: https://core.trac.wordpress.org/changeset/57388

There is a bug fix and core trac ticket to follow about this issue here: https://core.trac.wordpress.org/ticket/60398

Typical error: Are you sure you want to do this?

When you are trying to install the theme, and WordPress comes back with the message “Are you sure you want to do this?” it means that your PHP has a setting for uploading files lower than the ZIP file size.

You need to contact your hosting provider and ask to increase the “upload_max_filesize” and “post_max_size” to at least 32MB. Then, follow the theme install guide.

This could also be because you are trying to install the wrong zip file. Make sure you select the “Installable WordPress file only” option. If you choose “All files & documentation” by mistake, you cannot install this zip as is. Instead, unzip the file and locate the installable theme file within it.

Typical error: Stylesheet is missing

If, after clicking Install Now you see an error that “The package could not be installed. The theme is missing the style.css stylesheet” you have uploaded the wrong .zip file.

Make sure you select the “Installable WordPress file only” option. If you choose “All files & documentation” by mistake, you cannot install this zip as is. Instead, unzip the file and locate the installable theme file within it.

This message is displayed because your server settings for upload max size or maximum memory are poorly configured.

How to fix:

Don’t worry; this is a common issue, very simple to fix. If you are not used to setting your server PHP / memory settings, contact your hosting company to do it for you. This is their job; it takes 1 minute to do. Show them a screenshot of your error, or email them the error message. Ask them to assist by increasing the following values until you can install your theme.

  • memory_limit 256M 
  • max_execution_time 240
  • post_max_size 32M
  • upload_max_filesize 32M

Was this article helpful?