This problem is very popular on shared hosting, where web hosting company sets a static maximum file upload limit. You may have a problem with this setting, for example if you need to upload a big files (like pictures, audio or video) to server through Media Uploader. For my shared hosting, it’s only 32MB. In this tutorial, I teach you how to increase maximum upload file size in WordPress.
You will see below three of diferrent methods which you can use. If first is not working, step back and follow to another one.
Method 1 – functions.php file
Add code to your’s theme function.php file and save it. After save, go back to Media Uploader site and check if maximum upload file size is changed.
1 2 3
@ini_set( 'upload_max_size' , '128M' ); @ini_set( 'post_max_size', '128M'); @ini_set( 'max_execution_time', '300' );
Method 2 – .htaccess file
With this method you need to modify .htaccess file in root directory. Remember that you need to modify in root folder, not in WordPress. Simply add following code and save file.
php_value upload_max_filesize 128M php_value post_max_size 128M php_value max_execution_time 300 php_value max_input_time 300
Method 3 – php.ini file
If you don’t see php.ini file in your root directory, just create it, upload to root folder and add following code inside to increase upload size.
upload_max_filesize = 128M post_max_size = 128M max_execution_time = 300
In this example I’ve teached you, how to change maximum file upload size in WordPress to 128MB (128M). If you do not need so much, just change it to 64M or 32M.