The uploaded file in php.ini exceeds the upload_max_filesize instruction. Occurs when you try to upload files to your WordPress website that are larger than the permissions from your server-side settings.

File size limits are often set by administrators to maintain the speed and responsiveness of your website.

Related: Step-by-Step Guide to Fix “It looks like your PHP installation does not have the MySQL extension that WordPress needs”

While this may seem daunting at first, it is quite straightforward to fix. The question is how?

The fastest way to fix an uploaded file is more than the upload_max_filesize directive in php.ini. Error extending your PHP resource limit to server-side settings.

How is it here in WordPress

  1. Login to your hPanel and access the File Manager under the Files section.
  2. In the File Manager, find .htaccess file and click on edit.
  3. Now add the following line of code at the bottom of the file.
php_value upload_max_filesize 256M

Click on the Save changes.

Note that you can adjust the values and set the PHP upload limit depending upon your needs and support from the hosting providers.

While this was the quickest fix for the uploaded file that exceeds the upload_max_filesize directive in php.ini., there are 3 other effective methods to fix it as well. Let’s talk about them.

Edit The wp-config.php File

Another great way to troubleshoot upload_max_filesize directive in php.ini error is to edit your wp-config.php file in the root directory of your website.

Here’s what you need to do here.

  1. Access your hPanel and find the wp-config.php file in the public_html.
  2. Now add the following line of code in the file before ‘That’s all, stop editing! Happy publishing’.
@ini_set(‘upload_max_size’ , ‘256M’ );

Now click on the Save button.

Share: