🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!
Guides & Tutorials November 4, 2026

How to Show Google Drive Folders on WordPress (Private, by Role)

GravityExtra
How to Show Google Drive Folders on WordPress (Private, by Role)

Most teams keep their documents in Google Drive: briefs, price lists, handbooks, presentations, photos. Sooner or later someone asks for those files on the website, for clients, members, students or the public. Copying them into the media library means two versions that drift apart. Sharing every file with “anyone with the link” makes them reachable by anyone, also people who never visit your site. This guide shows how to show Google Drive folders on WordPress the careful way: one place for your files, private by default, with access by role and without slowing your pages down.

Decide what each group of visitors should see

Before you connect anything, write down who should see which folder. A typical list for an architecture studio looks like this: the public sees a folder of project photos and a press kit; logged-in clients see their project briefs, presentations and invoices; staff see an internal folder with the handbook and salary bands. A school might show a public calendar and lesson plans, a members’ area with recordings for parents, and a staff-only folder. Thinking in folders and roles first keeps the setup simple, and it is exactly how GravityExtra Drive Embed is organised: each Drive folder in its library has its own list of who may view it.

Keep the folders in Drive the way your team already works. The plugin follows sub-folders, so one library entry for “Client Library” also covers “Project Briefs”, “Presentations” and “Photos” inside it, with breadcrumbs for the way back.

Use your own Google Cloud OAuth client

To read your Drive, a WordPress plugin needs your permission through Google’s OAuth sign-in. You can do this with an OAuth client that you create in your own Google Cloud project. It takes about ten minutes: create a project, turn on the Google Drive API, fill in the consent screen, add the permission (scope) you need and create a “Web application” client with your site’s redirect address. Then you paste the client ID and secret into the plugin and press Connect with Google.

Owning the client has real advantages. No outside service sits between your site and Google, you see the connection in your Google account, and you can remove it at any time. One tip from experience: if you use a personal Google account, the consent screen starts in a Testing state in which Google ends the access after seven days. Publish the app once everything works, and the connection keeps running. The setup guide walks through every screen.

Ask Google only for what you need

Google’s permissions for Drive range from reading files to changing everything. Pick the narrowest level that covers your features:

  • View only uses the read-only Drive scope. It is enough for browsing folders, previews, galleries, search and downloads.
  • View and uploads adds the scope that only covers files the plugin creates. Visitors can upload into folders the plugin made, and nothing else in your Drive can be changed.
  • Full access is for uploads into any folder and for link sharing of existing files. Choose it only when you need those.

You can start with View only and raise the level later; the settings tell you when a new permission is missing and one click reconnects.

WordPress Google Drive: a Google Drive folder on a WordPress page: breadcrumbs Client Library, Project Briefs, 2026, a search box and a table of files with name, modified date, size and download links
A Drive folder on a page: breadcrumbs, sorting, search and downloads.

Keep the files private and stream them through your site

The quick way to show a Drive file on a website is Google’s own viewer in a frame. It only works when the file is shared with anyone who has the link, and that link then works everywhere, for everyone. For client documents, invoices or internal handbooks that is rarely what you want.

GravityExtra Drive Embed works the other way round. Your server fetches the file from Drive after it has checked the visitor’s access, and streams it to the browser. Google Docs, Sheets and Slides are exported as PDF on the fly, PDFs open in the browser’s PDF viewer, videos and audio play with seeking, images show at full size. The Drive files stay private. The access token never leaves your server, and visitors never see Drive ids or Google addresses: they only see your site’s addresses, which answer for files inside the chosen folder and refuse everything else.

WordPress Google Drive: a Google Doc design brief shown as a PDF preview on a WordPress page, with the file name and a download link below it
A Google Doc previewed through the site, with a download link.

Link sharing still has its place, for a file you want to send to a partner or show with Google’s viewer. Turn it on per file, after a clear warning, and turn it off again with one click.

Show folders, previews, galleries and downloads

Add the Drive Embed block to a page, choose a folder from your library and a view:

  • File browser: sub-folders first, then the files with their date and size, sortable columns, breadcrumbs and a search box that also looks into sub-folders. Navigation happens without reloading the page.
  • Preview of one file, for a handbook, a price list or a presentation right inside a page.
  • Gallery: the images of a folder as thumbnails with a lightbox. Add descriptions to the images in Drive; the plugin uses them as alternative text and captions.
  • Download link: one button with the file name and size, also for Google Docs, which download as PDF.
  • Search: just a search box for a large archive.

Accessibility matters for files as much as for text. The browser uses a real table with sortable headings that announce their state, the breadcrumbs are a navigation landmark, and the lightbox works fully with the keyboard: arrows to move, Home and End to jump, Escape to close and return to the thumbnail you came from.

WordPress Google Drive: a gallery of six architecture images from a Google Drive folder in three columns on a WordPress page
A gallery straight from a Drive folder.

Collect files with an upload box, safely

Clients sending signed documents, members sending photos, applicants sending CVs: an upload box that writes straight into a Drive folder saves a lot of e-mail. It also invites abuse if it is open to everyone without limits. Set it up with three layers:

  1. Who may upload. Logged-in users by default, or only chosen roles. Opening a box to everyone is possible, with a warning.
  2. What may be uploaded. Allowed file types, a largest size and a number of files per upload. The plugin checks that each file’s content matches its type, so a web page renamed to .pdf is refused, and it never accepts types a browser could run, such as HTML or SVG.
  3. How much may be uploaded. Attempts per hour and files per day per connection, and files per day from all visitors who are not logged in together. The daily cap holds even when many uploads arrive at the same moment. The plugin counts with a keyed hash and does not store IP addresses.

The upload box does not scan for viruses, so treat files from unknown senders with the usual care.

WordPress Google Drive: the upload box on a WordPress page: choose files, the allowed number, size and file types, an Upload button and the message 2 files uploaded
The upload box sends files into a Drive folder.

Keep pages fast with a short cache

Asking Google for a folder listing on every page view is slow and unnecessary. The plugin keeps listings and file details for a few minutes, ten by default. New files appear when the cache runs out, or at once after Clear cache. Uploads, sharing changes and edits to the library clear the affected entries by themselves. The front end loads one small stylesheet and one small script without jQuery, only on pages that use the block, and no outside fonts or scripts.

A checklist before you go live

  • The OAuth consent screen is published (not in Testing), or the app is Internal for your Workspace organisation.
  • Each library folder has the right “who can view” list. Check it in a private browser window as a visitor and as a logged-in test user.
  • Link sharing is off for everything that should stay private.
  • Upload boxes have sensible limits and allowed types.
  • The cache time fits how often your folders change.

Three setups that work well

A client area for a studio or agency. One library folder per client, visible to a role you give that client’s users, with a file browser, previews of the latest presentation and an upload box for signed documents. Staff keep working in Drive as before; clients always see the current files.

A resources page for a school or association. A public folder of forms and lesson plans with search, a members-only folder with recordings, and a gallery of event photos. Volunteers update the folders in Drive, and the website follows within minutes.

A press kit. A public gallery of approved photos with descriptions, a download link for the fact sheet and a preview of the brand guide, all from one Drive folder that the marketing team already maintains.

Frequently asked questions

Do visitors need a Google account? No. Your site shows the files; visitors only need the access you give them on your site.

Can I show Shared drives? Yes, folders in Shared drives that the connected account can open work like any other folder.

What happens if I disconnect? The plugin asks Google to revoke its access and deletes the stored tokens. Pages stop showing Drive content until you connect again.

Does it need Gravity Forms? No. GravityExtra Drive Embed is a standalone WordPress plugin.

Ready to show your Drive folders on your site? Get GravityExtra Drive Embed and follow the setup guide, including the step-by-step Google Cloud client setup.

Google Drive, Google Docs, Google Sheets and Google Slides are trademarks of Google LLC.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr