How to Make WordPress Allow Larger Media Files to Be Uploaded

  • Hosting
  • 12 Min Read
how-to-make-wordpress-allow-larger-media-files-to-be-uploaded

How to Make WordPress Allow Larger Media Files to Be Uploaded (7 Best Ways)

WordPress is a powerhouse with many themes and plugins that let you build almost any kind of website, from an online store to a business network. But when choosing WordPress hosting, you should first think about how well it works, how safe it is, and how well it is supported.

If you are building a WordPress site that has a portfolio with big image files or a video hosting site with a single media file that is several gigabytes in size, you might run into a problem where you can’t upload media files larger than 25MB.

This article will tell you WordPress’s maximum upload size and the best ways to check it and raise it.

How big can a file be that you upload to WordPress?

When you build a website, you have to add files like images, videos, themes, plugins, and so on. And if the upload file size is set to the minimum, it can be hard to upload big files. Depending on how your web hosting is set up, the largest file you can send to WordPress is usually between 2MB and 150MB. Most of the time, this limit is set at the server level by your hosting company to avoid timeouts. By default, the size of a file you can send to Kloudbean is 10MB.

How to Find Out What WordPress’s Maximum Upload Size Is Right Now?

To see how much you can add to your WordPress site, go to WP Admin > Media > Add New. At the bottom, you’ll see the current maximum upload size, as shown in the picture.

If the current maximum upload size works for you, you don’t need to change it. But if it doesn’t, don’t worry; there are many ways to increase WordPress’s maximum upload size.

How to Make WordPress Allow Larger Media Files to Be Uploaded?

These are the best ways to increase the maximum amount of media files that can be uploaded to WordPress.

  1. Change the file.htaccess
  2. Edit the functions.php file
  3. Make or change the php.ini file
  4. Raise the size of uploads on a multisite
  5. Change the file wp-config.php
  6. Using the Plugin Method
  7. Get in touch with your hosting company
  1. Change the file.htaccess

    If your web server uses Apache and PHP is set up as an Apache script, you can increase the maximum upload size in WordPress by adding the following lines of code to the .htaccess file:

    php_value upload_max_filesize is 64M
    php_value post_max_size 128M
    php_value memory_limit 256M
    php_value max_execution_time 300
    php_value max_input_time 300
            

    This will tell you how many Megabytes is the most you can send. Change the numbers to suit your needs. Both the max processing time and the max input time are measured in seconds. The processing time sets how long a single script can take to run. Pick a number that works for your website.

  2. Edit the functions.php file

    If you can’t access the .htaccess file or prefer to change WordPress theme files, you can raise the size limits by adding the following lines of code to the functions.php file of your theme:

    @ini_set( 'upload_max_size' , '64M' );
    @ini_set( 'post_max_size', '64M');
    @ini_set( 'max_execution_time', '300' );
            

    Keep in mind that if you change the theme, the maximum upload size will go back to its normal settings until you edit the functions.php file of the new theme, as this code is added to your current theme.

  3. Make or change the php.ini file

    You can create or edit the php.ini file to increase the maximum upload size. Use SSH or FTP to access the root directory of your WordPress site and look for the file named php.ini. If it doesn’t exist, you can create a new file and add the following code:

    upload_max_filesize = 64M
    post_max_size = 128MB
    memory_limit = 264MB
            

    If you create a new php.ini file, upload it to the same root folder using SSH or FTP.

  4. Raise the size of uploads on a multisite

    If you are running WordPress on multiple sites, you can adjust the settings to increase the maximum file size for uploads. The available options depend on your network configuration.

  5. Change the file wp-config.php

    Another way to increase the maximum file size for uploads is to edit the wp-config.php file. Use SSH or FTP to access the top directory of your WordPress site and locate the wp-config.php file. Open the file with a text editor and add the following code:

    @ini_set( 'upload_max_size' , '20M' );
    @ini_set( 'post_max_size', '13M');
    @ini_set( 'memory_limit', '15M' );
            

    Save your changes, and the maximum file size you can upload should increase.

  6. Using the Plugin Method

    If you prefer not to write code or use SSH/FTP to access root files, you can use a WordPress plugin called “Increase Max Upload Filesize” to simplify the process:

    1. Go to your WordPress Dashboard.
    2. Click on “Plugins” and then “Add New.”
    3. Search for “Increase Max Upload Filesize,” and click “Install” and then “Activate” the plugin.
    4. Once the plugin is active, go to its settings and enter the desired upload size.
    5. Click the “Save Changes” button to apply the new file size.

  7. Get in touch with your hosting company

    If you prefer not to make these changes yourself, you can contact your web hosting company and ask them to increase the maximum upload size for your WordPress site.

    If you use Kloudbean’ managed WordPress hosting, you can easily increase the maximum upload size for all your websites on a single server using the platform’s tools. Log into your Kloudbean account, go to “Server” under “Server Settings & Packages,” and adjust the “Upload Size” field as needed.

    In Conclusion

    This article has explained various methods to increase the maximum file size that can be uploaded to WordPress. While some methods may not work with all web hosts, you can always contact your hosting provider for assistance. Ensuring that your website loads quickly and efficiently is crucial, so optimizing your uploaded files is essential.

    If you have any additional insights or methods for increasing WordPress’s maximum upload size, please share them in the comments section below.

    FAQs

    Q1. How can I get my hosting provider to let me raise the maximum file size I can upload?

    Most hosting companies offer a setting in the server configuration that allows you to increase the maximum file size allowed for uploads in WordPress. Check your hosting provider’s knowledge base for instructions, and if you can’t find the information, contact their support team.

    Q2: Will raising the maximum upload size slow down the speed at which the site loads?

    Increasing the maximum upload size for files in WordPress should not significantly impact the site’s loading speed. However, it’s essential to ensure that any files you upload are properly optimized to prevent slow loading times for your users and search engine crawlers.