How to Update Upload Max File Size and Max Post Size for WordPress Site

In some cases you would may have to ask your hosting service provider for support. This is more likely the case if using shared hosts.

Some methods I’ve used to increase the upload maximum file size and maximum post size:

Update Theme Functions File

Create or Edit an existing PHP.INI file

Update .htaccess file

After attempting the update, you can quickly test whether it was successful by going to the of your WP dashboard and navigate to the add new media page. You’ll see the upload limit displayed.

Update Theme Functions File Method

Add the following code in your theme’s functions.php file:

@ini_set( ‘upload_max_size’ , ’64M’ );

@ini_set( ‘post_max_size’, ’64M’);

@ini_set( ‘memory_limit’, ’30MB’ );

I recommend doing this in a child theme.

Create or Edit an Existing PHP.INI File Method

Use FTP or cPanel dashboard of your host provider to access your WordPress site’s root folder. If you cannot find the php.ini file, don’t panic. If you are on a shared host, then you may not see a php.ini file in your directory. Just create a file called php.ini and upload it in the root folder.