How to Increase Maximum Upload File Size in WordPress

160 0

There are few different ways to increase maximum upload file size in WordPress

Method 1: .htaccess

Go to your WordPress installed directory from hosting file manager then open the .htaccess file. If the .htaccess file not showing in the directory then click on Settings from the upper right corner and mark check Show Hidden Files (dotfiles) option.

wordpress htaccess file

Change the value as your need then copy-paste this code in your .htaccess file. If your internet connection is slow then increase max_execution_time

php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value memory_limit 256M
php_value max_execution_time 500
php_value max_input_time 500

Method 2: wp-config.php

Open wp-config.php from WordPress installation directory and paste the code

@ini_set( 'upload_max_filesize' , '512M' );
@ini_set( 'post_max_size', '512M');
@ini_set( 'memory_limit', '256M' );
@ini_set( 'max_execution_time', '500' );
@ini_set( 'max_input_time', '500' );

Method 3: php.ini

If you working on localhost or your hosting provider allows you to edit php.ini file then you can increase the values by searching upload_max_filesize, post_max_size, memory_limit, max_execution_time, max_input_time

If any of above method doesn’t work then contact with your hosting provider.

Leave a Reply