Cannot increase maximum upload file size in local WordPress

Solution:1

Go to C:/Xampp/php/php.ini and find:

memory_limit=.....M

Change it to:

memory_limit=10000M

Then scroll down to:

post_max_size=.....M

And change it to:

post_max_size=9999M

Find:

file_uploads=...

If it’s of write:

file_uploads=On

Scroll down and find

upload_max_filesize=....M

Write there:

upload_max_filesize=9000M

Also find:

max_file_uploads=.....

And write there:

max_file_uploads=10000M

Attention! Be careful! “Memory_limit” should have the largest number of megabytes. The next is “max_file_uploads”, after which is “post_max_size”, and last the “upload_max_filesize”.

If there is still the same error, make your .htaccess like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /your_site_name/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /your_site_name/index.php [L]
</IfModule>

# END WordPress
    # WP Maximum Execution Time Exceeded
    <IfModule mod_php7.c>
    php_value max_execution_time 300

    php_value upload_max_filesize 9000M
    php_value post_max_size 9999M
    php_value max_input_time 300

    </IfModule>

Solution:2

Just do the following steps, it may increase your size.

1. Editing the .htaccess File

  • Increase additional PHP limits by adding these lines into the .htaccess file :
    php_value post_max_size 256M
    php_value memory_limit 512M
    php_value max_input_time 180
    php_value max_execution_time 180
    

2. Editing the wp-config.php File

  • the wp-config.php file located in your root directory. edit the wp_config. php file. Add the following line.
    @ini_set('upload_max_size' , '256M' );
    

3. Updating php.ini

  • Navigate to your php.ini file and edit it. If you can’t find it, ask assistance from your hosting providers. Locate the upload_max_filesize and increase it by changing its number. You can also boost a few other limitations, as shown below:
    upload_max_filesize = 256M 
    post_max_size = 256M 
    memory_limit = 512M 
    max_execution_time = 180
    

Save the file, and that’s it, the error should no longer occur.