how-to-create-a-file-upload-form-in-wordpress_b

How to Create a File Upload Form in WordPress (Easy Steps)

Wondering how to let your website visitors upload attachments through a simple WordPress file upload form?

Giving users the ability to upload documents and media to your WordPress site can make it easier for you to collect the information you need.

Create Your File Upload Form Now

In this article, we’ll show you how to easily create a WordPress file upload form using the WPForms plugin.

How to Create a File Upload Form in WordPress

The video above will walk you through the entire process, or check out the steps below for the most up-to-date information.

Step 1: Install WPForms

To start, you’ll need to install WPForms. As the best form builder plugin, you can easily create a file upload form with WPForms, thanks to its drag-and-drop interface. It even has a dedicated File Upload field, which we’ll use in this tutorial.

The WPForms homepage

WPForms comes with 2,000+ form templates that you can use as-is or modify to make them your own. That includes several file upload form templates to help you create your form quickly and accept attachments, such as:

  • Documents (.doc, .xls, .ppt, and .pdf)
  • Images, (.png, .gif, and .jpg)
  • Videos (.mpg, .mov, and .wmv)
  • Audio files (.wav, .mp3, and .mp4)
  • And more.

If you need help installing WPForms, learn how to install and activate a WordPress plugin. Remember, you’ll need a paid license to use the File Upload field.

Create Your WordPress Form Now

Step 2: Choose a File Upload Form Template

Go to your WordPress dashboard and click on WPForms » Add New in the left-hand menu to add a new form.

We’ll use one of WPForms’ 2,000+ form templates to make our file upload form and kick things off!

Scroll down and type “file upload form” in the template search field. When this template appears in the results, move your cursor over it and click Use Template.

Choosing the File Upload Form template

Then WPForms will populate a pre-built File Upload Form, where you can Add Fields via drag-and-drop functionality to the form preview on the right side.

The File Upload Form template

Now we can customize our WordPress file upload form to make it relevant to our website and the customers that will be using it.

Remember that you can add extra fields or move your file upload field to a different spot just by dragging and dropping.

Adding a File Upload field to a contact form

Step 3: Customize the WordPress File Upload Form

With the File Upload Form template, you’ll already have the Name, Email, Phone, File Upload, and Additional Comments fields.

Click on any of the form fields to make changes to its Label, Description, and other settings like setting up Smart Logic.

File upload field options

If we talk about the File Upload field, you’ll notice that it comes with a list of different options for you to customize. These include:

  • Allowed File Extensions — If you want to restrict the types of files that can be uploaded to your WordPress form, put them here, each separated by a comma.
  • Max File Size — Specify, in megabytes, the max size file you’ll allow users to upload. If you leave this blank, WPForms will default to the maximum file size limit that’s allowed by your web host. If you need to increase it, see this tutorial on how to change the maximum file upload size in WordPress.
  • Max File Uploads — If you’ve chosen the Modern style (see below), you can specify how many files users can upload to your form.
  • Required — If you want to require that users upload documents to WordPress before they can submit their form, select this checkbox.
Modern file upload drag and drop

In the Advanced tab of the field options panel, you have the following options:

  • Style — You can switch between the default Modern style (recommended) and the Classic style. Only the Modern style allows for users to upload more than 1 file at a time.
  • Store file in WordPress Media Library — Save files uploaded to this field in your site’s WordPress Media Library.
  • Enable File Access Restrictions — Restrict access to file uploads using user role restriction or password protection.

Step 4: Configure Form Notifications & Confirmations

Notifications are an excellent way to know when someone submits one of your file upload forms. All forms in WPForms have notifications enabled by default.

Accessing a form's notifications settings

There are 2 ways you can include your form’s uploaded file(s) in the email notification. The recommended option is to use Smart Tags to add a link to the body of the email.

A file upload link in an email notification

Using Smart Tags means the image itself is not included in the email. That can help to avoid emails being tagged as spam.

If you’d like to include the image as an attachment, can scroll down to the Advanced settings for the notification and Enable File Upload Attachments.

Enabling file upload attachments for an email notification

Keep in mind that email providers may have limits on the size of the attachments you can send from your site, so it’s best to test your form when you launch it.

Once you’ve set up the form notification, you can go ahead and check out our tutorial on how to set up form confirmations. To start, click on the Confirmations tab in the Form Editor under Settings.

form confirmations

There are 3 different kinds of confirmations in WPForms:

  1. Message — This is the default confirmation type. It displays a message after someone hits submit on your form, and is customizable.
  2. Display Page — Automatically sends users to any post or page on your site like a thank you page.
  3. Redirect — Useful if you want to take the user to a different website or specialized URL for more complex development.

Select the type of confirmation type you’d like to create. For this example, we’ll select Message and add a basic confirmation message.

Customizing the file upload form confirmation message

Feel free to customize the confirmation message to your liking and click Save when you’re done. Now you’re ready to add your form to your website.

Step 5: Add Your File Upload Form to Your Website

After you’ve created your form, you need to add it to your WordPress site.

And WPForms lets you add your forms to multiple places on your WordPress website including your pages, blog posts, and sidebar widgets.

To begin to embed your file upload form, create a new page or post in WordPress, or go to the update settings on an existing one.

After that, add a new block and select the WPForms icon to proceed and add your form to the page/post.

Adding a WPForms block to a page

Click on the WPForms dropdown and pick the form you’ve already created that you want to insert into your page. So select your file upload form.

Selecting a file upload form in the WPForms block

Next, click on the blue button in the top right that says either Publish or Update, so your form will appear on your website.

Publishing a file upload form

That’s it! Your file upload form is now live on your website and ready to start accepting attachments from your users.

Step 6: View the Uploaded Files in WordPress

WPForms stores each form submission as an entry. To view uploaded files, go to WPForms » Entries.

And from there, select the right form from the list and click on View to view details and attachments related to the specific entry.

Viewing an entry to your file upload form

Next, right-click the file to download the file, or click to view it in your browser, the choice is up to you!

Viewing the file upload in an entry

Better yet, the WPForms WordPress plugin has tons of addons you can install so you can do more with your files.

For example, you can use our Zapier addon to automatically save all file uploads to different services, such as:

Create Your File Upload Form Now

FAQs on File Uploads in WordPress

File uploads are a popular topic among our readers. Here are some common questions about file uploads in WordPress.

Why Use a File Upload Field on Your Forms?

You might need to add a file upload field to your WordPress forms so users can upload documents to WordPress as well as other types of files and media as they submit their forms to you.

What Kinds of Forms Can I Create?

One of the most common uses of a file upload field is in job application forms so applicants can attach their resume files and other important documents.

However, there are countless other scenarios where a WordPress file upload form can come in incredibly handy, such as:

What File Formats Does WPForms Accept?

When you create an image upload form, WPForms uses the same defaults as WordPress:

  • Images (.png, .gif, and .jpg)
  • Documents (.doc, .xls, .ppt, and .pdf)
  • Video (.mpg, .mov, and .wmv)
  • Audio (.wav, .mp3, and .mp4)

Sometimes you’ll want to accept file uploads that WordPress doesn’t allow by default. There’s an easy way to do that. Here’s how to allow additional file upload types to your forms using a free plugin. It lets you specify the file format and MIME type for each additional file extension.

If you’d like to increase the maximum upload image size for your site, check out this tutorial on increasing the maximum file upload size in WordPress.

Create Your File Upload Form Now

Next, Create a File Upload Widget in WordPress

If you want to allow site visitors to upload files directly to your website using a widget, be sure to check out our helpful guide on how to create a WordPress file upload widget and make it easier to collect the information you need!

Create Your File Upload Form Now

Ready to build your form? Get started today with the easiest WordPress form builder plugin. WPForms Pro includes lots of free templates and offers a 14-day money-back guarantee.

If this article helped you out, please follow us on Facebook and Twitter for more free WordPress tutorials and guides.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPForms is funded, why it matters, and how you can support us.

Hamza Shahid

Hamza is a Writer for the WPForms team, who also specializes in topics related to digital marketing, cybersecurity, WordPress plugins, and ERP systems. Learn More

The Best WordPress Drag and Drop Form Builder Plugin

Easy, Fast, and Secure. Join over 6 million website owners who trust WPForms.

Please enable JavaScript in your browser to complete this form.