30 Oct 2018
During a plugin or theme installation process, there can be an error which states that you have exceeded the max upload file size allowed on WordPress. However, the good news is that this is not an end-of-the-road issue as we can use a few methods to increase the max file upload size alloted.
There are a few methods that can be used to fix this issue. If you are using a shared hosting service, you might have to contact your hosting provider to increase your file upload limit. However we can also try to DIY (do it yourself) using one of the following methods.
Option 1: Edit the PHP.ini file
We can edit the PHP.ini file by using FTP or a file manager plugin. For this guide we will use the WP File Manager to edit the files. In most cases, the PHP.ini file would be located in the root folder but if you don't see it, you can create it there and continue to edit it.
You will have to go to the WordPress admin panel > WP File Manager and open the PHP.ini file or create the PHP.ini file, if it is not already there. Once you have opened/created the file, you can edit this file by right clicking it, then click the edit file option and add this max upload filesize value to it:
upload_max_filesize = 128M
Optionally, you can add more PHP setting options in this file such as the following:
post_max_size 128M max_execution_time 300 memory_limit = 3000M
Once you have completed the changes, simply save the file and close it. Then try to install the theme or plugin once more.
Option 2: Edit the .htaccess file
Another option, is to edit the .htaccess file in the root folder of your hosting server so this can be accessed through FTP or by using a third party plugin such as File Manager, which we will using again in this guide.
Just like we did in the PHP.ini file, you can right click the .htaccess file and edit it. You can edit the file by adding the following code:
php_value upload_max_filesize 1000M
The file should look like this:
When you have added this code, you can now save the file and the process is complete. Go back to WordPress admin and try to upload a large theme or plugin zip. If you still encounter the max upload error, please contact your host provideer as they might have different configurations.