How to increase Maximum Upload size in cPanel?

前端 未结 12 2142
暖寄归人
暖寄归人 2020-12-14 08:49

I am using cPanel of my website to increase maximum upload file size for wordpress media uploads. I have used the codes(found out from google) for this purpose wp-config.php

相关标签:
12条回答
  • 2020-12-14 09:26

    The solution is to create the php.ini file under your root directory. If the site is the wordpress installation then create the php.ini under your/path/to/wordpress/wp-admin/php.ini and add the following line of codes

    [PHP]
    post_max_size=120M
    upload_max_filesize=132M
    
    0 讨论(0)
  • 2020-12-14 09:27

    Unfortunately, this is something you will have to ask you provider to do.

    If your the owner of the server and can login to WHM it's under:

    Tweak Settings => PHP Settings => Maximum Upload Size
    

    Newer version have it listed under:

    Home => Service Configuration => PHP Configuration Editor => Tweak Settings => PHP
    
    0 讨论(0)
  • 2020-12-14 09:27

    We can increase maximum upload file size for WordPress media uploads in 3 different ways.

    That's are

    1. .htaccess way
    2. PHP.INI file method
    3. Theme’s Functions.php File

    For .htaccess way, add following code,

    php_value upload_max_filesize 1024M
    php_value post_max_size 1024M
    php_value max_execution_time 1000
    php_value max_input_time 1000
    

    for PHP.INI file method, add following code,

    upload_max_filesize = 1024M
    post_max_size = 1024M
    max_execution_time = 1000
    

    for Theme’s Functions.php File, add following code,

    @ini_set( ‘upload_max_size’ , ’1024M’ );
    @ini_set( ‘post_max_size’, ’1024M’);
    @ini_set( ‘max_execution_time’, ’1000′ );
    

    For More Details->>>

    0 讨论(0)
  • 2020-12-14 09:32

    Since there is no php.ini file in your /public_html directory......create a new file as phpinfo.php in /public_html directory

    -Type this code in phpinfo.php and save it:

    <?php phpinfo(); ?>

    -Then type yourdomain.com/phpinfo.php...you will see all the details of your configuration

    -To edit that config, create another file as php.ini in /public_html directory and paste this code: memory_limit=512M
    post_max_size=200M
    upload_max_filesize=200M

    -And then refresh yourdomain.com/phpinfo.php and see the changes,it will be done.

    0 讨论(0)
  • 2020-12-14 09:33

    New Cpanel Settings on a Godaddy
    From Cpanel go to:

    • Software
    • Select PHP version
    • Click "Switch To PHP Options" located on upper right hand corner

    Increase post max size and upload max file size, save and your done.

    0 讨论(0)
  • 2020-12-14 09:34

    You should not replace the text entirely. Add the text after the "# END WordPress".

    0 讨论(0)
提交回复
热议问题