Upload limit with php.ini in Wordpress

Asked

Viewed 11,840 times

3

Please, you know how to change the Settings

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

from 2M to 10M (for example)?

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

I have an xml file to go up, which is barred by this configuration.

5 answers

3

I suppose that Voce has a php hosting and with Cpanel access to it, the first one I would 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 so we can take a look at it.

  • Melkysalem, as I had applied before, via php.ini did not work, but anyway thank you very much for the prompt reply. I will ask the staff of Locaweb for the change. Abs

  • 3

    Melkysalem, finally found the solution, the php.ini file should go to the wp-Admim folder, when it comes to wordpress. SOLVED! Abs.

  • Good, it is already solved for the next ones who need, abs

  • Pedro posts the solution as answer and not as comment and accept!

  • Man, thanks a lot for the answer, I’m getting beat up here, I created php.ini but I had put it in the root, not wp-admin. Saved the country here!

1

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.

0

For those who are going through the same problem, follow the tip of Peter who commented on the response.

If you tried to put the file php.ini at the root, or in the folder /public_html and yet it didn’t work and you use the Locaweb.

To try to change the upload values, create the file php.ini inside the briefcase wp-admin of Wordpress (With me it worked).

Usually there is a file php.ini model at the user root in the case of Locaweb, copy the contents of it and place inside the specified folder and change the following lines:

upload_max_filesize = 50M post_max_size = 50M

The number 50M may be the one of your need. If your problem was another and managed to solve, post and let the community know.

-1

Just add this line:

php_value upload_max_filesize 256M

At the end of the file .htaccess

-2

Just add this line:

php_value upload_max_filesize 256M At the end of file . htaccess

remembering that it is M instead of MB or K instead of KB!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.