How to Increase the WordPress Maximum Upload File Size

If you’re reading this post, no doubt you’ve run into a problem uploading files to your WordPress site and want to find a fast fix many hosts maintain this limitation low by default.

Typically, the WordPress maximum upload file size is a server-level setting which also means that unfortunately, you can not fix it from within WordPress.

This limitation exists for safety and efficiency’s sake. It prevents users from flooding your site with substantial video uploads and grinding your servers to a halt.

How to Increase the WordPress Maximum Upload File Size

  1. Theme Functions File
    There are instances where we have noticed that by simply adding the following code at the subject’s functions.php file, you can increase the upload size:
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
  1. Create or Edit an existing PHP.INI file
    For this method, you’ll have to get into your site’s root folder with FTP or File Manager program on your hosting account’s cPanel dashboard.

Typically, if you’re on a shared server, then you won’t find a php.ini file in your directory. If you don’t see one, then create one called php.ini and upload it in the main folder. In here add the following code.

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

This process reports working for many users. Remember if 64 does not work, then try 10MB (occasionally that work).

  1. htaccess Method
    Some people have tried using the .htaccess method whereby changing the .htaccess file from the main directory, and you can increase the maximum upload size in WordPress. Edit the .htaccess file on your WordPress site’s root folder and add the following code:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Again, we must emphasize that if you’re on a shared hosting package, then these techniques might not work.

If that’s the case, you would need to contact your hosting provider to raise the limit for you.

We hope this article How to Increase the WordPress Maximum Upload File Size in WordPress helped you. If you’re still having problems, then follow the steps in our WordPress troubleshooting guide to repair it.