简体   繁体   中英

How could I increase my maximum file upload size in wordpress?

I am currently using the .htacces method to achive this

Here is what I am using so far

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

But each time I am getting error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

The better way is to change its settings through php.ini file. Find/change following options:

upload_max_filesize = 100M
post_max_size = 100M

Save this code in any php file and update it in the plugins directory and activate that plugin:

ini_set('upload_max_size','256M');
ini_set('post_max_size','256M');
ini_set('max_Execution_time','600');

You can put these lines before or after any other script in you .htaccess file. Save it and upload. That's it! Hope this helps!

#Change upload limits

php_value memory_limit 34M
php_value post_max_size 33M
php_value upload_max_filesize 32M
php_value max_execution_time 600

#Change upload limits end 

In your php.ini file insert the following lines of code into it if it is not there and increase upload_max_filesize according to your requirements:

memory_limit = 100M
upload_max_filesize = 200M
post_max_size = 100M
file_uploads = On

Ok great, I just got it!!

Adding the followwing code in "wp-admin" folder does the trick

memory_limit = 100M
upload_max_filesize = 200M
post_max_size = 100M

As a summary of the above:

I add the following code in the .htaccess file in the directory wp-admin:

php_value memory_limit 34M
php_value post_max_size 33M
php_value upload_max_filesize 32M
php_value max_execution_time 600

and it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM