Contact Us

Address: Ground Floor, Bablu Mension, Karigorpara Road, Amjhupi, Meherpur, 7101
Phone: +8801713902426

    How to Increase Maximum File Upload Size in WordPress June 18, 2016|

    How to Increase Maximum File Upload Size in WordPress

    On maximum hosting package what we normally use, there WordPress shows maximum limit of file upload is 2MB. But we need to upload big images, audio, video; more than 2MB, it’s very disturbing to use cPanel or FTP every time. Yes this article is for you, who is facing these problems. In this article I will show you how to increase maximum file upload size in WordPress.


    There are few ways to increase maximum file upload size, let’s see:

    Using PHP.ini File:

    Create a php.ini file in desktop, this is very easy. Right click on desktop on blank spaces, then mouse hover on New and Text document.

    Then try to rename it to php.ini (don’t forget to rename .txt extension)

    Confirm update

    Your php.ini file will look like this


    Then paste this:

    upload_max_filesize = 64M
    post_max_size = 64M
    memory_limit = 512M
    file_uploads = On
    max_execution_time = 300

    If you are facing problems to create it desktop, then try to create it on cPanel,

    Login to your cPanel, then file manager, then wp-admin folder, click on + File, on the new file name put php.ini then click on create new file, there will be a file named php.ini right click on it then edit again edit and paste codes.

    Then upload it to wp-admin folder.

    Using .htaccess File:

    Best option it php.ini if not works or you don’t like that process, let’s learn how increase maximum file upload size in WordPress using .htaccess

    Login to cPanel or connect with FTP, go to root folder and find .htaccess file, click edit and add these codes on the bottom.

    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300

    You are not getting .htaccess file? Look carefully there is a settings button on the right top, click on settings, then select Show Hidden Files (dotfiles) and click on save. Then try to find. If not found, please create one.

    Using Theme’s Functions File:

    Login to your WordPress dashboard, then mouse hover on Appearance and then click on Editor, find your functions.php file and paste this code:

    @ini_set( 'upload_max_size' , '64M' );
    @ini_set( 'post_max_size', '64M');
    @ini_set( 'max_execution_time', '300' );

    My Recommendation: Personally I like to upload php.ini file on wp-admin. For some cases (maximum on shared hosting), this will not work, please try others too. If not works please contact with your hosting provider. I got some hosting they turn off these. Feel free to ask me more!

    Releted Post

    How to Increase PHP Memory Limit in WordPress

    Chat on WhatsApp