wp-content » themes » functions.php » Increase the WordPress default upload file size limit ⬆️

Increase the WordPress default upload file size limit ⬆️

To check the current WordPress file upload limit, navigate to WordPress dashboard, click Media -> Add, and the upload limit will be displayed on the bottom.

image 16 - Increase the WordPress default upload file size limit ⬆️
To increase the file upload limit in WordPress, edit your website .htaccess file and add the following:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

And the second method, edit your theme’s functions.php file and add the following

@ ini_set ( 'upload_max_size' , '64M' ) ;  
@ ini_set ( 'post_max_size' , '64M' ) ; 
@ ini_set ( 'max_execution_time' , '300' ) ;  
See also  ❌ PHP Fatal error: Unknown: Failed opening required wordfence-waf.php

Was this post helpful?

Leave a Comment

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.

Recommended