简体   繁体   中英

Increasing file size upload in WP (already tried to edit php.ini and .htaccess)

I've tried editing php.ini as such:

upload_max_filesize = 40M

and

post_max_size = 40M

and editing .htaccess as such:

<IfModule mod_php5.c>
php_value upload_max_filesize 40M</IfModule>

(an answer suggested on another post,) but am still unable to upload files larger than 2M.

The WP install is on a subdirectory, but the php.ini and .htaccess are on the root. I don't know if that makes a difference.

This is almost always caused by your host capping it regardless of what settings you can change. They do not give users on many shared hosts the ability to change suPHP or .conf (or whatever) files, so you will have to ask them.

You can try and use ini_set('upload_max_filesize', '40M'); in the wp-config.php file. Might also be your hosting provider, but I assume since you have root access that it shouldn't be.

There's more ideas here that might be helpful. http://wordpress.org/tags/upload_max_filesize

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