WordPress.org

Ready to get started?Download WordPress

Forums

increase media library upload file size limit (17 posts)

  1. ddasari
    Member
    Posted 5 years ago #

    i see that you can increase the upload limit in wp 2.5 by editing the php.ini file.

    but i cant seem to find that file in my 2.7.1 setup of wordpress

    so how do you increase it in 2.7+ ?

    any help would be greatly appreciated. thx.

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    The php.ini file isn't within WordPress. It's a file that you can create yourself on some hosting packages to tweak some of the server settings.

  3. Hollosch
    Member
    Posted 5 years ago #

    And how can i increase the limit of the wordpress uploader (which also handles images and such)?

  4. WebTechGlobal
    Member
    Posted 5 years ago #

    This question is being asked all over this forum and the internet. I have done it before and it was easy but on WordPress nothing works for me.

  5. Lisa Q
    Member
    Posted 5 years ago #

    So there's no way to do this?

    My upload limit is a measly 8mb and I have a pretty serious problem here if I can't upload bigger files that than for this site. :( I don't understand why there's not just an option to adjust it in the admin settings? It's on my server, let me decide what the limit should be!

  6. S.K
    Member
    Posted 5 years ago #

  7. Chandana Naleen
    Member
    Posted 4 years ago #

    I need to increase media upload limit of my site. but it gives 2M only. what are the solutions ?

  8. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    edit or create a php.ini file

  9. aschreck
    Member
    Posted 4 years ago #

    I've looked at the other two threads about this topic (and a different one at the Wordress MU support forum - http://mu.wordpress.org/forums/topic/14893?replies=17) but still seem to be stuck. Mods, feel free to move this or start another thread as you see fit.

    -------------
    I'm in the same situation, uploading large video files, and I have the same issue with the WP GUI. You can see the error code ("This file is too big. The maximum upload size for your server is 4M.") here:
    http://cuppaschmutz.com/wp-content/uploads/2010/01/WP_GUIfilelimit.jpg

    I've also bumped up the file size limit on both the php.ini and php-settings.php without any luck.

    php-ini.php

    <?php
    /*
    Plugin Name: PHP Settings
    Plugin URI: http://wpsecurity.net
    Description: Attempts to set the max upload size and script timeout settings in the server's PHP config
    Author: Mark - WPSecurity.net
    Version: 1.0
    Author URI: http://mpsecurity.net
    */
    ini_set('upload_max_size','1000M');
    ini_set('post_max_size','995M');
    ini_set('max_execution_time,'300');
    ?>

    Near header of wp-settings:

    <?php
    /**
     * Used to setup and fix common variables and include
     * the WordPress procedural and class library.
     *
     * You should not have to change this file and allows
     * for some configuration in wp-config.php.
     *
     * @package WordPress
     */
    
    if ( !defined('WP_MEMORY_LIMIT') )
    	define('WP_MEMORY_LIMIT', '500M');

    However, I'm able to upload large files to any directory I'd like using FTP.

    Interestingly, I'm getting *the same* error on a different site entirely. In fact, different site, different hosting company and servers (FatCow for one, BlueHost for another).

    I'm using the following theme from Jason Schuller on both sites (and I'll email him/his company tomorrow to see if they have any insight, in a brief earlier communication he responded very quickly) tomorrow to see if he has any insights. I wonder if i8therice is using a theme from press75 too...
    http://www.press75.com/v4/the-on-demand-wordpress-theme/

    I'm using WP 2.9.1 *with* the following plugins:

    --------------------------
    akismet
    bubblecast-video-plugin
    on-demand
    post-plugin-library
    requirements-check
    reveals-ids-for-wp-admin-25
    similar-posts
    simple-post-thumbnails
    simple-video-embedder
    stream-video-player
    twitter-tools
    vipers-video-quicktags
    wordtube
    wp-pagenavi

  10. bh_WP_fan
    Member
    Posted 4 years ago #

    I know that BlueHost definitely allows you to increase the limit in the php.ini.(And I would guess Fat Cow likely does too) There may still be limits on how high those settings can be raised.

    Make sure that your upload_max_filesize, and post_max_size are both large enough in the php.ini. Set the php.ini in your public_html and in the root of your install (if it is in a different place than in your public_html) then, using the PHP Config icon in the cPanel, set your php mode to PHP5 (single php.ini). It should fix all those problems.

    If you still have problems, create a blank file named: phpinfo.php in the directory of your WordPress install and put in it the following code: <?php phpinfo(); ?>

    Then go access your phpinfo.php file online and see what it reports for the two different max sizes.

    Also try renaming your plugins folder in wp-content to temporarily deactivate plugins and see if one of the plugins might be interfering.

  11. webjim
    Member
    Posted 4 years ago #

    I am having this same problem using the simple-video-embedder, too.

    Any more ideas from anyone?

    thanks,

    Jim

  12. Devin Price
    Member
    Posted 4 years ago #

    Here's a breakdown of how to do it with BlueHost. It should work for other hosts as well: Increase Upload Max Filesize.

  13. Shane G.
    Member
    Posted 4 years ago #

    Hi,

    Add this code in htaccess:

    php_value upload_max_filesize 20M
    php_value post_max_size 20M
    php_value max_execution_time 200
    php_value max_input_time 200

    You can increase the file upload limit according to your requirement.

    Thanks,

    Shane G.

  14. Devin Price
    Member
    Posted 4 years ago #

    Hey Shane. Can you be more specific about where that code goes? Is it the .htaccess file at the root of the domain? Will it get overwritten if you change the permalink structure?

    Here's what my .htaccess file looks like- when I add the code inside the <IfModule mod_rewrite.c> it brings down the site, so I'm assuming it goes somewhere else:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    </IfModule>
    
    # END WordPress
  15. husdaman
    Member
    Posted 4 years ago #

    Hey Shane,

    Thanks that worked for me. Before this, I had changed php.ini and changed the settings in the admin panel but still couldn't get this to work. The code goes in the .htaccess. Anywhere in there is fine.

    Thanks again.

  16. ricehopper
    Member
    Posted 4 years ago #

    I've been trying to upload a 25-MB PDF file into my media library -- http://ricehoppers.net. But to no avail. When it reaches 100%, an error message is flashed. I am hosted by Justhost. I wonder what I need to do to be able to upload a large fie?

    Thanks.
    Monina

  17. 9ale7
    Member
    Posted 4 years ago #

    using: wordpress 2.8.5
    i tested this and works like a charm :)

    http://wptheming.com/2009/07/upload_max_filesize/

    Or simply use the provided file ( must right click > name file:
    php.ini )

    http://wptheming.com/wp-content/uploads/2009/07/php.ini

    will work up to 64 mb (i only tested up to 4 mb and it works )

Topic Closed

This topic has been closed to new replies.

About this Topic