3 replies
by jamesmehraa Accepted solution
1. Create Or Modify PHP.Ini File
PHP.ini contains the PHP configuration for your server. You can find it in the root directory of your server. Go to your hosting root directory and search for php.ini file. Due to security reasons, it might be hidden, so don’t forget to check “Show hidden files”.
Open php.ini file with any text editor and search for the three settings to modify them according to your requirement. We’ll use the following numbers for this example:
File size to be uploaded: 20MB.
upload_max_filesize = 25MB
post_max_size = 27MB
memory_limit = 30MB
2. Create Or Modify .Htaccess
.htaccess is an important file and contains various configurations for your server. Most hosting providers keep it hidden though. To modify it, you need to check “Show Hidden Files” once again and locate .htaccess file within the root directory of your server.
Open it with any editor and paste these three lines at the end of the file where it says #END WordPress:
php_value upload_max_filesize 25MB
php_value post_max_size 27MB
php_value memory_limit 30MB
3.Modifying A WordPress File
If the above two methods didn’t work for you, there is always an alternative. You can paste the following 3 lines within your WordPress files. These lines can be written in wp-config.php, themes functions.php file etc. However, this is not the recommended way to increase upload file size limit.
@ini_set( ‘upload_max_size’ , ’25MB’ );
@ini_set( ‘post_max_size’, ’27MB’);
@ini_set( ‘memory_limit’, ’30MB’ );
by tamil1996 Accepted solution
upload_max_filesize=64M
post_max_size=64M
max_execution_time=300
You should paste this code in Wp config file
by asamits765 Accepted solution
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending