When starting WordPress and uploading a theme, this is one of the common issues that occur. The error itself does not reveal anything about the problem, so less experienced users may simply get stuck without a solution.
The solution to this problem is more than simple and easy and only requires a few clicks.
What is the cause of this error?
The first cause is the upload limit, which is smaller than the theme or plugin you are trying to install.
The second cause is the maximum upload time, i.e., the script execution time, which is limited in seconds. In this case, if you have a slow internet connection and it takes more time to upload than allowed, the limit is exceeded.
How is it resolved?
Whichever of these two cases is the reason, we will combine the solution into one, which is modifying the PHP INI options in cPanel.
Log in to cPanel and find the MultiPHP INI Editor option. When you click on this option, something similar to the image below will open.
Now you need the “Select location” option. When you click on it, you will see “Home directory” and domain; if you have multiple domains on your hosting account, all of them will appear, and you choose the domain for which this error is reported.
Now that we have selected the domain, we get options like in the image below.
Before making changes, note:
The settings placed here are really good and allow your site to run safely and well. This is very important to know. After you change these parameters and finish the site, it is highly desirable to return to these settings, as shown in the image, to maintain a safe and good level.
Themes that are usually purchased on themeforest.com are great in terms of appearance, but the vast majority are made using page builders and a good number of plugins, which may require you to leave some parameters and not be able to return them as you see in the picture and which are currently set. This does not mean that you will have a problem, but simply that the theme is designed that way and there is nothing you can do. Your site will work fine, but it would work better if it were optimized, and increasing the values indicates that the site is not well optimized.
Which parameters do we change?
max_execution_time set to 90
max_input_time set to 120
upload_max_filesize set to 50mb
post_max_size set to 50mb
Changed, but still not working?
If this is the case, then we just increase these parameters even more.
max_execution_time set to 300
max_input_time set to 300
upload_max_filesize set to 100mb
post_max_size set to 100mb