Low file upload size limit can affect your ability to install plugins, themes and also affect your media uploads.
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.
Add the following code to php.ini:
- upload_max_filesize = 64M
- post_max_size = 64M
- memory_limit = 30MB
Update .htaccess File Method
Use FTP or cPanel dashboard of your host provider to access your WordPress site’s root folder. Edit the .htaccess file in your WordPress site’s root folder and add the following code:
- php_value upload_max_filesize 64M
- php_value post_max_size 64M
- php_value memory_limit 30MB
You can also check out plugins that may do it for you.