SHARE

The standard upload file size for WordPress is 2 MB, which is an issue if you want to upload large files. If you get this error, “The uploaded file exceeds the upload_max_filesize directive in php.ini”, follow these actions:

  1. Find the php.ini file inside of the wp-admin directory (if you can’t locate this file see notes listed below)
  2. Find this line in the php.ini file “upload_max_filesize = 2M” and change it with a larger value (e.g. “upload_max_filesize = 64M”)
  3. You may also want to maximize your max post size. Search for this line in your php.ini file “post_max_size” and maximize it also.
  4. Save the changes to the file within your wp-admin directory.
  5. Try the upload again
  6. If you still have problems, search for this file in your root directory and make the same adjustments.

If you don’t have a php.ini file in your directory, you can normally create one from the control panels of your hosting. BlueHost has the methods listed to produce a php.ini file.

If you don’t have a php.ini file in your directory and aren’t sure where to have one, you can simply download my php.ini file. I have already increased the upload_max_filesize and the post_max_size to 64M. As soon as this file is copied into your wp-admin folder, the issue must be fixed.

A Comment From a User

@ Anyone who knows enough about their hosted files to be dangerous (ie: you crash and uncrash your site with the click of a mouse on a daily basis goofing with it), but needs baby steps to do this, here goes…

First, copy the text from the developer’s PHP file listed above. (yeah, it’s long…copy all of it….no, don’t change anything. Heck, don’t even read his notes if you get intimidated easily. Really, it’s cool….just copy it as is…)

  1. Get into your files via however you do it on your host (FTP, CPanel, Legacy File Manager, whatever).
  2. Navigate to wp-admin folder. Scroll down to see if you have a php.ini file in there. I didn’t, and if you didn’t add one at some point, yours wont either.
  3. I have CPanel access, so in CPanel’s file manager, click on ‘new file’. Name it php.ini. Save it. Now, find it and check box the file name. click ‘edit’. scroll down through the ‘blah blah’ about encoding. leave the default encoding selection. click ‘edit’. a blank screen will open. right click in the box and paste the developer’s code. Click ‘save’. (if you use something else other than CPanel, adjust as necessary….for FTP, create this all in notepad on your ‘puter, name it php.ini and upload to the wp-admin folder via your fave FTP program….)
  4. Go to your wp admin panel. navigate to ‘media’. click ‘add’. voila, your new ‘limit’ will read ’64MB’. Upload something big and hold your breath. Voila….if your host doesn’t have some imposed limit, your file should be there ready to edit!
  5. IF you messed up somehow and your site breaks, don’t freak out. Just go remove the php.ini file (either by deleting it or by renaming it so it doesn’t get read). Chances are you didn’t ‘select all’ and paste it right. Start over by deleting the text from the php.ini file you just created. re-copy the developer’s text and paste it again. Give it another whirl…

LEAVE A REPLY