How to Set A Maximum File Upload Size Advanced

Setting a maximum file upload size in Wordpress requires the user to have access to the server FTP where he is hosting his website.

Keep in mind

If you do not have access to your website FTP, contact your hosting provider to give you access or simply inform him to make the modifications for you.

The change can be done in two different ways:

  • Modifying .htaccess files
  • Use the ini_set() PHP function

Modify .htaccess files

  1. Go to your site's root directory
  2. Open the .htaccess file there
  3. Edit the file and paste the code below
  4. Make sure you upload the .htaccess file back in the site's host root directory once that is done.

php_value upload_max_filesize 128M php_value post_max_size 128M

Use the ini_set() PHP Function

  1. Go to your site's root directory
  2. Open the wp-config.php file
  3. Edit the file and paste the code below
  4. Make sure you upload the file back in the site's host root directory once that is done.

@ini_set( 'upload_max_size' , '128M' ); @ini_set( 'post_max_size', '128M');
Keep in mind

The recommended file size for this theme is 128 MB.

Warning

Modifying a server setting might have unforseen consequences. If you are not sure of what you are doing or you are not proficient with changing files on a server, please notify your hosting provider and they will make the modifications for you.