How to Increase the Maximum Upload File Size in WordPress Website ?

maximum upload file size

There are several ways to increase the maximum upload file size in WordPress:

Option O1: Edit the .htaccess file:

  • Connect to your website using an FTP client (such as FileZilla)
  • Navigate to the root folder of your website (usually “public_html”)
  • Look for a file named “.htaccess” and download it to your computer
  • Open the file in a text editor (such as Notepad or TextEdit)
  • Add the following code at the very bottom of the file:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

  • Save the file and upload it back to the root folder of your website
  • Clear your website’s cache if necessary

Option 02: Edit the wp-config.php file:

  • Connect to your website using an FTP client (such as FileZilla)
  • Navigate to the root folder of your website (usually “public_html”)
  • Look for a file named “wp-config.php” and download it to your computer
  • Open the file in a text editor (such as Notepad or TextEdit)
  • Add the following code just above the line that says “/* That’s all, stop editing! Happy publishing. */”:
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

  • Save the file and upload it back to the root folder of your website
  • Clear your website’s cache if necessary

Option 03: Edit the functions.php file:

  • Connect to your website using an FTP client (such as FileZilla)
  • Navigate to the theme folder of your website (usually “public_html/wp-content/themes/[theme name]”)
  • Look for a file named “functions.php” and download it to your computer
  • Open the file in a text editor (such as Notepad or TextEdit)
  • Add the following code at the very bottom of the file:
function increase_upload_size( $bytes ) {
return 64 * 1024 * 1024;
}
add_filter( 'upload_size_limit', 'increase_upload_size' );

  • Save the file and upload it back to the theme folder of your website
  • Clear your website’s cache if necessary

Note: Make sure to replace “64M” with the desired maximum file size in all the above methods. That is the way to increase the maximum file upload size on the WordPress website.

To know our WordPress-related services: https://grewdev.com/services/

Need A Website Or Web Design & Development Services? Contact Me Today

GET A QUOTE

Simply fill up the following form, and we contact you shortly.

Do you need web design services?

Simply fill up the following form, and we contact you shortly.