Celebrating 10 years in web hosting [email protected]

How to Increase the Maximum Upload File Size in WordPress. Increasing the maximum upload file size in WordPress can be done using several methods, depending on your hosting environment and access level. Here’s how you can do it:

1. Modify php.ini

If you have access to the server’s php.ini file, you can increase the upload limit by editing it.

  1. Locate the php.ini file on your server (usually in the root directory or server config folder).
  2. Add or update the following lines:
    upload_max_filesize = 128M
    post_max_size = 128M
    max_execution_time = 300
    
  3. Save the file and restart the server if necessary.

2. Edit .htaccess File

For servers using Apache, you can update the .htaccess file.

  1. Locate the .htaccess file in the root directory of your WordPress installation.
  2. Add the following lines:
    php_value upload_max_filesize 128M
    php_value post_max_size 128M
    php_value max_execution_time 300
    php_value max_input_time 300
    
  3. Save the file.

3. Update functions.php

If you don’t have access to the server configuration files, you can use the functions.php file of your theme.

  1. Open the functions.php file of your active theme (found in wp-content/themes/your-theme/).
  2. Add this code snippet:
    @ini_set('upload_max_filesize', '128M');
    @ini_set('post_max_size', '128M');
    @ini_set('max_execution_time', '300');
    
  3. Save the file.

4. WordPress Multisite Settings

If you’re using a multisite WordPress setup:

  1. Go to Network Admin > Settings.
  2. Find the Max upload file size option.
  3. Set the desired file size limit (in KB) and save.

5. Use a Plugin

There are plugins available to simplify this process, such as:

  • Increase Max Upload Filesize
  • WP Maximum Upload File Size

Install and configure the plugin to set your desired upload limit.

6. Contact Your Hosting Provider

If none of the above methods work, it might be due to server restrictions. Contact your hosting provider and ask them to increase the limit for you.

7. Verify the Change

After making the changes:

  1. Go to Media > Add New in the WordPress dashboard.
  2. Check the maximum file size mentioned below the upload box.

If it hasn’t updated, ensure you’ve applied the changes correctly and cleared any server or browser cache.

Recent Posts

If you want then buy a good, reliable, secure web hosting service  from here: click here

In Conclusion,  If you enjoyed reading this article and have more questions please reach out to our support team via live chat or email and we would be glad to help you. In Other Words, we provide server hosting for all types of need and we can even get your server up and running with the service of your choice.