---
title: "How to Increase the Maximum File Upload Size in WordPress"
description: "Do you want to increase the maximum file upload size in WordPress? Are you getting \"The uploaded file exceeds the upload_max_filesize directive in php.ini\" errors when uploading files via media..."
url: https://www.inmotionhosting.com/support/product-guides/wordpress-hosting/how-to-increase-the-maximum-file-upload-size-in-wordpress/
date: 2019-12-03
modified: 2021-08-16
author: "Lydia"
categories: ["WordPress Hosting"]
type: post
lang: en
---

# How to Increase the Maximum File Upload Size in WordPress

![Increase maximum file upload size in WordPress](https://www.inmotionhosting.com/support/wp-content/uploads/2021/01/How-to-Increase-the-Maximum-File-Upload-Size-in-WordPress-1024x538.png)

Do you want to increase the maximum file upload size in WordPress? Are you getting “The uploaded file exceeds the `upload_max_filesize` directive in php.ini” errors when uploading files via media uploader, or when installing plugins and themes?

The most common cause of this error can be attributed to a few PHP settings that can easily be changed in the php.ini, .htaccess file, wp-config.php file, the theme’s functions.php file or with the [Increase Max Upload Filesize](https://wordpress.org/plugins/upload-max-file-size/) plugin. This article will walk you through all four solutions.

- [Using the PHP.INI File ](#php.inifile)
- [Using the .htaccess File ](#htaccess)
- [Using the WP-CONFIG.PHP or FUNCTIONS.PHP ](#WP-CONFIG.PHP)
- [Using the Increase Max Upload Filesize Plugin ](#Increase%20Max%20Upload%20Filesize%20Plugin)

You can check what your upload filesize limit currently is in WordPress by following the steps below:

1. [Log into your WordPress dashboard](https://www.inmotionhosting.com/support/edu/wordpress/logging-into-wordpress-dashboard/).
2. Go to *Media* and click** Add New**.
3. Below the upload box, there is a line that says *Maximum file upload size.*

To resolve this error, we will be working with these 4 values:

- **upload_max_filesize** This defines the maximum upload limit for files when uploading files in WordPress.
- **post_max_size** This defines the maximum upload limit that will be handled in a POST request. It should be equal to or greater than `upload_max_filesize`.
- **memory_limit** This defines how much memory is allocated for PHP. This number should be equal or higher than the `upload_max_filesize`.
- **file_uploads **This ensures that you are allowed to upload files. By default, it is on.

The numbers provided in the below examples work well for most users, but can be changed if they are not working for you.

## Solution 1 – Using the PHP.INI File

1. [Log into cPanel](https://www.inmotionhosting.com/support/edu/cpanel/how-to-log-into-cpanel/).
2. Find the *Software* section and click on **MultiPHP INI Editor**.![MultiPHP INI Editor](https://www.inmotionhosting.com/support/wp-content/uploads/2017/10/whm-edu_easyapache-4_ea4-install-dso-modruid2_whm-search-multiphp.png) *If you don’t have the MultiPHP INI Editor but do have the PHP Configuration tool, you can skip to the “If you don’t have the MultiPHP INI Editor” section. *
3. In the dropdown, select the domain for which you wish to change the maximum upload size.
4. Find the following values and set them accordingly: upload_max_filesize = 64M post_max_size = 64M memory_limit = 90 file_uploads = Enabled
5. Click **Apply** to save your changes.

#### If you don’t have the MultiPHP INI Editor, use these instructions:

1. [Log into cPanel](https://www.inmotionhosting.com/support/edu/cpanel/how-to-log-into-cpanel/).
2. Go to the homepage in cPanel, find the *Files* section and click on** File Manager. **![cPanel File Manager](https://www.inmotionhosting.com/support/wp-content/uploads/2012/11/cpanel_file-manager-paper-lantern.png)
3. Navigate to the site’s document root folder.
4. [Open the php.ini file in the editor](https://www.inmotionhosting.com/support/website/how-to-edit-a-file/). If you don’t have a php.ini file, [create a file called .user.ini](https://www.inmotionhosting.com/support/website/create-new-file/) and edit it.
5. Set these values in the php.ini or .user.ini file: upload_max_filesize = 64M post_max_size = 64M memory_limit = 90 file_uploads = On
6. Click **Save Changes**.

## Solution 2 – Using the .htaccess File

1. [Log into cPanel](https://www.inmotionhosting.com/support/edu/cpanel/how-to-log-into-cpanel/).
2. Go to the homepage in cPanel, find the *Files* section and click on** File Manager. **![cPanel File Manager](https://www.inmotionhosting.com/support/wp-content/uploads/2012/11/cpanel_file-manager-paper-lantern.png)
3. Navigate to the site’s document root folder.
4. [Open the .htaccess file in the file editor.](https://www.inmotionhosting.com/support/website/how-to-edit-a-file/)** **If you don’t see the .htaccess file, you may need to [make hidden files visible](https://www.inmotionhosting.com/support/edu/cpanel/show-hidden-files-in-file-manager/) or [create the file.](https://www.inmotionhosting.com/support/website/create-new-file/)
5. Set the values by adding this code at the bottom of the file: php_value upload_max_filesize = 64M php_value post_max_size = 64M php_value memory_limit = 90 Php_value file_uploads = On
6. Click **Save Changes**.

## Solution 3 – Using the WP-CONFIG.PHP or FUNCTIONS.PHP

1. [Log into cPanel](https://www.inmotionhosting.com/support/edu/cpanel/how-to-log-into-cpanel/).
2. Go to the homepage in cPanel, find the *Files* section and click on **File Manager. **![cPanel File Manager](https://www.inmotionhosting.com/support/wp-content/uploads/2012/11/cpanel_file-manager-paper-lantern.png)
3. Navigate to the site’s document root folder.
4. [Open the wp-config.php or theme’s functions.php file in the file editor.](https://www.inmotionhosting.com/support/website/how-to-edit-a-file/)
5. Set the following values: @ini_set( ‘upload_max_size’ , ‘64M’ ); @ini_set( ‘post_max_size’ , ‘64M’ ); @ini_set( ‘memory_limit’ , ‘90M’ ); @ini_set ( ‘file_uploads’ , ‘On’ );
6. Click **Save Changes**.

## Solution 4 – Using the Increase Max Upload Filesize Plugin

1. [Log into your WordPress Dashboard](https://www.inmotionhosting.com/support/edu/wordpress/logging-into-wordpress-dashboard/).
2. Go to *Plugins*, then click **Add New**.
3. Search for “[Increase Max Upload Filesize](https://wordpress.org/plugins/upload-max-file-size/)“.
4. Click** Install.**
5. When it is finished installing, the button will change to **Activate**. Click it again.
6. Go to the *Increase Max Upload Filesize* plugin settings.
7. Enter the value you would like to add.
8. Click **Save**.

You know have four solutions for increasing your maximum file upload size in WordPress. If you need assistance with the above, feel free to [contact our technical support team](https://www.inmotionhosting.com/support/amp/how-to-get-great-technical-support/).

Get the most out of your WordPress sites with one of InMotion’s [WordPress Hosting](https://www.inmotionhosting.com/wordpress-hosting) plans!
