Upload limit with php.ini on Wordpress

2

Please, do you know how to change the Configuration

PHP > no Cpanel > software/serviços > 
    > File Uploads  upload_max_filesize Maximum allowed size for uploaded files 

from 2M to 10M (for example)?

While I tried all the ways indicated: via htaccess, php.ini, upinfo.php. I asked for help for Locaweb, but they got me to mess with an online agent (machine) more uninformed than me.

I have an xml file to upload, which is barred by this setting.

    
asked by anonymous 22.07.2014 / 20:00

4 answers

2

I suppose you have a php hosting and with cpanel access to it, the first one I'd try would be to put a php.ini file in / public_html with the following content:

;;;;;;;;;;;;;;;;
; File Uploads ;
; ;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
upload_max_filesize = 128M 

Or put your php.ini to have a look.

    
22.07.2014 / 20:05
0

Go to your wp-config.php and add the line below

ini_set("upload_max_filesize","128M"); // essa linha serve para alterar o valor do upload_max_filesize.
    
05.11.2014 / 20:30
0

For those of you experiencing the same problem, follow the Peter hint commented the answer.

If you tried to put the file php.ini in the root, or in the /public_html folder, it still did not work and you use the Locaweb server.

To try to change the upload values, create the file php.ini within the wp-admin folder of WordPress (With me it worked).

Generally there is a php.ini template file in the root of the user in the case of Locaweb , copy the contents of it and place it inside the indicated folder and change the following lines:

upload_max_filesize = 50M post_max_size = 50M

The 50M number may be in your need. If your problem was different and you could solve it, post it and let the community know.

    
02.04.2017 / 18:15
-1

Just add this line:

php_value upload_max_filesize 256M

At the end of the file .htaccess

    
13.10.2018 / 04:05