Friday, September 27, 2013

The uploaded file exceeds the upload_max_filesize directive in php.ini wordpress

The default upload file size for WordPress is 2 MB, which is a problem if you want to upload a large media files. If you get this error, “The uploaded file exceeds the upload_max_filesize directive in php.ini”, follow these steps:
  1. Locate the php.ini file inside the wp-admin directory
  2. vi php.ini
  3. Find this line in the php.ini file “upload_max_filesize = 2M” and replace it with a higher value (E.g. “upload_max_filesize = 64M”)
  4. You may also want to increase your max post size. Look for this line in your php.ini file “post_max_size” and increase it as well.
  5. Save the changes to the file inside your wp-admin directory.
  6. Try to upload now.
Or you can make the same changes in the  .htaccess file.

If you still have issues.

then check the ownership of the htaccess file.

Permission Modes for htaccess

chmod 755 .htaccess

r ->    Read
w->    Write
x->     Execute


 7                   5                5
 user         group       world
 r+w+x       r+x           r+x
 4+2+1     4+0+1       4+0+1  =    755

No comments:

Post a Comment

Do Write about the Blog and Welcome to the world where open source is every thing :-)