Skip to main content
How to Change Server's Maximum Upload File Size

Learn how to adjust the server's maximum upload file size and allow for large file uploads, such as videos and images.

Updated over a week ago

It can be frustrating to encounter limitations when uploading large files to your website, especially when adding high-resolution images, videos, or other significant files.

In this article, we will guide you through the process of changing your server's maximum upload file size.

Note: This troubleshooting guide may require that you make server-side changes to your website.

If you are uncomfortable making those changes, you must contact your hosting provider for assistance.

When uploading a theme, a plugin, or a file in the WordPress Media Library, you may encounter the following error:

The uploaded file exceeds the upload_max_filesize directive

This happens when the uploaded file is larger than the allowed size for files uploaded on your server.

Steps to Ensure upload_max_size is Set Correctly

Check the Current Upload Limit

  1. Go to the WordPress Dashboard → Tools → Site Health

  2. Click on the Info tab

  3. Expand the Server option

  4. Check the value for Upload max filesize

If you are using the Divi theme, Extra theme, or Divi Builder plugin, check the System Status information in WordPress Dashboard → Divi/Extra → Support Center

Modify php.ini File

  1. Access your server via FTP or the hosting's File Manager (cPanel)

  2. Locate the php.ini file (usually in the root directory or a directory like /etc/)

  3. Edit the php.ini file and add or modify the following lines:

    upload_max_filesize = 64M
    post_max_size = 64M

  4. Save the file and restart your web server

Modify .htaccess File

  1. Access your server via FTP or the hosting's File Manager(cPanel)

  2. Locate the .htaccess file in the root directory of your WordPress installation

  3. Add the following lines to the .htaccess file:

    php_value upload_max_filesize 64M
    php_value post_max_size 64M

  4. Save the file

Modify wp-config.php File

  1. Access your server via FTP or the hosting's File Manager(cPanel)

  2. Locate the wp-config.php file in the root directory of your WordPress installation

  3. Add the following lines to the wp-config.php file:

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

  4. Save the file

Using .user.ini File

  1. Access your server via FTP or the hosting's File Manager(cPanel)

  2. Create or edit a .user.ini file in the root directory of your WordPress installation

  3. Add the following lines to the .user.ini file:

    upload_max_filesize = 64M
    post_max_size = 64M

  4. Save the file

Using the Hosting Control Panel

  1. Log in to your hosting control panel (e.g., cPanel, Plesk)

  2. Find the PHP configuration settings

  3. Increase the upload_max_filesize and post_max_size values

  4. Save the changes and restart the web server if required

Using a WordPress Plugin

  1. Install a plugin like WP Increase Upload Filesize

  2. Follow the plugin instructions to increase the upload limit

  3. Verify the new upload limit in WordPress Dashboard → Tools → Site Health Info → Server

Contact Your Hosting Provider

  1. If you cannot change the settings yourself, or if changes do not take effect, contact your hosting provider.

  2. Request them to increase the upload_max_filesize and post_max_size limits.

Notes:

Did this answer your question?