How to Increase Max File Upload Size in WordPress

Are you frustrated with the limited file upload size in WordPress? Don’t worry, you’re not alone. Many WordPress users face this issue when trying to upload larger files to their websites. Fortunately, there are several ways to overcome this limitation. In this blog post, we will explore four different methods to help you learn how to increase max file upload size in WordPress.

IMPORTANT: Before making any changes to your site’s code, it is highly recommended that you backup your website. This is especially important if you are a beginner and unfamiliar with editing code.

Let’s dive into it!

Method 1: Using WP Config

The first method involves modifying the wp-config.php file, which is a core WordPress file responsible for various settings. Here’s how to increase the max file upload size in WordPress using this method:

  1. Access your WordPress site’s files using an FTP client or through your hosting provider’s file manager.
  2. Locate the wp-config.php file in the root directory of your WordPress installation.
  3. Open the file using a text editor and add the following line of code:
@ini_set( 'upload_max_size' , '50M' );
@ini_set( 'post_max_size', '25M');
@ini_set( 'memory_limit', '25M' );

Replace 50M with your desired maximum file upload size. Save the changes and upload the modified wp-config.php file back to your server.

WPNotch Banner
WPNotch Mobile Banner

Method 2: Modifying PHP.ini

The second method involves modifying the php.ini file, which is a configuration file for PHP. Here’s how you can increase the max file upload size using this method:

  1. Access your WordPress site’s files using an FTP client or through your hosting provider’s file manager.
  2. Locate the php.ini file in the root directory of your WordPress installation. If you can’t find it, contact your hosting provider for assistance.
  3. Open the file using a text editor and find the following lines:
upload_max_filesize = 50M
post_max_size = 25M

Change both values to your desired maximum file upload size. Save the changes and upload the modified php.ini file back to your server.

WPEngine Business
WPEngine Business Alternate

Method 3: Modifying .htaccess

The third method involves modifying the .htaccess file, which is a configuration file for Apache web servers. Here’s how you can increase the max file upload size using this method:

  1. Access your WordPress site’s files using an FTP client or through your hosting provider’s file manager.
  2. Locate the .htaccess file in the root directory of your WordPress installation. If you can’t find it, make sure to enable the option to show hidden files.
  3. Open the file using a text editor and add the following lines of code:
php_value upload_max_filesize 50M
php_value post_max_size 25M
php_value max_execution_time 300
php_value max_input_time 300

Replace 50M with your desired maximum file upload size. Save the changes and upload the modified .htaccess file back to your server.

WPEngine Business 2
WPEngine Business 2 Alternate

Method 4: Contacting Your Hosting Provider

If the above methods don’t work or if you’re uncomfortable modifying files on your own, you can always reach out to your hosting provider for assistance. They will be able to guide you on how to increase the maximum file upload size specifically for your hosting environment.

Checking Max Upload File Size Using phpinfo()

If you’re unsure about the current maximum file upload size on your WordPress site, you can use the phpinfo() function to check it:

  1. Create a new PHP file called phpinfo.php on your local machine.
  2. Add the following line of code to the file:
<?php phpinfo(); ?>

Save the file and upload it to your WordPress site’s root directory using an FTP client or through your hosting provider’s file manager.

Access the file in your web browser by visiting http://www.yourdomain.com/phpinfo.php (replace yourdomain.com with your actual domain name). You will see a detailed PHP information page, and you can find the maximum file upload size under the upload_max_filesize directive.

IMPORTANT: Remember to remove the phpinfo.php file from your server after checking the maximum file upload size to ensure the security of your website.

WPNotch Banner
WPNotch Mobile Banner

Conclusion

Increasing the maximum file upload size in WordPress can be a game-changer, especially if you frequently work with large files or multimedia content. By following one of the methods mentioned above, you’ll be able to overcome this limitation and make the most out of your WordPress site.

Remember, if you’re not comfortable making these changes yourself, don’t hesitate to reach out to your hosting provider for assistance. They are there to help you optimize your WordPress experience.

Responses to “How to Increase Max File Upload Size in WordPress”

  1. […] need to increase the upload file size limit. You can find instructions on how to do this here. Once the upload file size is sufficient, click on […]

  2. neurontnea Avatar

    Thanks for great info I was looking for this information for my mission.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from WP Notch

Level up your skills. Get expert tips delivered straight to you. Subscribe!

Continue Reading