WordPress max upload size not changing

If you’re uploading detailed media files or installing large plugins, it’s easy to break the default file upload limit for many web hosts. It’s a common problem, but thankfully, there are many solutions available.

In this guide, we’ll walk you through seven different options for changing the file size limit on your WordPress site. None of them take more than a few minutes to set up.

Note that certain hosts, especially shared hosts, may not let you modify the file upload limit. As such, some of the methods listed below might not work for you. If you have any issues, try a different one.

Table Of Contents

Determining Your Current File Upload Limit

To see your current file upload limit, go to WordPress > Media > Add New to see the current limitation at the bottom of the upload panel.

WordPress max upload size not changing

Part 1: The Easy Methods

These first three methods are the “easy” options. They take the least amount of time and don’t require much technical knowledge.

WordPress max upload size not changing

Hello! My name is Sujay and I’m CEO of Astra.

We’re on a mission to help small businesses grow online with affordable software products and the education you need to succeed.

if you want to join the conversation, or click here if you would like personal help or to engage with our team privately.

Method 1: Contact Your Host

If you aren’t in a hurry, the easiest thing to do is just contact your web host. They will be able to quickly change it for you. If you don’t yet have a host (or are looking to switch to a different one), check out some of our recommended web hosts.

Method 2: Use a Plugin

The easiest way to modify your file upload limit is to install a simple WordPress plugin designed for the task. There are many options available. We recommend the following plugins:

  • Tuxedo Big File Uploads
  • Upload Larger Plugins
  • Upload Max File Size
  • Maximum Upload File Size

Simply install a plugin, activate it, and follow the instructions.

Method 3: Multisite

If your WordPress is running a multisite installation, you can easily change it in the Network settings.

Go to My Sites > Network Admin > Settings. Scroll down to the bottom of the page and change the value for Max upload file size.

WordPress max upload size not changing

Part 2: The Technical Methods

The next 4 methods require you to modify some code on your site. To do so, you’ll need to access certain files via your cPanel, Plesk, a File Manager plugin, a FTP/SFTP client, a SSH client, or directly via the WordPress admin panel.

If you’re not familiar with programming or PHP, don’t panic. You’ll only need to copy and paste a few lines of code. No real programming knowledge is required.

Connecting to Your Site

If you don’t know how to access your site’s directory, check out some of the links below. They will walk you through the process of accessing the files on your website.

If you’re totally unfamiliar with FTP, SSH, and similar tools, just install a file browser plugin (the first option below) as it is the absolute simplest way to modify files on your WordPress site.

  • Advanced File Manager Plugin
  • Using the WordPress Administration Panel
  • Using the File Manager in cPanel
  • Using Filezilla to Connect to Your Site via FTP/SFTP
  • Editing and Uploading Files in Plesk
  • Putty (SSH Client) Tutorial

Method 4: Functions.php

This method requires copying and pasting some code into the functions.php file, which is included in all WordPress themes.

Add this code at the bottom of the file, changing the numbers to your desired upload size. The M stands for megabytes, so if your file is 120 megabytes, change the settings to be equal to or greater than 120M.

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
  • WordPress Admin Panel: Log in to your WordPress admin panel and click on Appearance > Theme Editor on the sidebar. On the right hand side, you should see a list of files. Select functions.php. Add the code to the bottom of the file.
  • Other Methods: Connect to your site via FTP/SSH/etc. Navigate to wp-content/themes/[theme-name]. There, you will find the functions.php file. Open it and add the code to the bottom of the file.

Warning: This code will be erased if you update your theme, so it’s not a particularly great method to use. Nonetheless, if you’d still like to use it, we recommend using a child theme.

Method 5: Php.ini File

The php.ini file controls many of the settings for your web host. By adding a few lines of code to it, you can modify the file upload limit.

Php.ini should be in the root directory, or top level, of your site. You can access this directory via FTP/SFTP, a file manager WordPress plugin, or CPanel. By default, it is not accessible directly from the WordPress admin panel.

Can’t find the php.ini file? Not a problem — just create one yourself. Be sure to save it as a .ini (php.ini) file and not as php.ini.txt.

Inside the file, find the following code and modify the number to suit your needs.

upload_max_filesize = 12M
post_max_size = 13M
memory_limit = 15M

If you can’t find the settings (within the already-existing) php.ini file, copy the code above and paste it at the end of the file.

Method 6: .htaccess file

The .htaccess file is a tool that controls the web server. As with the php.ini file, it should be located in the root directory, which is the top level of your website.

Once you’ve connected to your site and located the file, add this code to the bottom of it, modifying the number to suit your needs:

php_value upload_max_filesize 60M
php_value post_max_size 60M
php_value memory_limit 15M

If you can’t find the file, make sure that you have enabled the setting to display “hidden files.” The .htaccess file is hidden (hence the odd file name structure), so many file browsers won’t display it by default.

If you still can’t find the file, go ahead and create a new one in a text editor. Make sure that you save the file in ASCII format (not UTF-8) and that it is simply .htaccess — not htaccess.txt or ht.access or any other variation. Then, add the code to the bottom of the file and upload it to the root directory.

Method 7: wp-config.php

The last method is similar to the previous two. This time, we’ll be modifying the wp-config.php file, which is usually in the top level directory (root) of your site. Simply add this code to the bottom of the file, changing the numbers to suit your needs.

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

Did one of those methods work for you? Which one was the easiest to do? The hardest? Let us know in the comments!

Join 635,020 Subscribers

Get exclusive access to new tips, articles, guides, updates, and more.

Your first name

Your email address

SUBSCRIBE

Disclosure: This blog may contain affiliate links. If you make a purchase through one of these links, we may receive a small commission. Read disclosure. Rest assured that we only recommend products that we have personally used and believe will add value to our readers. Thanks for your support!

About the Author

WordPress max upload size not changing

Our editorial team at Astra is a group of experts led by the co-founder of Brainstorm Force, Sujay Pawar. We aim to create well researched, highly detailed content related to WordPress, Web design, and guides on how to grow your online business.

Sharing is Caring!

8 comments

  1. WordPress max upload size not changing

    Lindsay Collier

    Thank you so much for this quick walk-through! I contacted a freelancer for the same problem, and he suggested that I need to buy an SSL certification to fix this issue. So I decided to get online help and popped on your article! You guys saved my life.

    1. WordPress max upload size not changing

      Support Team

      Cheers, Lindsay! 🙂

      Glad to hear that our article helped you out.

  2. WordPress max upload size not changing

    Ethel James

    You’re fantastic; I’ve found Many forums on this topic, I must say no one explained it like you. Your post solved my issue in minutes.
    I just dropped an email to my host providers, and they quickly changed the upload limit.

    1. WordPress max upload size not changing

      Support Team

      Hello Ethel,

      That’s awesome! So glad to hear that our article helped you immensely. 🙂 Do share it with others!

  3. WordPress max upload size not changing

    Bradley

    This tutorial was straightforward and solved my problem on the first try. Thank you for this article.

    1. WordPress max upload size not changing

      Support Team

      Glad to hear that, Bradley! Cheers.

  4. WordPress max upload size not changing

    Grace

    Even after solving the maximum file upload size issue, I’m unable to install the premium theme. It looks like my hosting is at fault here.

    1. WordPress max upload size not changing

      Support Team

      Probably, do reach out to them it should help.

Leave a Comment

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

Type here..

Name*

Email*

Website

WordPress max upload size not changing

How to start a travel blog, make money and live a dream life

Editorial Team January 26, 2023

WordPress max upload size not changing

16 eCommerce sale campaigns for effective seasonal marketing

Editorial Team January 24, 2023

WordPress max upload size not changing

How to make an amazing membership site in minutes (No coding required)

Editorial Team January 16, 2023

Astra is Free. Now & Forever.

We believe creating beautiful websites should not be expensive. That's why Astra is free for everyone. Get started for free and extend with affordable packages.

How do I change the maximum upload size in WordPress?

Go to your WordPress Dashboard → Plugins → Add new, search “Increase Max Upload Filesize”, then Install and Activate the plugin. Once installed, go to plugin settings and simply enter the value for upload size. Click the Save Changes button to apply the new upload size.

What is the maximum upload size for WordPress?

To prevent users from causing server timeouts, the default maximum upload size in WordPress typically ranges from 4 MB to 128 MB. Usually, the hosting provider sets this limit at the server level. WordPress also includes constants that define this limit, but they cannot override the server-level settings in most cases.

How do you fix the uploaded file exceeds the upload_max_filesize?

php file directly:.
Access the public_html folder using cPanel..
Find the wp-config. php file. Right-click the file and select the edit option. ... .
Add the following code just above that line: @ini_set('upload_max_size' , '256M' );.
Save the file and exit. Try to upload your file again..

How do you fix the uploaded file exceeds the upload_max_filesize directive in PHP INI localhost?

In order to fix this error, you need to increase the file size upload limit. That is, you need to increase the value of the upload_max_filesize directive in your php. ini file.