Popular Categories

How to increase Max Upload Filesize in WordPress?

If you are building a WordPress website that requires large image files, then you might face a roadblock of not being able to upload large media files (in most cases approx 2mb to 125mb is allowed).

To check what is the current max upload size limit in your WordPress site navigate to WP Admin then choose Media and click Add New button. You will see the current max upload size on the bottom as shown in the screenshot.

To solve this issue here are a few options:

1. Contact Your Hosting Provider: It is the easiest way if you are willing to code or edit your config files.

2. Updating Your .htaccess file: .htaccess is a configuration file used on web servers running the Apache. These .htaccess files can be used to alter the configuration of the Apache Web Server software to enable/disable additional functionality and features that the Apache Web Server software has to offer.

To access your .htaccess file, connect to your web server via FTP or file manager from cPanel and navigate to the folder where you had your WordPress installed. Open up .htaccess file in a code editor or Notepad and add the following snippet:

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

Save the file and re-upload and You are done.

3. Eding wp-config.php file: It is the most important file in your WordPress installation which is located in the root of your WordPress file directory. It contains configuration details, such as database connection information and other additional settings.

To increase the upload file size in WordPress you will need to add some additional size parameter. To do that, access your WordPress root directory using FTP or file manager via cPanel and locate a wp-config.php file. Open the file and place the following snippet:

@ini_set( 'upload_max_size' , '20M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );

4. Editing function.php file: The file is present in the theme and you can easily increase the size limits by adding the following lines of code in the functions.php file of your theme.

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

5. Using WordPress plugin: WordPress plugin is available for increasing WordPress upload size. The plugin we will be using is Increase Max Upload Filesize plugin.