How to Increase the Contact Form 7 File Upload Limit

by | Aug 22, 2025 | Tutorials

Running into upload errors with Contact Form 7? You’re not alone. Whether you’re collecting resumes, images, or videos, your visitors hitting the upload limit when trying to upload can be frustrating and confusing to fix. In this guide, you’ll learn exactly how to increase the Contact Form 7 file upload size limit, step by step, with no coding. 

Contact Form 7 is a free, versatile plugin that powers hundreds of millions of times (literally, 388,200,080 downloads as of the time of writing) WordPress forms. While it supports file uploads out of the box, the default limits often set by your server or the plugin itself can be restrictive. Let’s break it down and get your forms optimized.

What is Contact Form 7 and Why Use It for File Uploads?

Contact Form 7 offers a lightweight plugin (though, not the easiest in my findings) way to build contact forms without coding. It includes built-in support for file attachments, making it ideal for scenarios like accepting video uploads, large files, and more. 

The best part? It’s free! You can create a basic file upload form in minutes, and if you need more, there are free extensions that expand what Contact Form 7 can do. For example, Drag and Drop Multiple File Upload adds multi-file support, Conditional Fields lets you show or hide uploads based on choices, and Flamingo saves submissions to your database.

How to Increase the WordPress Contact Form 7 File Upload Limit Size

Before we start building our form, in order to Increase the Contact Form 7 file upload limit, we must increase the limit. To raise the WordPress Contact Form 7 file upload limit size, I’m going to outline 4 methods that can be done, with 3 getting down and dirty into the code and one method is using a plugin, and one is asking your hosting support, but there’s limitations. 

Method 1: Edit PHP Settings via php.ini or .htaccess (Free Methods)

This method is free, but requires a lot of scary code & opening configuration files. And, in my experience you’ll start to get more errors when your maximum upload file size surpasses your memory limit, but results may vary! 

First, access your site’s files via FTP or your hosting control panel.

  • php.ini File: Locate or create php.ini in your WordPress root. Add:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
  • Save and restart your server if needed. Ensure you set 64M to the size you wish, with M standing for megabyte.
  • .htaccess File: In the root directory, add to .htaccess:
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
  • This works on Apache servers. Ensure you set 64M to the size you wish, with M standing for megabyte. 

Method 2: Use WordPress Functions File

Edit your theme’s functions.php (Appearance > Theme Editor):

Add:

@ini_set('upload_max_filesize', '64M');
@ini_set('post_max_size', '64M');
@ini_set('max_execution_time', '300');

This is a quick, code-based fix for NGNIX servers only. This won’t work on Apache servers. 

Method 3: Install Big File Form Uploads to increase the maximum file upload size (easiest)

Big File Form Uploads is the easiest way to Increase the Contact Form 7 File Upload Limit. It works in tandem with our popular Big File Uploads plugin, and you actually set the Contact Form 7 File Upload Limit in there. Big File Form Uploads works in the background only. 

  1. Install the Big File Uploads plugin and set the limit you want (it can be anything from 1MB to 10GB or larger!)
  1. Install the Big File Form Uploads plugin

That’s it! It’s extremely simple. 

Method 4: Contact Your Hosting Provider 

There’s some great web host providers, and there’s some lackluster ones – all for a variety of reasons. So reaching out to your hosting provider support could be a hit or miss. And, in my experience, most hosting providers will only increase it to about 256MB, maybe a stretch to 512MB – but that’s it. So, you’ll still have to go back to using method 3 if you want something substantial. 

The first step is to reach out to your hosting provider and tell them:

Hello, I am trying to let my visitors upload large files through my Contact Form 7 form. Can you increase the maximum file upload size of my website please? 

From there, they should be able to help you or give you other options. Make sure they set it to 256MB or 512MB. 

How to Create a File Upload Form in WordPress Using Contact Form 7

Now that we have a clear runway to uploading large files, let’s get to building the form! Creating a file upload form in WordPress is straightforward with Contact Form 7. This method is free and works on any standard WordPress installation. Follow these steps:

  1. Install and Activate Contact Form 7: Go to your WordPress dashboard, navigate to Plugins > Add New, search for “Contact Form 7,” and install it. Activate the plugin once installed.
  2. Create a New Form: In the dashboard, click Contact > Add New. Give your form a title, like “File Upload Form.”
  3. Add the File Upload Field: In the form editor, click the “file” button to insert a file upload tag. It will pop up with a modal and Field type, Field name, Class attribute, Acceptable file types, and File size limit. For the sake of this tutorial, we will only focus on the file size limit.
  1. You’ll want to set this as the same size you set Big File Uploads as. If it says there is a configuration error, that is OKAY. Make sure you insert the tag, and this sets a Contact Form 7 image upload file size limit or restricts file types.
  1. Configure Email Attachments: Switch to the “Mail” tab. In the “Message” field, add [your-file] to attach the uploaded file to the email you receive. You DO NOT want to put this in the attachment section. If visitors can upload large files, these will cause email deliverability issues and lost messages. 
  1. Save and Embed the Form: Save the form, copy the shortcode (e.g., [contact-form-7 id=”123″ title=”File Upload Form”]), and paste it into a page or post.

That’s it! You’ve now created a file upload form on your WordPress website with the file upload size increased. 

Understanding the Contact Form 7 File Upload Size Limit

The Contact Form 7 file upload limit isn’t just plugin-specific. It’s influenced by multiple factors:

  • Plugin-Level Limit: Set in the form tag (e.g., limit:256mb). This caps individual files but doesn’t override server settings.
  • Server-Level Limits: WordPress inherits limits from PHP configurations like upload_max_filesize (default often 2MB) and post_max_size (default 8MB). If your form allows multiple files, the total size can’t exceed these. Can be bypassed by Big File Form Uploads. 
  • Hosting Provider Restrictions: Some hosts cap uploads at 25MB or less, especially for email attachments via services like Gmail. Can be bypassed by Big File Form Uploads. 
  • Total Attachment Size: For multiple files, Contact Form 7 may throw a “The total size of attachment files is too large” error if exceeding mailer limits. This is why we recommended above not to have ANYTHING in the mail attachments section. 

Troubleshooting Common Issues

Frequently Asked Questions (FAQs) About Contact Form 7 File Upload Limits

What is the default file upload limit in Contact Form 7?

The default limit in Contact Form 7 isn’t strictly set by the plugin but inherits from your server’s PHP settings, typically around 2MB for upload_max_filesize. If you don’t specify a limit in the form tag (e.g., [file your-file]), it falls back to these server defaults. Check your php.ini or use WordPress Site Health to confirm. Use Big File Forms Uploads to increase beyond server defaults. 

Why does my file upload fail even after increasing the limits?

If you’ve done any of the methods above, the likely culprit is you didn’t set the limit properly in Contact Form 7 settings. 

Can I allow multiple file uploads in Contact Form 7 without plugins?

Core Contact Form 7 supports only single-file uploads per field. Big File Form Uploads only supports this, too. For multiple files, you’ll need a free extension like “Drag and Drop Multiple File Upload – Contact Form 7” or “Contact Form 7 Multi-File Upload.” These add drag-and-drop interfaces and let you set total size limits to prevent “total attachment size too large” errors.

How do I restrict file types in Contact Form 7 uploads?

Use the filetypes attribute in your form tag, like [file your-file [file file-507 filetypes:audio/*|video/*|image/* limit:1mb]. This restricts uploads to those extensions. For images specifically, try [file your-image [file file-507 filetypes:audio/*|video/*|image/* limit:1mb] limit:5mb] to control the Contact Form 7 image upload file size limit while allowing only certain formats.

What if my host doesn’t allow editing php.ini or .htaccess?

Contact your hosting support to request an increase in upload limits. They often can adjust PHP settings on their end. But, if they can’t, or you need more than what they will set, use Big File Form Uploads. 

How can I store uploaded files on my server instead of emailing them?

By default, files are attached to emails, but for larger uploads, consider plugins like “Contact Form 7 – File Upload to Server” or integrating with cloud storage via Infinite Uploads. This avoids email size limits and saves files directly to your WordPress uploads folder or external services. Big FIle Form also says the files directly to your server in /uploads/wpcf7_uploads

Is there a way to resume interrupted file uploads in Contact Form 7?

Unfortunately not. I’m not sure if there’s any solution out there, either! 

How do I handle security for file uploads in Contact Form 7?

Always validate file types and sizes in the form tag to prevent malicious uploads. Use plugins like “Wordfence” for scanning uploads, and enable CAPTCHA or reCAPTCHA in Contact Form 7 to reduce spam. WordPress core also sanitizes uploads, but avoid allowing executable files (e.g., .exe, .php) by restricting filetypes.

Conclusion

Increasing the Contact Form 7 file upload limit is essential for robust WordPress forms, and with the methods listed, you can handle larger files without hassle. Whether you’re setting up a basic file upload form in WordPress or tweaking the WordPress Contact Form 7 file upload limit size, Contact Form 7 remains a powerful, lightweight solution that won’t bog down your site.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Post

WordCamp Europe 2025 Recap

WordCamp Europe 2025 Recap

My first WordCamp Europe is in the books, and it was every bit as fantastic as I expected! It was also my first time in Europe, and it went out with a bang—Switzerland was the first European country I visited. What a dream! My wife came along, and it was a joy to...

Announcing Infinite Uploads v3.0

Announcing Infinite Uploads v3.0

Today, we’re announcing version 3.0 of Infinite Uploads. This major release marks the start of our journey to bring you the best media experience for WordPress. Since purchasing Infinite Uploads in late 2024, we’ve taken the time to deeply understand our customers,...

Newsletters

Written By: Blake Whittle

Owner of ClikIT, Blake has been involved in WordPress since 2014. Once designer & developer, now he manages the team at ClikIT and provides project management & strategic vision to their clients. Now, he's leading the change at ClikIT to become a plugin company.

Create Your Account And Start Exploring

Try the Infinite Uploads plugin and discover all its benefits. By registering, you’ll gain access to technical support, receive updates, and enjoy exclusive content. Don’t wait any longer and join us today!