WordPress.org

Ready to get started?Download WordPress

Forums

How to increase max file size upload limit from 2MB (7 posts)

  1. Spencer Hill
    Member
    Posted 4 years ago #

    Heya - I've been researching how to increase the max file upload size and I'm not finding anything helpful. I just need to upload a Flash file so I don't have to hard code it into a page. Can someone tell me how to increase the limit from 2MB? Thanks!

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

  3. WebTechGlobal
    Member
    Posted 4 years ago #

    I have the same issue.

    Done it before in PHP outside of WordPress but in wordpress on a plugin I am developing its proving to be impossible.

    define('WP_MEMORY_LIMIT', '64M');
    ini_set('post_max_size', '50M');
    ini_set('upload_max_filesize', '50M');

    print "upload_max_size: ".ini_get("upload_max_filesize")."
    \n";
    print "post_max_size: ".ini_get("post_max_size")."
    \n";
    print "max_input_time: ".ini_get("max_input_time")."

    \n";

    This is generally what I have used before but having no luck the settings just won't change for my plugin script.

    Ryan

  4. WebTechGlobal
    Member
    Posted 4 years ago #

    I tried that page you gave esmi and it does not apply to myself. Maybe applys to the guest above.

    Is this PHP INI code?

    php_value upload_max_filesize 10M

    I have not seen php_value before and it looks like ini which also doesnt work for me because its a plugin I'm developing.

  5. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Is this PHP INI code?

    Looks like it, yes.

    it looks like ini which also doesnt work for me because its a plugin I'm developing.

    The ability to customise php.ini on a site-to-site basis may not be offered by all hosting providers. It might be worth asking your hosting company how they suggest you can deal with this issue. Don't mention what you've tried already, though, as some companies can get a bit uppity when they feel that service users are trying to circumnavigate what (they think) are perfectly reasonable limits.

  6. Rhino666
    Member
    Posted 4 years ago #

    You're all looking at this problem from the wrong angle.

    Stuff wordpress an it's limits, what you are display is html code and there are very few limits to that.
    I had a 24meg movie file I wanted to display, wordpress wouldn't let me , so what I did was

    1) upload file via your FTP loader. I uploaded mine to an Area that wasn't involved with wordpress.

    2) The FTP program Filezilla will tell you what the url address is for the file you've uploaded. If you can't work it out go to your browser
    type in your domain name and keep working your way down until you find it( If this forum allowed pics I'd show you) eg http://www.domainname.com/sparefilesfolder/uploadedfile.avi

    3) Now go and create a post or a page so we can embed it

    Place the following code into post and adjust the URl/src to reflect your uploaded file

    <object width="160" height="144"
    <param name="src" value="sample.mov">
    <param name="autoplay" value="true">
    <param name="controller" value="false">

    <embed src="domainname.com/sparefilesfolder/uploadedfile.avi" width="160" height="144"
    autoplay="true" controller="false"
    pluginspage="http://www.apple.com/quicktime/download/">
    </embed>
    </object>

    It will work!!

    I can't believe the people that wrote wordpress have been so stupid as to not increase the limit to something more sensible or tell people how to work round it.

    By doing the above the object WILL NOT be in your media library. this solution gets round it by having a direct link.

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

    I can't believe the people that wrote wordpress have been so stupid as to not increase the limit to something more sensible or tell people how to work round it.

    this has nothing to do with wordpress, it's your host. Implementing the changes to php.ini will raise those limits.....which will allow you to always be able to upload large files. Who would want to bother opening a ftp program for every media upload? One simple code change and you can do it from within WP! Also, there are simple ways to get files you've uploaded using ftp to be recognized by your media library.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.