Here are the most common reasons why themes or plugins won’t install and what to do about them:
1. Upload the wrong file
The package you downloaded may contain additional files such as documentation, license, other plugins, etc. These files are not part of theme or plugin, so it gives you an error when uploading to WordPress.
To solve this simply extract the package and upload the correct zip file (generally, the file being the name of the theme or plugin).
Keep in mind that you can upload only zip file to WordPress. Also, make sure you don’t make a mistake by uploading plugin file into the theme section and vice versa.
2. File size limits are exceeded
You may find that the allowable file size is exceeded. When this occurs, you’ll see a message similar to this:
“The uploaded file exceeds the upload_max_filesize directive in php.ini”
Please refer to this guide on how to fix file size limit issue.
3. Memory limits are exceeded
This happens when your web hosting PHP memory limit is too low to process the installation.
The error will say something like, “Fatal error: Allowed memory size of _______ bytes exhausted…”
Please refer to this guide on how to fix memory limit issue.
Other ways to solve the problem
If the above solutions don’t work or you are unable to do it by yourself, you need to contact your hosting provider and ask for help. Many hosting companies have chat support which can help you out quickly.
Alternatively, you can upload theme and plugin files via FTP or File Manager in your web hosting control panel.
For themes, go to your WordPress root directory, locate wp-content folder > themes folder and upload theme files here.
For plugins, go to your WordPress root directory, locate wp-content folder > plugins folder and upload plugin files here.