max upload size for wordpress

dani3c

New member
Joined
Sep 6, 2025
Messages
2
Hi all,

I'm trying to change the max upload size for wordpress files. Normally is in the PHP options but in the PHP settings I can only manage the PHP versions and a few things more but nothing about it. Could you help me where to find it or manage that please? Thank you very much in advance!

Grettings,
Daniel.
 

Attachments

  • Captura de pantalla 2025-09-06 122746.png
    Captura de pantalla 2025-09-06 122746.png
    108.4 KB · Views: 7
You can use the php.ini file if you have access to it, use a .user.ini file in the public_html root dir or more commonly use a .htaccess amendment.

The .user.ini or the .htaccess must be in the root of your WP install, in same dir as your wp-config.php file

Examples:

php.ini
Bash:
; Your existing contents.....
~
~
; Maximum allowed size for uploaded files
upload_max_filesize = 64M

; Maximum size of POST data (must be >= upload_max_filesize)
post_max_size = 64M

; Optional: increase memory limit for large uploads
memory_limit = 128M

; Maximum execution time
max_execution_time = 300

.user.ini
Bash:
# Your existing contents.....
~
~
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 128M
max_execution_time = 300


.htaccess
Bash:
# Your existing contents.....
~
~
# Increase upload limits for WordPress
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value memory_limit 128M
php_value max_execution_time 300
php_value max_input_time 300
 
Just a quick note, .htaccess works perfectly with Apache and Litespeed servers. Can be sketchy at times, depending on your config with OpenLitespeed servers.
 
Could you help me where to find it or manage that please? Thank you very much in advance!
Additionally, if you're not an admin, please ask your host, because limits migh also be set at the global php.ini file.
And this forum is only intended for support to admins, not hosting customers.

However, if you have your own server, you can also set limits globally depending on what you want.
In the /usr/local/phpXX/lib/php.ini or /usr/local/phpXX/lib/php.conf.d/99-custom.ini file you can put global changes.
 
I don't run cloudlinux on any of my servers, but have used it on others' shared servers before. That has a nice PHP selector and something similar would be lovely packaged with DA for other distros like debian and rhel flavours. Forget the name of the company, but they also had in their PHP settings on the user panel, options to set common PHP variables uploads and memory. Thought that was a nice touch
Additionally, if you're not an admin, please ask your host, because limits migh also be set at the global php.ini file.
And this forum is only intended for support to admins, not hosting customers.

However, if you have your own server, you can also set limits globally depending on what you want.
In the /usr/local/phpXX/lib/php.ini or /usr/local/phpXX/lib/php.conf.d/99-custom.ini file you can put global changes.
 
Back
Top