Fix: Wordpress error: uploaded file exceeds the upload_max_filesize directive in php.ini?

This error usually occurs when you try to upload large files such as large images, videos, themes, and other media files to your WordPress website.

So here we will guide you through some simple methods to fix this error. We can fix this error by increasing the default limit of upload_max_filesize.

Method - 1 Edit the wp-config file

Pleaese refer to the below steps to increaseupload_max_filesize

  1. Login to your hosting account in cPanel.

  2. Open file manage and go to public_html

  3. Now open the wp-config file and add the below line at the bottom of the file.

    wp-config


    @ini_set('upload_max_size' , '64M' ); @ini_set( ‘post_max_size’ , ‘64M’ );


Method - 2 Increasing the max upload size in the php.ini file.

You can update the php.ini file if you are using VPS with cPanel installed.

  1. Login to your cPanel account.

  2. Click on the MultiPHP INI Editor under the software section.

    php.ini

  3. Select the website for which you want to update the file size.

    php.ini select

  4. Scroll down and locate the upload_max_filesize and max_post_size options change the value to 64MB in the text bar.

    Select

  • 0 Users Found This Useful

Was this answer helpful?