How to Increase the Maximum File Upload Size in WordPress

Are you facing problems while uploading heavy image files, themes, or plugins to the WordPress website? You need to increase the maximum file upload size in WordPress. The minimum file upload size limit often stops you from uploading files, especially themes and plugins or images, via media unloader. This article will explain how you can quickly increase the maximum file upload size in WordPress to fix those problems.

How to Check Maximum File Upload Size Limit in WordPress?

You can quickly check the maximum file upload size limit. To check it, in your WordPress site dashboard, go to Media >> Add New page, and you will find the file upload size limit for your WordPress site.

There are three methods that I will share with you to Increase the Maximum File Upload Size in WordPress.

1. Theme Functions.php

You can increase the File Upload Size just by adding a shortcode in your theme’s functions.php file. You can perform this task by installing any Theme editor plugin, FTP, or by using CPanel. This method only works in a running theme while uploading plugins or media files like images or videos. If you are trying to upload a new theme and facing this problem, you need to follow method No. 2 or 3.

  • @ini_set( ‘upload_max_size’ , ’64M’ );
  • @ini_set( ‘post_max_size’, ’64M’);
  • @ini_set( ‘max_execution_time’, ‘300’ );

2. Edit or Create PHP.INI

In this method, you will have to access your WordPress site’s root folder (example: public_html/yoursite.com/php.ini) using the FTP or Cpanel File Manager app your hosting account.

If you use shared hosting, you will not find a php.ini file in your site’s root directory. So you need to create a new php.ini file on your PC and upload it to the root folder. Add the following code in the newly created php.ini file.

  • upload_max_filesize = 64M
  • post_max_size = 64M
  • max_execution_time = 300

This method works in most cases, but if 64M doesn’t work, then try 10MB.

3. Edit .htaccess

In many cases, methods No. 1 and 2 don’t work. So it would help if you tried to modify the .htaccess file located in your site’s root folder. Add the following code in your .htaccess file (you can add this code anywhere, in the beginning or at the end)

  • php_value upload_max_filesize 64M
  • php_value post_max_size 64M
  • php_value max_execution_time 300
  • php_value max_input_time 300

Remember that if you are using a shared hosting package, these methods would possibly not work (in my case, it worked). So you have to contact your hosting provider to increase the maximum file upload size for you.

Check out: Why is upload speed considered important sometimes?

Related Articles

Website Speed Optimization Using .htaccess file

Optimizing website speed is crucial for both user experience and SEO rankings. One of the most effective methods to improve website performance is through the .htaccess file. This configuration file allows you to control server settings, enabling speed improvements...

Guide to Create Robots.txt: SEO Best Practices

SEO is constantly evolving, and understanding the Robots.txt file and how it affects your site's SEO is crucial for success. The robots.txt file is a simple text file that helps search engines understand which parts of your site should...

What is a Traffic Bot? Complete Information

A traffic bot is an automated program designed to generate fake or artificial website traffic. These bots simulate human users by clicking on links, visiting pages, and interacting with ads. While some traffic bots are used for malicious purposes,...

Guide to Fixing Pagination Issues with Yoast SEO

Pagination is common in large websites, such as blogs or product pages. However, pagination can create SEO issues like duplicate content or missing H1 tags. If not addressed properly, these issues can negatively affect rankings. In this guide I...

How to Set Up 410 Redirects in Yoast SEO?

If you manage a website with outdated or removed content, properly implementing 410 redirects is crucial. These redirects help search engines know that a page is permanently gone, improving your site’s SEO and user experience. As a website owner,...

Yoast SEO Best Practices: Optimizing Your WordPress Site

Yoast SEO has long been one of the most popular SEO plugins for WordPress. It helps website owners improve their search engine rankings through on-page optimization. In 2025, Yoast continues to be a powerful tool, with new features and...