Getting Error - The uploaded file exceeds the upload_max_filesize directive in php.ini

Discussion in 'Frequently Asked Queries (FAQ)' started by HelpDesk, Aug 1, 2017.

Thread Status:
Not open for further replies.
  1. HelpDesk

    HelpDesk Administrator

    Aug 1, 2017
    Likes Received:
    The Above error appears in WordPress when your server configuration setting have some limitations on uploading files. You can ask your host provider to increase the following parameters from PHP.ini file from your server.


    Or if you want to resolve this at your end the follow the below steps:

    Create Or Modify PHP.Ini File:

    PHP.ini contains the PHP configuration for your server. You can find it in the root directory of your server. Go to your hosting root directory and search for php.ini file. Due to security reasons, it might be hidden, so don’t forget to check “Show hidden files”.

    Open php.ini file with any text editor and search for the three settings to modify them according to your requirement. We’ll use the following numbers for this example:

    File size to be uploaded: 20MB.

    upload_max_filesize = 25MB
    post_max_size = 27MB
    memory_limit = 30MB

    You can set your desired values for the above parameters.

    If you didn’t find the php.ini file, don’t worry! You can create it with a Right Click of your mouse and selecting Add New File. Open the new file and paste the three lines above and save it as php.ini.

    Sometimes your server’s php.ini file is named as php5.ini, hence, don’t get confused between the two.
    samkay likes this.
Thread Status:
Not open for further replies.

Share This Page