If you’re seeing this confusing WordPress error when trying to upload the theme, it means the process breaks at some point and that’s most probably due to a few server settings limiting resources for your site. For example the maximum upload size could be set to 5MB and the theme’s package is larger than that. This isn’t a bug but a matter of server settings.
There are two ways to solve the issue:
- Reach out to your hosting company and ask them to increase the upload size limit and the PHP memory allocated for your site.
- Connect to the server and manually do it yourself: How to increase memory allocated to PHP
Recommended PHP configuration:
- max_execution_time: 60
- memory_limit: 64M
- post_max_size: 32M
- upload_max_filesize: 32M
After increasing the PHP memory limit, try to install your WordPress theme again. You won’t face that error anymore. You can increase the memory limit to 64MB or 128MB, as you wish.