Upload limit with php.ini not Wordpress
Please know how to change the setting
PHP > no Cpanel > software/serviços >
> File Uploads upload_max_filesize Maximum allowed size for uploaded files
From 2M to 10M(for example)?
Remembering that I have tried all the ways indicated: via htaccess, php.ini, upinfo.php. I asked for help to Locaweb, but they put me to find an online agent (machine) more uninformed than me.
I am with an xml file to upload, which is barred by this setting.
5 answers
I suppose you have a php hosting and with cpanel access to it, the first I would try would be to put a php file.ini 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 else put your php.ini for us to take a look.
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.
For those who are going through the same problem, follow the Peter who commented on the answer.
If you tried to put the file php.ini
in the root, or in the folder /public_html
and still did not work and you use the server of Locaweb.
To try to change the upload values, create the php.ini
file inside the wp-admin
WordPress folder (it worked with me).
There is usually a file php.ini
template in the user root in the case of Locaweb , copy the contents of it and place inside the indicated folder and change the following lines:
upload_max_filesize = 50M
post_max_size = 50M
The number 50m can be that of your need. If your problem was another and you managed to solve, post and let the community know.
Just add this line:
php_value upload_max_filesize 256M
At the end of the file .htaccess
Just add this line:
Php_value upload_max_filesize 256M At the end of the file .htaccess
Remembering that it is M instead of MB or K instead of KB!