I have several Wordpress installs in a WHM Environment. My WHM PHP(5.6) max upload size is set to 100MB & PHP max POST size 150MB. I also check MultiPHP INI Editor and the max upload size is the same. But for some reason all my Wordpress installs have a max upload size of 8MB. I cannot get it to change.
I've tried the following:
Added php.ini file, but does not help/change
Added php code to the .htaccess, but it causes a Internal Server Error
Added php code to the theme's function.php, but it causes a Internal Sever Error
Spoke with HostGator customer server for a couple hours and they were not able to help.
Any ideas?
Hi Try to add these lines in your theme functions.php
#ini_set( 'upload_max_size' , '64M' );
#ini_set( 'post_max_size', '64M');
Or verify your php.ini files and change these values
upload_max_filesize = 64M
post_max_size = 64M
Or add this in your .htaccess files
php_value upload_max_filesize 64M
php_value post_max_size 64M
You should restart your apache server after changing the php.ini file to take effect on your hosting.
If you are using Wordpress multisites you can have a restriction from Wordpress itself you find it under Settings -> Network settings -> Maximum file size
If you don’t want coding, directly increase max upload size through this free plugin https://ziscom.today/max-upload-size/
After installation go to WordPress menu ‘Max Upload Size’
* Only enter the numeric value in bytes
* 1024 bytes = 1KB
* 1048576 bytes = 1MB
It worked for me. Hope it help for you.
Related
My domain and hosting site is https://www.pk-domain.com/
Theme is Zakra and Editor is Elementor.
Can you help me for Increase the maximum space my site file is more than 200MB.
Screen Shot
You need to contact your hosting provider or you need to install All-in-One WP migration import plugin, that increase file size to 512 Mb.
There are different way to increase your maximum upload size
Contact Your Hosting Provider
This is the easiest solution as you don't mesh your configuration
and some of alternative solutions can be used if your hosting provider takes too much time to respond
.htaccess’ File
Open the .htaccess file and then add the following lines
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
Create or Modify the ‘php.ini’
Usually this php.ini is located in your root folder if it doesn't exist then you can create this files manually and add the following lines
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 128M
Using Wordpress Plugin
If you are not comfortable with the file editing stuff then you can use this plugin which is available in WordPress repository WP Increase Upload Filesize | Increase Maximum Execution Time
Verification
You can verify/confirm the changes by Site Health Info which is available in WordPress
I'm wondering if anyone has any ideas about this - I've been struggling with increasing the max upload size for my wp site for weeks now.
I've tried editing the php.ini parameters 'upload_max_filesize' (umf), 'post_max_filesize' (pmf), 'memory_limit' (ml) to no avail. I need to upload files up to 500M in size and mysteriously managed to get it to upload somewhere around 410M max (even though I had 500M in the .ini file and the wp media panel said 'max file upload size: 500M'). Suddenly today I went to upload and it read 'max file upload size: 0 B' - I checked the .ini and it was set to 2M for 'umf', 0 for 'pmf' (something must have been written over).
I changed umf to 500M, pmf to 500M, ml to 1000M, restarted nginx via command line (the host is digital ocean, os Ubuntu) and the WP media interface still reads 0 B. I checked my info.php file and umf reads 2M there. The loaded config file path is '/etc/php/7.0/fpm/php.ini' and that's the one I'm editing. If anyone had any suggestions before I smash my screen w/ a hammer I would greatly appreciate it :)
Try doing it in your functions.php and see if it makes a change or not.
#ini_set( 'upload_max_size' , '500M' );
#ini_set( 'post_max_size', '500M');
#ini_set( 'max_execution_time', '300' );
If that doesn't work you can also do it in your .htaccess file for WordPress if you're using Apache.
php_value upload_max_filesize 500M
php_value post_max_size 500M
php_value max_execution_time 300
php_value max_input_time 300
In my content type, my drupal 7 server is stating I have a 'current max limit 8MB' for file uploads. So I cannot change this to 128Mb as I want to.
But my web host php settings allow for 128MB uploads and in my config/media/file-settings I have set an upload of 128 MB uploads. In my settings.php file I have set 'ini_set('memory_limit', '2048M'); ' under PHP settings.
Why is my Drupal site not increasing the upload size, though I have set the increased upload size in all the file settings, the content type settings and php settings file. There is no error message, but also no increase. What have I missed out, or what am I doing wrong? How can I increase the file upload?
Thank you
You could add these lines to your htaccess file in your root directory.
php_value upload_max_filesize 128M
php_value post_max_size 128M
I need to upload a PDF file to my wordpress site. When I go to Upload New Media, and try uploading it, it says
FileName.pdf exceeds the maximum upload size for this site.
I tried looking for my php.ini file but could not find it. I ran phpinfo() by creating a new file and then opening it in my browser and found this.
Configuration File (php.ini) Path
C:\Windows
Loaded Configuration File
C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\php.ini
I placed a php.ini files with
upload_max_filesize = 512M
post_max_size = 512M
max_execution_time = 300
in wp-admin, httpdocs and everywhere I had access, nothing worked The max upload file size is just 8 MB. Please help me, My client needs to upload that file.
Note: Please don't tell me to restart server, as I can't, It is a hosted site.
Try with the following plugin:
<?php
/* Plugin Name: Increase Upload Limit */
add_filter( 'upload_size_limit', 'b5f_increase_upload' );
function b5f_increase_upload( $bytes )
{
return 33554432; // 32 megabytes
}
I built this code based on the following core function:
function wp_max_upload_size() {
$u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
$p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
$bytes = apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
return $bytes;
}
Another option is upload via FTP and use the plugin Add from Server.
What worked for me was editing the php.ini file at
/etc/php5/apache2/php.ini
and adding/editing the following options starting (~ line 786):
memory_limit = 32M
upload_max_filesize = 32M
post_max_size = 32M
I tried different way like attempted to
change my limit directly on my server
through the .htaccess file
wp-config.php
but none of these changes worked for me. Then I came across a post somewhere That I summarised in a blog post(find below)
All you need to do is
create a php.ini
upload to admin directory
Your Php.ini may contain following or whatever limit you need
memory_limit = 32M
upload_max_filesize = 32M
post_max_size = 32M
file_uploads = On
WHM/CPanel users Only
I have been struggling with this for a while now, I found the most simple way to solve this to login to your WHM > PHP Configuration Editor > Change (upload_max_filesize) then hit "SAVE".
This makes a change to your server's php.ini file (the simple way).
Seeing as you're on hosted service, try adding these to your .htaccess file as well:
php_value upload_max_filesize 512M
php_value post_max_size 512M
You won't be able to change these via ini_set();
This applies to cPanel users only. I'm not sure about which versions of cPanel it will work with, but it works with the version 56.0.33.
Login to cPanel > Select PHP version > Switch To PHP Options > Click the greyed out number next to upload_max_filesize > Change > Save
I believe this makes a change to the server's php.ini file.
I'm running WHM / cPanel on a CloudLinux based server. I tried everything. The final solution for me was adding a php.ini file to the /wp-admin/ directory with the following;
memory_limit = 128M
upload_max_filesize = 32M
post_max_size = 32M
Keep in mind I previously tried a php.ini in the document root and the web root directories and those didn't fix the max upload limitation.
You have written php.ini file properly. Just mention path of your php.ini file inside .htaccess file using suPHP_ConfigPath/home/username/public_html. Here replace username with your username mentioned in cpanel. You can refer http://www.vinaypn.com/how-to-fix-maximum-upload-size-exceeded-error-in-wordpress-running-on-shared-hosting/
I'm trying to increase the file upload size in a Wordpress blog to allow an admin to post his e-books and large PDF files. The site is hosted on GoDaddy / IIS 7. I have tried the following with no luck:
web.config:
<configuration><system.webServer><security><requestFiltering><requestLimits maxAllowedContentLength="10000000"/></requestFiltering></security></system.webServer></configuration>
php.ini in root of site:
upload_max_filesize = 64M
Any advice is greatly appreciated.
Thanks,
Shawn
Solution found here:
Step 1:
First, you need to edit your server’s PHP.ini file. This is found in
your PHP installation directory, e.g. c:\program files\php\php.ini and
set the following values:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300
This allows PHP to handle files up to 64MB and allows PHP scripts to
run up to 5 minutes before timing out.
Step 2:
Lastly, IIS 7 has a default file upload limit of 30MB. Anything larger
than that will cause IIS to return a very unhelpful 404 status. You
can read more about it at
http://www.iis.net/ConfigReference/system.webServer/security/requestFiltering/requestLimits
To override this, you need to change the web.config settings for
(each) site. (The only catch here is that the limits are expected to
be in bytes instead of kilobytes.) The following is some copypasta
from the MSDN docs:
Don’t forget to recycle your application pool so IIS picks up your
PHP.ini changes.
And that’s it!
http://refactored.tumblr.com/post/4609761388/wordpress-iis7-uploads
you will have to modify the active php.ini which you can get get from a phpinfo() and change both post_max_size and upload_max_filesize accordingly. Once done, restart iis
I had to adapt the first solution above, because I am using Windows Share HostGator site. I had a file in httpdocs called: .user.ini, which I added:
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 600
max_input_time = 600
Because I needed it bigger. I also added:
<security><requestFiltering><requestLimits maxAllowedContentLength="268435456"/>
</requestFiltering></security>
So this allowed me upload larger files. I wanted to be able to upload large videos or mp3 files.