skip to Main Content

I have tried changing the php.ini file too. But no clue at all. I am using cPanel Hosting and help me to change the settings of maximum file upload size from default 2MB to maximum value. Also .htaccess method was also failed.

3

Answers


  1. There are several ways to do it.

    You can edit theme functions.php file @ini_set( 'upload_max_size' , '8M' );

    You can edit php.ini file upload_max_filesize = 8M

    You can edit .htaccess file php_value upload_max_filesize 8M

    Further reading.

    Cheers!

    Login or Signup to reply.
  2. While you are on shared hosting you should first check the master php values provided on your server. Server controls the master value and you can control the local value and you cannot put values higher than master value on local.

    You can check current php values from phpinfo().
    Create a file info.php on public_html with following php scripts.

    <?php
    phpinfo();
    

    And check the php master and local value from URL : http:// yourwebsite.com /info.php
    If the master value is greater than local value then you can change the php value from .htaccess and php.ini. If not you have to contact your service provider.

    https://mediatemple.net/community/products/dv/204404784/how-do-i-increase-the-php-upload-limits

    Login or Signup to reply.
    1. Go to the cPanel settings and select the option ‘Select PHP Version’.

    2. Next, click the right top option in the same page to show all configurations.

    3. Find the max_file_size property and change it according to your needs.

    Hope it answered your question.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search