Why You Should Upload WordPress Form Files to Google Drive

With over 15 years of experience using WordPress, I‘ve found uploading form files directly to Google Drive offers some excellent benefits compared to traditional web host storage.

Let‘s look at a few key reasons why you should consider integrating Drive uploads for your WordPress site forms.

Free Up Web Hosting Space

Hosting accounts provide limited storage space. For example, basic shared hosts often offer just 10-50 GB.

Average file upload sizes are growing each year. In 2020, the average upload size was 21.5 MB according to Sandvine‘s Global Internet Phenomena Report.

So it doesn‘t take long to eat through your allotted space, especially if you run contests or allow large uploads.

By automatically sending files to Google Drive instead, you avoid maxing out your web host storage. This helps prevent overage fees or even account suspensions from excessive usage.

Access Files Anywhere

The traditional approach is storing uploads on your web server. This means you need to login to WordPress or FTP to access submitted files.

Google Drive provides a better overall experience:

  • Available on all devices with the Google Drive app – iOS, Android, desktop, etc. No need to remotely login to your site.
  • Stream/view uploads instantly without downloading.
  • Native offline sync across devices. Make files available offline.
  • Fast search across all files. Easily find submissions.

You have easy access anywhere without needing WordPress.

Share Files with Anyone

Sometimes you need to collaborate with others who don‘t have access to your WordPress dashboard.

For example, sharing entrant submissions with a client or sending files to an external department.

Google Drive sharing settings give you complete control over who can access files:

  • Share file links that don‘t require sign-in
  • Invite specific Google accounts to view or edit
  • Make files publicly accessible
  • Set link expiration dates
  • See number of views/downloads

Far more flexible than WordPress access levels.

Extra Backup and Security

Backing up your WordPress site is crucial. But backing up user submitted files is often overlooked.

If you suffer data loss/corruption, hacked files, or a migrated/switched host goes wrong, those form uploads could be lost forever.

By also saving uploads to Google Drive, you have an automated cloud-based backup in a separate location from your web host.

This provides an extra layer of protection in case you ever need to restore lost form files.

Lighten Server Processing Load

Every file upload requires processing power for the transfer and storage. This adds incremental load to your server on top of normal traffic.

When you offload uploads to Google Drive instead, it lightens the server resource demand and could improve overall site performance.

Google‘s infrastructure is far better optimized for handling large file uploads quickly and efficiently.

Now that you know the benefits, let‘s look at how to actually set it up. We‘ll cover:

  • Configuring a WordPress file upload form
  • Automatically sending new uploads to Google Drive
  • Additional tips and best practices

For this guide, we‘ll use WPForms, the most popular WordPress form builder.

1. Set Up a File Upload Form

First, you need a working file upload form on your WordPress site.

  1. Install and activate the WPForms plugin.

  2. Create a new form. Add any fields you need – name, email, message, etc.

  3. Add a File Upload field. Be sure to configure the:

    • File type – allow or restrict to certain extensions (PDF, JPG, DOC, etc).

    • File size limit per upload.

  4. Embed your form on a page using the WPForms block.

  5. Test your form works by making a submission with an uploaded file attached.

Here‘s an example form with a file upload field added:

WordPress Form with File Upload

This gives us a working form to connect to Google Drive.

2. Install the WPForms Zapier Addon

To automatically send new form uploads to Google Drive, we‘ll use Zapier.

Zapier connects two apps so they can work together.

When a form is submitted (trigger), Zapier will take the uploaded file and automatically add it to Drive (action).

Let‘s install the required WPForms addon:

  1. Get the official WPForms Zapier Integration addon.

  2. Go to WPForms » Add-Ons and install.

  3. Activate the addon.

  4. Go to WPForms » Settings » Integrations.

  5. Copy your Zapier API key – you‘ll need this next.

Retrieving WPForms Zapier API Key

Now WPForms is ready to connect with Zapier.

3. Create a Zapier Automation

Here we‘ll set up the automation in Zapier that handles moving the files from WPForms to Google Drive.

  1. Sign up for a free Zapier account if you don‘t have one.

  2. In your Zapier dashboard, click Make a Zap. Give it a name like "Upload Form Files".

  3. Search for WPForms and select "New Form Entry" as the trigger app/event.

  4. Sign in to connect WPForms using your API key from step 2.5.

  5. Select your file upload form when prompted. Click Continue.

  6. Test the trigger using a submission from your test form.

  7. Search for Google Drive and choose "Upload File" as the action.

  8. Connect to your Google Drive account when prompted.

  9. Configure the destination folder in Drive for the uploaded files.

  10. Set the file upload field from your form as the source for Zapier.

  11. Test the Zap to confirm it works by uploading your test file.

  12. Turn on your Zap and you‘re done! New form uploads will now also be sent to Google Drive.

Here‘s an example Zapier workflow setup:

Zapier Automation Workflow

And that‘s it! Your form will now automatically save any uploaded files to both your web host and backup them to Google Drive.

Recap and Tips

To quickly recap, we:

  • Created a file upload form using WPForms
  • Added the WPForms Zapier integration
  • Connected Zapier to automatically upload new files from the form to Google Drive

Here are some additional tips from my experience for a smooth setup:

  • Name your uploaded files dynamically to avoid duplicates. Use a unique ID or date.

  • Make sure Drive folder permissions match your sharing needs. Adjust as needed.

  • Monitor storage usage as large uploads can quickly eat Drive space.

  • The above works for any form plugin that supports Zapier integration.

  • You can create additional Zaps to push non-file field data to Google Sheets, email, etc.

And that covers the entire process start to finish! Let me know if you have any other questions.

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.