hands-holding-downloading-mobile-phone with coffee cup beverage

Increase Media File Maximum Upload Size in WordPress

Those who like to upload good quality images, videos, or even upload a plugin, sometimes need to increase the default upload size of WordPress platform.

Well, the tip of this post is about it….

There are some ways to do that. One or more ways may fit you. I say that because as a WordPress developer, not all ways were possible to get in.

1. Update .htaccess file

If your web server is using Apache and PHP is set as an Apache module, then you can add a few lines of code in your WordPress .htaccess file to increase the max upload size in WordPress.

There are 2 ways until I know, that you can access your .htaccess file:

  • To access your .htaccess file, connect to your server via FTP client and navigate to the folder where WordPress is installed. Open up the .htaccess file in a code editor or Notepad and add the following lines:
php_value upload_max_filesize 64M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

2. Create or Edit php.ini File

Open any text editor and create a new file on your desktop. Copy the following code and save it as php.ini.

upload_max_filesize = 64M
post_max_size = 128M
memory_limit = 264M

3. Add this lines to function.php

Editing your file function.php is one easier way to increase the upload size file. Be aweare, if you change the theme, the max upload size will return to its default values.

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

Of course, you can find numerous plugins that can help you. Just type “max upload size” on plugins search and choose that with a better star rating and check if it is compatible with your wp version.