increase wordpress upload size

How to Increase the Maximum Upload File Size in WordPress

WordPress may reject a theme, plugin, image, video or migration file with a message that it exceeds the maximum upload size. The limit usually comes from PHP or the hosting platform, not WordPress itself.

Check your current upload limit

Go to Media > Add Media File and look for the maximum upload file size shown below the uploader. You can also review Tools > Site Health > Info > Media Handling for related PHP values.

The effective limit is controlled by several settings. upload_max_filesize limits one uploaded file, while post_max_size limits the entire request. The post limit must be larger than the file limit.

Use your hosting control panel first

In cPanel, open MultiPHP INI Editor or Select PHP Version > Options. Increase these values for the correct domain:

  • upload_max_filesize
  • post_max_size
  • memory_limit
  • max_execution_time when large uploads time out

A practical configuration for a 128 MB upload might use a 128 MB upload limit, 160 MB post limit and at least 256 MB memory limit. Larger is not automatically better. Use the smallest values that support the legitimate task.

Edit php.ini or .user.ini

If your host allows local PHP configuration, add or update values in php.ini or .user.ini:

upload_max_filesize = 128M
post_max_size = 160M
memory_limit = 256M
max_execution_time = 300

The correct file and refresh time depend on the server. Some hosts apply changes immediately, while others cache .user.ini values for several minutes.

Try .htaccess only on supported servers

Some Apache configurations allow PHP values in .htaccess:

php_value upload_max_filesize 128M
php_value post_max_size 160M
php_value memory_limit 256M
php_value max_execution_time 300

Do not use this method on Nginx, PHP-FPM configurations that reject it or managed hosts that lock PHP settings. If it causes a 500 error, remove the lines immediately. My WordPress 500 error guide covers the related troubleshooting steps.

Do not rely on theme functions

Code added to functions.php usually cannot raise a server-enforced upload limit. It also disappears when the theme changes unless a child theme is used. Hosting-level PHP configuration is the more reliable solution.

Check WordPress Multisite settings

On Multisite, a network administrator can set a separate limit under Network Admin > Settings > Network Settings. The network value cannot exceed the server’s PHP limit.

Use another upload method for very large files

Large migration archives, backups and videos may not belong in the normal WordPress media uploader. Use SFTP, cPanel File Manager, a host migration tool or external video hosting when appropriate. Do not upload backup archives into a publicly accessible media directory.

When the displayed limit does not change

Confirm you edited the PHP version assigned to the correct domain. Clear hosting caches, check for additional configuration files and review Site Health again. If the host enforces a platform maximum, support must change it or recommend a different transfer method.

Keep uploads secure and efficient

  • Increase limits only as much as needed.
  • Compress images before uploading.
  • Keep executable and backup files out of public media folders.
  • Use SFTP for large administrative transfers.
  • Reduce the limit again after a one-time migration if appropriate.

If large uploads also produce memory failures, use my guide to fixing the WordPress memory exhausted error.

Published by
JL Faverio

JL Faverio is a Technical SEO Consultant specializing in WordPress, technical SEO, and website maintenance. I help businesses and agencies fix technical SEO issues, maintain WordPress websites, improve site speed, and solve problems that other developers can't. With years of experience managing hundreds of WordPress websites, I focus on practical solutions that improve search visibility and long-term website health.