简体   繁体   中英

Wordpress Theme upload error max_file_size

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.

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!

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

  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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM