the uploaded file exceeds the upload max filesize directive in php.ini

When you install a theme, plugin, image or file, it says ‘the uploaded file exceeds the upload-max-filesize directive in php.ini‘ in WordPress.

The issue detected on your server for the maximum size for the uploaded file, means that WordPress has set its default upload size limit of 2MB.

Solution – No need to fear, it can be updated and fixed in 3 ways.

  1. Update your php.ini file
  2. Edit your .htaccess file
  3. Editing wp-config.php File

Let’s see how to change them one by one.

the uploaded file exceeds the upload_max_filesize directive in php.ini

the uploaded file exceeds the upload_max_filesize

1) Update your php.ini file

Create a php.ini file in your File Manager(directory) and apply this code and save

memory_limit=256M
upload_max_filesize = 10M
post_max_size = 11M
max_execution_time = 300

2) Edit your .htaccess file

htaccess file

htaccess file

Go to your file manager and open the “.htaccess” file. If you are not able to see .htaccess file, go to “setting” on the right-top use show hidden options.
cPanel > File Manager > Public_HTML/domain folder > Settings > Show Hidden 

Open .htaccess file

  • php_value upload_max_filesize 64M
  • php_value post_max_size 64M
  • php_value memory_limit 400M
  • php_value max_execution_time 180
  • php_value max_input_time 180

3) Editing wp-config.php File

wp config file

wp config file

Go to File Manager and use this code at the bottom directly.
define(‘WP_MEMORY_LIMIT’, ‘256M’);

Save and close, now try to install a theme, plugin image or file.

Thank you!!! Be Blessed

Read More

Top Stories

Parenting Tips

Child Stories

Education

Blogging

Technology

Astrology

Ketu in 12th House

Ketu's positioning in the 12th house of the birth chart in Vedic astrology shapes an individual's spirituality,...

Unsolved Mysteries