Announcement

Collapse
No announcement yet.

How to Increase Maximum Upload File Size in WordPress

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to Increase Maximum Upload File Size in WordPress

    FIrst Check Your Maximum File Upload Size Limit in WordPress

    wordpressuploadsize.png



    There are different ways that you can use to increase the maximum upload file size in WordPress.


    Update .htaccess file
    Code:
    php_value upload_max_filesize 128M
    php_value post_max_size 128M
    php_value memory_limit 256M
    php_value max_execution_time 300
    php_value max_input_time 300
    Change the numbers to the values that you need. The max execution time and max input time values are in seconds and might need to be increased further if your internet connection is slow.



    Update wp-config.php file
    Code:
    @ini_set( 'upload_max_filesize' , '128M' );
    @ini_set( 'post_max_size', '128M');
    @ini_set( 'memory_limit', '256M' );
    @ini_set( 'max_execution_time', '300' );
    @ini_set( 'max_input_time', '300' );


    Create or Edit an existing PHP.INI file In most cases if you are on a shared host, then you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini and upload it in the root folder. In that file add the following code:
    Code:
    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 300
    Again, it is important that we emphasize that if you are on a shared hosting package, then these techniques may not work. In that case, you would have to contact your web hosting provider to increase the limit for you.


    Change PHP Options in cPanel

    If your hosting provider is using cPanel and allows changing PHP settings, you can easily increase maximum file upload size:

    Access cPanel and look for Select PHP version in Software section.
    wordpress-increase-max-file-size-cpanel-select-php.png





    Click on Change to PHP options.
    wordpress-increase-max-file-size-cpanel-php-settings.png





    Modify the post_max_size and upload_max_filesize values. cpanelincrease.png
    Click on Save button to save the changes.
    Last edited by DaMysterious; 04-03-2019, 03:35 PM.
Working...
X