how to increase wordpress maximum upload size

how to increase wordpress maximum upload size

WordPress default for upload size is 2M and there are multiple ways you can try to increase it.

If you pay for a hosting provider then you will have to be able to access server configuration files via ftp, file manager, ssh, etc.

Solution 1: using .htaccess way

You can get .htaccess file from root folder of your website. Mostly it’s hidden. So using FTP makes sense. Or you have to open your file manager with hidden files.
If there is no .htaccess file, create and upload/paste in root (before creating .htaccess file, make sure there is no .htaccess file). Paste the following code,

php_value upload_max_filesize 1024M
php_value post_max_size 1024M
php_value max_execution_time 1000
php_value max_input_time 1000

Solution 2: Theme’s Functions.php File

Out of these 3 methods, this is easy way. Open your theme’s functions.php file. You can find function.php file by following way,
wp-content –> themes –> select your current Theme -> functions.php file
And, just add following code at there,

@ini_set( ‘upload_max_size’ , ‘1024M’ );
@ini_set( ‘post_max_size’, ‘1024M’);
@ini_set( ‘max_execution_time’, ‘1000’ );

Solution 3: PHP.INI file method

You can find your php.ini file in root folder. Sometime you can’t find there. No problem, just create one php.ini file and paste/upload in your root folder with following code. If already file is there, just add this code,

upload_max_filesize = 1024M
post_max_size = 1024M
max_execution_time = 1000

I host my websites on my own server so this method worked for me. Note that I use Ubuntu 14.04.1, ISPConfig, php5, apache2, fast-cgi.

Solution 4: PHP.INI file method using ISPConfig

If you use ISPConfig you can go to your websites. Click on the website that you need to increase the upload size. Then click options and put this in the Custom php.ini settings:

display_errors = On
post_max_size = 48M
upload_max_filesize = 24M

You can change the values to whatever suits your needs.

There is also a WordPress plugin that may do the trick:

There are no comments published yet.

Leave a Comment