Skip to main content

How to increase the upload_max_filesize?

You can increase the upload_max_filesize in the .htaccess, php.ini, wp-config, and function.php files. Read the article to learn how.

Written by Jessica Risch
Updated over 2 weeks ago

Introduction

The upload_max_filesize is a server setting that defines the maximum size of a single file that can be uploaded to your WordPress site. If you are importing large product files (common with dropshipping plugins like VidaXL or BigBuy), you might run into a limit where the file is simply too large for the server to process.

Problem / FAQ

  • "Why is my file not uploading during an import?"

  • "I get an error saying the file exceeds the upload_max_filesize directive."

  • "How do I check my current limit?" You can check this by going to Media > Add New in WordPress; the maximum size will be displayed right below the 'Select Files' button.

How to solve

There are several ways to increase this limit. Note that these changes are made at the server level via FTP:

  1. Modify .htaccess: Locate the .htaccess file in your WordPress root folder and add the following line: php_value upload_max_filesize 64M

  2. Modify php.ini: If your server uses a php.ini file (found in the root folder), add or edit this line: upload_max_filesize = 64M

  3. Modify wp-config.php: Add the following code to your wp-config.php file: @ini_set( 'upload_max_size' , '100M' );

  4. Modify functions.php: Alternatively, you can add this to your theme's functions.php file: @ini_set( 'upload_max_size', '64M');

Important: Many hosting providers restrict these changes for security or performance reasons. If these steps do not work, please contact your hosting provider and ask them to increase the upload_max_filesize for you.


Can’t figure it out? You can always send a message to the support team via the chat bubble at the bottom right 🎈 Support to the rescue πŸ‘¨β€πŸ’» πŸ‘©β€πŸ’»

Did this answer your question?