Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

How to Create a File Upload Form in WordPress

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to create a file upload form in WordPress?

Maybe you are hiring employees and want to collect resumes, or perhaps you are running a photography contest where you need the applicant to attach files.

In this article, we will show you how to easily create a file upload form in WordPress, step by step.

Creating a File Upload form in WordPress

Why Create a WordPress File Upload Form?

If you want to collect any kind of file from your users on your WordPress website, then a file upload form is a great idea.

You can let users upload images, PDF files, Word documents, or other types of files.

Using a file upload form makes life easy for you and your users. Instead of the email back-and-forth, you can create a form that includes all the fields you need so you can collect all the information at once.

Also, your form should automatically save the form data in your WordPress database. That way, you can easily find the submissions, even if you miss or delete an email.

That being said, let’s take a look at how to create a file upload form in WordPress.

How to Create a File Upload Form in WordPress

For this tutorial, we will be using WPForms, which is the best contact form plugin for WordPress.

For more information, see our complete WPForms review.

First, you will need to install and activate the WPForms plugin. For more detailed instructions, check out our step-by-step guide on how to install a WordPress plugin.

Note: WPForms also offers a free version. However, you will need the Pro version of the plugin to unlock the file upload form template.

Upon activation, head to the WPForms » Add New page from the WordPress admin sidebar.

This will take you to the ‘Search Template’ page, where you can start by naming your new form. You need to also look for the file upload form template in the search box on the left.

Next, simply click the ‘Use Template’ button under the ‘File Upload Form’ option.

Choose the File Upload form template

You will now be taken to the WPForms builder, where the File Upload Form will be automatically created for you.

You can use the file upload form template without making any changes, or you can also drag and drop form fields from the ‘Add Fields’ sidebar.

File Upload form will now be automatically created for you

Next, click on the ‘File Upload’ field in the form to open up its settings in the left column.

By default, you can upload different types of files in the form, including:

  • Image files: .png, .gif, .jpg
  • Documents: .doc, .xls, .ppt, .pdf
  • Audio: .wav, .mp3, .mp4
  • Video: .mpg, .mov, .wmv

All you have to do is type the file formats that you want to accept into the ‘Allowed File Extensions’ box.

For this tutorial, we are going to allow the image formats .png, .gif, and .jpg. Make sure to separate each file format with a comma.

Type file extension type

Note: WordPress limits the types of files that can be uploaded to the site for WordPress security reasons. You can add additional file types to WordPress if you want to allow users to upload file types that aren’t normally allowed.

You can also set a maximum file size limit and a maximum number of files. For our tutorial, we are going to allow people to submit up to 3 photos of up to 50MB each.

If you want to prevent people from submitting the form without attaching their file(s), you can toggle on the ‘Required’ switch. This means the form can’t be submitted unless at least 1 file has been uploaded.

Choose file size and the number of files to be uploaded

Next, simply switch to the ‘Advanced’ tab from the top.

By default, the File Upload Field uses a modern format that lets users drag and drop their files.

However, if you have limited space for your form or prefer a classic upload field, you can change this. Simply select the ‘Classic’ option from the ‘Style’ dropdown menu.

Tip: The classic upload field only allows one file to be uploaded. If you want users to be able to submit more than one file, you will need to add multiple File Upload Fields to your form.

Choose the Classic option as the form style from the dropdown menu

You can also choose to store the submitted files in the WordPress Media Library by toggling on the ‘Store file in WordPress Media Library’ switch. This makes it easy for you to add the uploaded files to a post or page.

For instance, if you are running a photography competition, then you may want to include the best photos when you announce the winner.

Note: The uploaded files will still be saved in your WordPress database, even if you don’t check this box. They are just stored in a separate folder in your WordPress hosting account.

Toggle the switch to allow the form to store files in the media library

If you want to edit any of the other fields on your form, you can click on them to open the field’s settings in the left column.

You can also add other fields to your File Upload form from the left column.

For example, you may want to add a Website/URL field to the form so that users can give you the link to their website.

Save the form after adding additional fields

Once you are happy with your form, click the ‘Save’ button in the top right corner of the screen to store your settings.

Setting Up Your File Upload Form’s Notifications

To change the notification settings for the form, you need to open the ‘Settings’ tab in the left corner. Once you are there, simply click on the ‘Notifications’ tab.

By default, the form sends an email notification to {admin_email} upon form submission.

If you created your WordPress site by yourself, then this will be your email address. If not, then you can delete {admin_email} and type your own email address here instead.

Change the email address the receives the notifications

If you are not sure if {admin_email} is your email address, simply visit the Settings » General page from your WordPress admin dashboard.

Once you are there, look for the Administration Email Address. You can now change the admin email address from here.

Check the admin email

Once you are done, don’t forget to click the ‘Save Changes’ button to store your settings.

If you want the submitted files to be sent to more than one person, then you may want to see our tutorial on how to create a contact form with multiple notification recipients.

You can also change the confirmation message that users see after the form is submitted.

To do this, you need to visit the Settings » Confirmations page from the left column. Then, simply type the message into the ‘Confirmation Message’ box. You can also add formatting like bold and italics.

Change the confirmation message

Finally, don’t forget to save your form once you have made the changes.

You can exit the form builder by clicking the ‘X’ at the top right corner.

Adding the File Upload Form to Your Website

Once you have finished creating your form, you will need to add it to your website.

To do this, you must open an existing or new WordPress page/post from the admin sidebar. For this tutorial, we are going to add the File Upload form to a new page.

Once you are there, click on the Add New Block ‘(+)’ button in the top left corner of the screen and find the WPForms block.

Locate and add the WPForms block

Upon adding the block, you will see a WPForms dropdown menu displayed on the page.

Go ahead and select the File Upload form that you just created.

Choose the File Upload form from the dropdown menu

Finally, click the ‘Publish’ or ‘Update’ button to save your changes.

You can now visit your website to see the File Upload form in action.

File upload form preview

You can also make changes to your form anytime by visiting the WPForms » All Forms page from the admin sidebar.

From here, simply click on the name of the form or hover your mouse over it and click the ‘Edit’ link to open up the form builder.

Edit form

When you edit your form, it will be automatically updated on your website, so you don’t need to add it to your page again.

Tip: It’s a good idea to test your form to make sure it’s working as expected. If you don’t get an email notification after creating a form entry, then you can read our step-by-step guide on fixing the WordPress not sending email issue.

Viewing or Downloading the Uploaded Files

When someone sends a file using your file upload form, you can see it in your email inbox or your WordPress dashboard.

With each form entry, you will get an email like this:

Preview of the email you'll receive when someone fills the form

Just click the links to view or download the files themselves.

You can also easily find the files in your WordPress dashboard. Simply go to the WPForms » Entries page and then click on the name of your form.

Choose the file upload form on the entries page

You can see the uploaded files in the table of WordPress form entries.

Alternatively, you can click the ‘View’ link to see the full details for each form entry.

View form entries

We hope this tutorial helped you learn how to create a file upload form in WordPress. You might also want to check out our expert picks for the best WordPress survey plugins and read our guide on how to create an email newsletter.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

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

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

14 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Mrteesurez says

    I can that WPForms seems to be the best contact form plugin for WordPress for any business bro has.
    But what if I want to store the uploaded files in another location, maybe third party location, like AWS, azure or Google drove, do that I can be able to collect more files and never overload my shared WordPress hosting database.

    • WPBeginner Support says

      WPForms does allow you to send the uploaded files to storage like AWS or drive to not have the files on your hosting itself.


  3. Ralph says

    This is really nice idea for a contest. Way better than leaving an email that can be spammed with a lot of files. This is clear, offer security in form of deciding what files are accepted and how many of them. Great guide!

  4. Jiří Vaněk says

    Before I had my own server where I configured PHP according to my needs, it’s important to note that the upload file size limit might still be on the provider’s side. Many providers have a much smaller PHP limit per file. Be mindful of this. Sometimes, you can adjust it in the .htaccess file, sometimes with a .user.ini file, and sometimes not at all. You might need to contact the server administrator to increase the file upload limit using PHP.

  5. Patricia Dueck says

    When a person uploads a file to a WordPress form, do they have to have a WordPress account or a certain type of email address or can anyone upload a file regardless of their email address?

    • WPBeginner Support says

      It would depend on how you set up the form but you can accept uploads from anyone you wanted :)


  6. Leandro says

    Hello, first thanks for sharing knowledge.

    One question: is there any way to change the path for sending the file, for example to an S3 bucket?

  7. Ezekiel says

    I can’t access uploading have access uploading files on my if I didn’t subscribe to any plan right??

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.