[SOLVED] The uploaded file exceeds the upload_max_filesize directive in php.ini

wordpressplugins
wordpressthemes
wordpresserror

(Pradeep Kumar) #1

If you are getting this WordPress error on your website/blog - “The uploaded file exceeds the upload_max_filesize directive in php.ini” - whenever you are uploading your theme or plugin, then there is an easy fix for this.

Kind Note: If you are not comfortable doing this, then you can request your hosting support to do this. But if you are ready to learn and experiment then, please take a backup before proceeding.

Go to your cPanel > File Manager > Root Directory. Go to “Settings” and enable “Show Hidden Files (dotfiles).”

You don’t need to do all these 3, you can try anyone and check whether it’s providing a solution for this error.

###1. php.in (or php5.ini)

Search your root directory for this file, if you can’t find one, you can create text (.txt) file with this name and add these lines:

upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 200M
file_uploads = On
max_execution_time = 180

###2. .htaccess

Search your root directory for this file, if you can’t find one, you can create text (.txt) file with this name and add these lines:

 php_value upload_max_filesize 64M
 php_value post_max_size 64M
 php_value memory_limit 200M
 php_value max_execution_time 180
 php_value max_input_time 180

###3. wp-config.php

Most probably you’ll have this file, you don’t need to create one. Just add this line in the file:

define('WP_MEMORY_LIMIT', '256M');

I hope this will fix this issue, if you are still facing any issues, let us know, and we’ll try our best!

Have you faced this? “An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.”


[Solved] Need Help in Blogger to WordPress Migration