How to fix errors with uploading images or media in WordPress
Paul Cracknell | May 13, 2009 | Comments 0
If you are having trouble uploading images because of this error: File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini when you use either the flash uploader or the browser, there is fix. A short article by Phillip Barron outlines a fix using the .htaccess file.
Step 1
Using your FTP open the root directory. Download .htaccess and open it with
text editor or notepad. It should be just below the folders. If there isn’t a . htaccess file, create one.Step 2
Insert the following into your .htaccess file. If there is other commands which there most likely will be just under that is fine.
<IfModule mod_security.c> SetEnvIfNoCase Content-Type "^multipart/form-data;" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads" </IfModule> <IfModule mod_gzip.c> mod_gzip_on No </IfModule>
Step 3
Save and upload the .htaccess file back into the root directory overwriting the original.
Result: Image upload should be successfully using Firefox/Windows with no errors.
Filed Under: Wordpress Information
About the Author: Paul has been designing and running websites for since 1999 with his first site being a travel resource for backpackers. There have been many since then and now his latest interest is Wordpress Themes.