Are you struggling with WordPress’s file upload size limits? Many website owners face this frustrating bottleneck when trying to upload large images, videos, themes, or plugins. This limit, set by your hosting environment and WordPress configurations, affects how big your files can be during upload—often capped between 2MB and 128MB by default. If you wonder how to increase the maximum upload file size in WordPress, you’re not alone.
In this comprehensive guide, we’ll walk through every proven method to raise your WordPress upload size limit safely and effectively. From simple tweaks like contacting your hosting provider, to advanced steps like editing server files such as .htaccess, php.ini, or functions.php. Additionally, you’ll learn best practices to optimize your website’s performance and security while handling large files.
This article is designed with beginners and advanced users in mind, blending clear step-by-step instructions with practical insights. Whether you manage a blog, an ecommerce site, or a media-heavy portfolio, scaling your upload limits is essential to unlocking the full potential of WordPress.
Why Is There a Maximum Upload File Size in WordPress?
Uploading large files demands considerable server resources such as CPU, RAM, and bandwidth. To protect servers and ensure sUnderstanding why WordPress has an upload file size limit is key to managing your website efficiently. This limit, typically set between 2MB and 128MB by your hosting provider, exists primarily to protect server resources and ensure website performance.
Uploading very large files requires significant server CPU, memory, and bandwidth usage. Without these controls, a single large upload could:
- Overwhelm your server resources, causing slow performance or downtime
- Trigger server timeouts, leaving files partially uploaded or broken
- Introduce security risks by enabling malicious or corrupted file uploads
Most hosting providers set this restriction at the server level to prevent excessive strain and maintain a stable environment for all users, especially on shared hosting.
Moreover, WordPress itself respects these limits and does not override server settings by default, so even if WordPress configuration files specify higher limits, the server-imposed restrictions will take precedence.
By imposing this upload cap, your hosting environment balances security, efficiency, and resource management, providing a smoother experience for you and your visitors.
Later in this guide, you’ll discover practical ways to safely customize these limits to meet your site’s needs without compromising performance or security.
How to Check Your Maximum File Upload Size Limit in WordPress
You can easily check your maximum file upload size limit. As I told you at HostKro servers we set this limit to 2MB but if you are using any other hosting service then follow the below steps.
- Login to your WordPress dashboard
- Here go to click on the media option and choose to add new
- On this page, you will the current maximum file upload size limit of your website
How to Increase Maximum Upload File Size in WordPress?
If you’ve checked your WordPress upload limit and found it too small for your needs, don’t worry — increasing it is easier than you might think. There are several effective ways to raise your upload file size, ranging from simple solutions like contacting your hosting provider or using user-friendly plugins, to more advanced methods like editing server files such as .htaccess, php.ini, or theme-specific functions.php. Each method has its own advantages and applicability depending on your hosting environment and technical comfort level.
In this section, we will explore all the proven techniques step-by-step, empowering you to choose the right approach and upload larger files smoothly without compromising website performance or security.
1. Contact Your Hosting Provider
This is the easiest way you just need to ask your hosting provider to increase your website’s maximum upload file size limit and they can do it from their side.
At HostKro you will get 24/7 support you can contact us any time. Also, we have multiple options like Whatsapp, Live Chat, Email, and Ticket system to connect our support team to resolve your issue.
2. Update .htaccess file
If your web server is using Apache and PHP is set as an Apache module, then you can add a few lines of code in your WordPress .htaccess file to increase the max upload size in WordPress.
To access the .htaccess file login into your cPanel and navigate to the file manager in the root folder (public_html) where you installed the WordPress you will find this file called .htaccess. Now just right-click on the file can choose the edit option.
In case you didn’t see this file in the root folder then click on the settings option and then tick the show hidden files then click on the save button.
So once you click on the edit option here you just need to write the code given below at the end of the page.
php_value upload_max_filesize 64M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300
This will define the max upload size in Megabytes. Replace the numbers as per your requirement. The max execution time and max input time are in seconds. The execution time defines the limit of time spent on a single script. Choose a number that is suitable for your site.
3. Edit functions.php File
Sometimes you may don’t have access to your cPanel or if you are more comfortable with editing theme files then here is the method for you.
You can easily increase the size limits by adding the following lines of code in the functions.php file of your theme.
However, remember if you change the theme, the max upload size will return to its default values until you edit the functions.php file of the new theme.
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
If you don’t know how to edit the theme files in WordPress then just follow the below steps.
Login into your WordPress dashboard go to the appearance section and choose theme file editor here.
Now on the right side of your screen, you will see the name of files available in your theme. Choose the file which you want to edit.
Once you choose the file write the code you want and click on the update button.
4. Edit php.ini File
This is a default file used to configure any application which runs on PHP. This file contains parameters required for file timeout, upload size, and resource limits. This file is available in the root folder of your website. In some cases, this file is not visible; the other option would be to create a new file instead.
Open any text editor and create a new file on your desktop. Copy the following code and save it as php.ini.
upload_max_filesize = 64M
post_max_size = 128M
memory_limit = 264M
If you create a new PHP.ini file, then upload it inside the same root folder.
5. Modify wp-config.php File
Another way of increasing the upload size in WordPress is to define the size parameter in the wp-config.php file. To do that, access your WordPress root directory and locate a wp-config.php file.
Right-click on the file and click on the edit option and add the below code to the file.
@ini_set( 'upload_max_size' , '20M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );
Save your changes, and it should increase your file upload size.
6. Using Plugin Method
Not everyone wants to write code or access different files in the root folder. For that situation, the plugin comes in handy, and luckily there is a WordPress plugin available for increasing WordPress upload size. The plugin we will be using is the Increase Max Upload Filesize plugin.
- Go to your WordPress Dashboard → Plugins → Add new, search “Increase Max Upload Filesize”, then Install and Activate the plugin.
- Once installed, go to plugin settings and simply enter the value for upload size and Click the Save Changes button to apply the new upload size.
Best Practices for Managing Large File Uploads in WordPress
Increasing the maximum upload file size in WordPress is essential for many websites, especially those with rich media content like high-resolution photos, videos, or large plugins. However, simply raising the upload limit without careful planning can create challenges related to site speed, security, and server performance. To make the most of your increased upload capacity while keeping your WordPress site healthy and efficient, follow these best practices:
Optimize Media Before Uploading
Large media files can drastically slow down your site and consume excessive bandwidth. Always compress and optimize images and videos before uploading. Use tools like TinyPNG, ShortPixel, or HandBrake for video compression. Optimized files maintain quality while reducing file size, improving both upload success and site loading speed.
Balance Upload Limits with Server Resources
Setting your upload limit too high can strain your hosting environment, especially on shared servers. Consider your website’s traffic and available server resources before deciding the maximum upload size. If you frequently upload very large files, upgrading to VPS or dedicated hosting can provide the needed resources without impacting site performance.
Use Content Delivery Networks (CDNs)
A CDN distributes your media files across global servers, accelerating delivery to users and reducing the load on your primary server. Integrate a CDN like Cloudflare or BunnyCDN to handle large files efficiently. This also prevents large uploads from overwhelming your server’s bandwidth.
Implement Strict Security Measures
Larger upload limits can expose your website to security risks if not managed correctly. Use plugins or server rules to restrict allowed file types strictly, scan uploaded files for malware, and assign upload capabilities only to trusted users. Regularly update your WordPress core, themes, and plugins to patch vulnerabilities.
Monitor Server Performance and Site Speed
Keep an eye on your website’s resource usage and speed. Use tools like Google PageSpeed Insights, GTmetrix, or New Relic to monitor performance metrics. If you notice slowdowns or high resource usage after increasing upload limits, consider revising limits or optimizing other parts of your site.
Consider Alternative Upload Methods for Huge Files
For extremely large files, consider bypassing WordPress uploads altogether. Use FTP/SFTP to upload directly to your server, or rely on cloud storage services like Amazon S3, Google Drive, or Dropbox. You can then embed or link these files on your website, avoiding potential upload size restrictions and reducing server load.
Following these best practices ensures that increasing your WordPress upload size enhances your website’s capabilities without compromising speed, security, or user experience.
Frequently Asked Questions
To help you get the most out of your WordPress site and troubleshoot common issues around file uploads, we’ve compiled answers to the most frequently asked questions. Whether you’re wondering about upload size limits, how to change settings, or how these changes affect your website, this FAQ section is here to provide clear, practical guidance.
1. What is the maximum upload file size in WordPress by default?
The default maximum upload file size varies by hosting provider and server settings but usually ranges from 2MB to 128MB. This limit is imposed to protect server resources and ensure stable website performance.
2. Why am I seeing the “exceeds the maximum upload size for this site” error?
This error occurs when the file you’re uploading exceeds the set limit defined by your hosting server or WordPress PHP configuration. The upload will be blocked to avoid server overload or timeouts.
3. How can I check my current maximum upload file size in WordPress?
You can check your upload limit by going to Media → Add New in your WordPress dashboard. The maximum upload size will be displayed below the upload box. Alternatively, check under Tools → Site Health → Info tab → Server section for precise PHP settings.
4. Can I increase the upload size if I’m on shared hosting?
Increasing upload size on shared hosting can be limited by your provider. Some hosts allow small increases via PHP settings, but others require contacting support or upgrading plans. Always check with your host for possibilities.
5. Is it safe to increase the upload size in WordPress?
Yes, increasing upload size is safe when accompanied by proper security measures such as restricting file types, using malware scanning plugins, and granting upload permissions only to trusted users.
6. What is the best method to increase the maximum upload file size?
The best method depends on your access and hosting environment. Contacting your hosting provider is the easiest way. For advanced users, editing .htaccess, php.ini, or functions.php files is effective. Using plugins is a good option for non-technical users.
7. Will increasing upload size affect my website’s speed?
Increasing the upload limit does not directly slow your website. However, uploading and serving very large files without proper optimization or CDN can degrade site performance.
8. Can I increase the upload size on WordPress Multisite?
Yes, upload limits can be changed network-wide by the Network Admin under Settings → Network Settings. Individual sites cannot override these settings.
9. What if none of the methods to increase upload size work?
If none work, it means your host enforces strict server-level restrictions. Contact their support or consider upgrading your hosting to VPS or dedicated plans where you have more control.
Conclusion
Increasing the maximum upload file size in WordPress is a crucial step for many website owners who work with large media files, plugins, or themes. Whether you choose to contact your hosting provider, edit server configuration files, or use plugins, there are multiple proven ways to customize this setting to fit your needs. Remember to always balance larger upload limits with performance optimization and security best practices to keep your site fast, secure, and user-friendly. By following the methods and guidance outlined in this guide, you can confidently overcome upload restrictions and unlock the full potential of your WordPress website.