Blog

How to Fix WordPress Theme’s Uploaded File Exceeds Max Filesize Error

How to Fix WordPress Theme’s Uploaded File Exceeds Max Filesize Error

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.

PHP Editor Tab

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

Edit the PHP.ini file

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:

Edit the .htaccess file

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.

6 Comments

  1. mayank rana
    Nov 02, 2018 @ 16:08

    Thank you so much!! I’m a beginner and I had a very hard time trying to install a plugin. The only thing it worked for me was to editing the .htaccess file in wordpress. Thanks for your very usefull explanations!

    Reply

  2. Saurabh
    Nov 04, 2018 @ 05:26

    Thank you very much for this tutorial! I am just a beginner in WordPress development

    I love to read WordPress tutorial and It’s very comforting when I can find answers to at least some of my many questions!

    Reply

  3. NickBesbeas
    Jan 10, 2019 @ 20:52

    Great post written here. Keep it up!

    Reply

  4. Daria
    May 23, 2019 @ 08:24

    I got this error multiple times on my blog and I was searching for the solution. Luckily, I found your post and finally I have increased the file size for my blog. Thanks

    Reply

  5. Nicolas
    Jan 28, 2020 @ 18:46

    this file cant be copy “delete-img-btn.png” i dont know what to do

    Reply

    • Nick @ Themify
      Jan 29, 2020 @ 21:22

      Hi,

      You shouldn’t need to copy that image file. If you reinstall the theme, the file will be installed.

      Reply

Reply