Support » Fixing WordPress » HOW TO: Increase file size for Media Upload

  • I ran into this issue with WordPress…a client made a video and wanted to upload it to her website…but when she tried using the Media uploader, it said the upload limit was set to 8mb!

    Now, after a search (multiple ones, different terms, I realized this is a common problem. I use GoDaddy servers, btw.

    The problem in fixing the issue is this: out of all the suggestions I found on my searches, including these forums, nothing worked.

    I had access to the php.ini file and inserted the following into it:

    memory_limit = 100M
    upload_max_filesize = 192M
    post_max_size = 100M
    file_uploads = On

    php.ini was in my root folder, and WordPress was installed into a subdirectory. (/site). Changing the root folder php.ini file did not fix the issue. I then copied that same file to the WordPress root directory. Still no go.

    Then I copied it to the wp-admin folder (trying anything at this point). I had read (somewhere) that this had fixed the problem for someone. It still did not work.

    As I was sitting there, getting frustrated (btw, IF WordPress would just have an option setting to do this that creates the proper file, it would be awesome), I was also getting desparate. The client needed the file uploaded within a few hours.

    And then it occured to me.

    GoDaddy had switched to PHP 5 already. So I went into the /wp-admin folder, and renamed the php.ini file I’d copied there to php5.ini.

    It worked!

    So here are the proper steps:
    1) Use FTP to download a copy of your php.ini file
    2) modify that file to have the following lines:
    memory_limit = 100M
    upload_max_filesize = 192M
    post_max_size = 100M
    file_uploads = On
    3) save, close and rename that file to “php5.ini” and upload it to the wp-admin folder of your wordpress install

    I did not remove the

    memory_limit = 100M
    upload_max_filesize = 192M
    post_max_size = 100M
    file_uploads = On

    From any of the php.ini files I’d created along the way…didn’t think it actually mattered.

    If you follow these steps, you can customize the file size limit for WordPress. I set mine to 100mb, but you can pretty much choose the size, according to your webspace available (I have 150 GB myself). To test it, I successfully uploaded a 37 mb Photoshop file.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Forgot to add, whenever I tried modifying the .htaccess file as suggested on several websites, the site went down and I had to change it back. Turns out you don’t have to do so.

    And if you do not have a php.ini or php5.ini file in your root, you can create on with notepad.

    That is great that worked for you. But it will not work for everyone. Most servers you must put the PHP.INI (not always php5.ini) in
    1) the user’s home directory
    2) the directory where the php script is run from
    3) the URL root (httpdocs or public_htmL).
    4) (Dedicated servers) Set when compiling PHP or installing the package but usually /etc You can locate it from a shell prompt:
    php -i | grep php.ini
    5) Windows Servers are usually C:\program Files\php
    Some hosting companies lock out any changes and all php.ini’s will be ignored. Always best to ask your hosting company before causing problems. Or run a phpinfo() in a script and you will see the variable for where it needs to be. Some hosting companies especially on their lower end accounts have PHP Ez-config from within plesk or cPanel which makes it even easier.

    Good point.

    I should mention this was on a GoDaddy, Linux Shared Hosting account.

    OK – this finally got me past the hump of being stuck with an 8MB file upload size when attemting to restore a backup of a blog. Now the problem for me is that it seems to be doing something for a while but then, after several minutes, produces a “The Page Cannot Be Displayed” error and a small pop up that says “there was an error processing your request”.

    I can upload a smaller file just fine (I truncated the .xml file to see what would happen).

    Any suggestions?


    Save this code in any php file and update it in the plugins directory and activate that plugin:


    Set the settings to your desired one..


    Shane G.

    I uploaded it as a php file into the plugins directory and it does not show up under plugins. Plus where the heck is the php.ini file, I don’t see it on any of my websites. I have a dedicated server through midphase.

    THANKS!!!!!!!!!!!! Petedutcher!!!! You’re the best!

    Shane G, I’ve tried your method but doesn’t seem to work even after activating the plug-in. Any tips?


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘HOW TO: Increase file size for Media Upload’ is closed to new replies.