Support » Fixing WordPress » Tthe uploaded file exceeds the upload_max_filesize directive in php.ini

  • Resolved Smita Mishra

    (@smita013)


    the uploaded file exceeds the upload_max_filesize directive in php.ini

    When I tried to upload a theme zip file in live, the message stated above got displayed. I do not have server access, as I am working on a client’s website.

    How to upload the theme file?

Viewing 15 replies - 1 through 15 (of 21 total)
  • If you don’t have any server access then you can try some upload max filesize plugin.
    This may help you
    https://wordpress.org/plugins/increase-upload-max-filesize/

    Thank you

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    Here are some ways to fix this issue:

    How to Increase the Maximum File Upload Size in WordPress

    It did’nt work Steve.
    Thanks anyway, guess I will need to keep uploading by hand.
    J

    Towhid

    (@cryptex_vinci)

    Hi

    The issue is with your server settings which limit the maximum size for uploaded files.
    There are 4 ways you can fix this issue:

    1. Updating Your php.ini file
      • Editing Your .htaccess file
      • Editing your wp-config.php File
      • Contact Web Hosting Support

    Step by step guide of fixing this error:
    https://atlantisthemes.com/fix-upload_max_filesize/

    Thanks

    Hi,
    I delete my php.ini file, and edit htaccess file! Before that, I have the same problem. Now all works perfect. Caution, I also delete my upload_max_filesize plugin. This is my htacess:

    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    	# WP Maximum Execution Time Exceeded
    	<IfModule mod_php5.c>
    	php_value max_execution_time 300
    	
        php_value upload_max_filesize 20M
    	php_value post_max_size 20M
    	php_value max_input_time 300
    
    	</IfModule>
    • This reply was modified 3 years, 2 months ago by atanas1223.

    The previous I want to be reply to @metallicarosetail, so I think the upload_max_filesize plugin should be edited by someone.

    • This reply was modified 3 years, 2 months ago by atanas1223.
    • This reply was modified 3 years, 2 months ago by atanas1223.
    • This reply was modified 3 years, 2 months ago by atanas1223.
    • This reply was modified 3 years, 2 months ago by atanas1223.
    daniel27lt

    (@daniel27lt)

    A lot of times within the php.ini file in the server, uploads is turned off. Look for the following line:

    file_uploads = off

    Then change it to…

    file_uploads = on

    Thanks, @atanas1223

    I have Linux/cPanel hosting. Fwiw, I saw the different approaches here, then searched my hosting provider’s (GoDaddy’s) help area for confirmation. What I found there was simple — and it worked:

    Go to your site’s ~/public_html/ directory.
    Edit (or add) a php.ini with the following contents (I had to create a new file):
    file_uploads = On
    post_max_size = 50M
    upload_max_filesize = 50M

    Saved it and the upload worked.

    (@atanas1223) good its working

    @atanas1223
    thanks it’s working for me too.
    Recently two of my websites were facing same the same issue. One was the same but other one was [redacted].
    If was getting same kind of error in Sitemap File. Due to which I was loosing quite much traffic.

    Same step made me recover sitemap file as well as lost traffic too. The lesson is save config file and then try to experiment it if you are facing same kind of .php ini related error in your WordPress website.

    • This reply was modified 2 years, 9 months ago by Steve Stern.

    The response from codingauthority worked for me. This was on a GoDaddy hosting account, btw.

    The response from codingauthority worked for me LIKE A BOSS!

    @shashohag
    @aijazahmad
    @ccpn

    I just share my work with all of you for I’m not the only happy. I love to hear that it helped you! <3

    @liquidclicks
    @oraysion
    Thanks for your comments
    i m really happy that’s worked for you…

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Tthe uploaded file exceeds the upload_max_filesize directive in php.ini’ is closed to new replies.