Javascript required
Skip to content Skip to sidebar Skip to footer

How Do I Increase the File Size That I Can Upload to My Media Folder in Wordpress

6 Means To Increase the Maximum Upload File Size in WordPress

This is a invitee post by Mustaasam Saleem from Cloudways.

When you have a WordPress website, yous accept to upload files every at present and then to keep your site active and pretty. And so yous need to know that in that location is more than one way to upload your picture, theme, or any other content to your WordPress.

Basically, there are three ways to upload files in WordPress:

  1. Log in to your hosting provider by accessing their online file manager.
  2. Connect to your server via an FTP client similar FileZilla.
  3. Upload your media, themes, or plugin files directly from the WordPress Dashboard.

If yous want to upload anything other than media, themes or plugins, y'all can always upload them via a file managing director. Even so, for all normal uploads, simply navigate to your desired location inside the WordPress Dashboard and choose add/upload file.

For example, if you want to add together a video, navigate to Media -> Add New and either select the file from your figurer or you tin simply elevate and drop information technology in the box. Here'south a screenshot:

File Size Error on WordPress

Did you lot notice something weird, though? No, not in the article. In the screenshot above. Yes, the maximum upload file limit of just 5MB. Isn't this off-putting? And this limit also applies when you want to upload a theme or plugin directly from the WordPress Admin Dashboard. This threshold varies from hosting to hosting though. Some fifty-fifty permit merely 2MB past default while others may permit more than.

Don't worry though; we're here to tell you exactly how to increase the upload limit.

Let's get started without further ado.

While there are several ways to remove this cap on file size, nosotros'll be working with three settings within PHP that should bargain with the upload limit. Allow's define the settings first and so that you know what you're actually doing:

  • upload_max_filesize
    This defines the maximum upload limit for files.
  • post_max_size
    This defines the maximum upload limit that will be handled in a Mail request.
  • memory_limit
    This defines how much memory is allocated for PHP. This number should exist equal or higher than the upload_max_filesize.

Let'south presume we take a 20MB file. Nosotros'll ready the upload_max_filesize to 25MB, post_max_filesize to 27MB, and memory_limit to 30MB.

Here are the steps you tin accept to increase the upload limit. Depending on your server, any one of them should work.

Notation

Delight make certain to create a backup file before making any changes.

1. Create or Modify PHP.ini file

PHP.ini contains the PHP configuration for your server. Y'all tin can find it in the root directory of your server. Get to your hosting root directory and search for php.ini file. Due to security reasons, it might be hidden, so don't forget to check "Show hidden files".

Open php.ini file with whatever text editor and search for the 3 settings to modify them co-ordinate to your requirement. We'll utilize the following numbers for this case:

File size to be uploaded: 20MB.

  • upload_max_filesize = 25MB
  • post_max_size = 27MB
  • memory_limit = 30MB

If you lot didn't find the php.ini file, don't worry! You can create it with a Right Click of your mouse and selecting Add New File. Open the new file and paste the three lines above and relieve information technology as php.ini.

Sometimes your server's php.ini file is named as php5.ini, hence, don't get confused between the two.

two. Create or Change .htaccess

.htaccess is an important file and contains various configurations for your server. Nearly hosting providers proceed information technology hidden though. To alter information technology, you need to cheque "Bear witness Subconscious Files" one time once again and locate .htaccess file within the root directory of your server.

Open it with any editor and paste these three lines at the end of the file where it says #End WordPress:

  • php_value upload_max_filesize 25MB
  • php_value post_max_size 27MB
  • php_value memory_limit 30MB

If yous don't observe the .htaccess file, you can create one and paste the default WordPress .htaccess file attributes and so paste the iii lines in a higher place to increase the upload limit.

3. Modifying a WordPress file

If the above two methods didn't work for you, there is e'er an culling. You can paste the following 3 lines within your WordPress files. These lines can be written in wp-config.php, themes functions.php file etc. However, this is not the recommended manner to increase upload file size limit.

  • @ini_set( 'upload_max_size' , '25MB' );
  • @ini_set( 'post_max_size', '27MB');
  • @ini_set( 'memory_limit', '30MB' );

4. Directly from the Platform

Some WordPress Hosting providers similar Cloudways have a built-in characteristic to alter the file size limit. Here is how y'all can exercise it straight from the platform if y'all take Cloudways as your hosting provider:

Get to Servers from the bar on the height and get into your desired server. Select Settings & Packages from the left pane and yous'll see Upload Size under basic settings tab. Change information technology to your requirement. In our case, nosotros'll use 25MB.

Cloudways Edit Memory

5. Plugin

If you don't desire to do it manually, in that location is always a plugin in the WordPress repository. Yous just demand to discover the right plugin that is compatible with your electric current WordPress version. Endeavor using Increment Upload Max Filesize which is compatible with the latest version of WordPress.

From the left pane of your WordPress Dashboard, navigate to Plugins -> Add together New, search for the Increase Upload Max Filesize plugin from the peak right corner, and Install it.

Install the plugin

Once the plugin is activated; navigate to its settings and enter the desired size for your new upload size.

Enter the value

That'southward it! Yous take just increased the WordPress Maximum Upload File Size Limit.

6. The last resort choice

If zilch else works, simply ask your hosting provider to increase the file size upload limit on your WordPress application and they'll surely help you lot out. Cloudways 24×7 support is highly responsive and you lot'll be able to work your mode towards your goal inside no time.

If you know whatsoever other means to increase the file upload size limit, feel complimentary to share it past using the comment section below. Also, let u.s.a. know which option worked perfectly for your WordPress awarding!

Avatar

Almost The Writer

Mustaasam Saleem is the WordPress Community Managing director at Cloudways (A Managed WordPress Hosting Cloud Platform). He actively shares what he knows about WordPress in the Customs. When he is not working behind his reckoner screen, you can find him playing squash with his friends. Connect with Mustaasam via @MustaasamSaleem.

frederickwhisis.blogspot.com

Source: https://www.bitcatcha.com/blog/increase-maximum-upload-file-size-in-wordpress/