php.ini max upload

Discussion in 'Server Operation' started by Tom John, Dec 19, 2024 at 3:36 PM.

  1. Tom John

    Tom John Active Member HowtoForge Supporter

    Hi guys,
    i run ispconfig new version.
    for wordpress i want to encrease
    upload_max_filesize = 256M
    post_max_size = 256M
    max_execution_time = 300
    i find out which php.ini to use:
    Code:
    php -i | grep -i "loaded configuration file" 
    Loaded Configuration File => /etc/php/8.1/cli/php.ini
    
    when i check php.ini
    Code:
    sudo php -i | grep -i 'upload_max_filesize' 
    upload_max_filesize => 256M => 256M
    
    sudo php -i | grep -i 'post_max_size' 
    post_max_size => 256M => 256M
    
    
    
    when i want to upload in wordpress i get the message maximum upload file size 2 MB.
    Do you have an idea what i made wrong?
    Thanks a lot for your kind help
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This command returns the php.ini file of the php shell command and not the php.ini file of a website. If you want to know which php.ini a website is using, then you must put a PHP file into that website, which contains the phpinfo() command and then open that file with a web browser.
    Each PHP mode and version has its own php.ini file on Debian and Ubuntu Linux. the file you edited is in the cli folder, means command line interface. So its for PHP on the shell only. What you want to edit the is php.ini for PHP-FPM, and that's:

    /etc/php/8.1/fpm/php.ini

    Don't forget to restart PHP-FPM afterwards:

    service php8.1-fpm restart

    But an easier way to set this for a specific website would be to use the custom php.ini field on the options tab of the website in ISPConfig.
     
    ahrasis likes this.
  3. Tom John

    Tom John Active Member HowtoForge Supporter

    HI,
    thanks a lot for your detailed answer, now i understand the problem.
    I chose the options tab in ISPConfig and i did not know that this exist, and your are right much more easier way to handle this, thats really genius.
    Thanks a lot for your quick reply and for your really big help again like always.
    Have a nice weekend and thanks a lot i dont know what i would do without you guys.
     
    till likes this.

Share This Page