Skip to content
GravityKit
Buy
Sign in
0 items
  • Plugins

    GravityKit All Access

    Our complete Kit of essential tools for extending and enhancing Gravity Forms—everything you need to build powerful web apps and workflows.

    Learn more
    • GravityView

      GravityView

      Bestseller

      Display Gravity Forms entries on the front-end of your site and build powerful web applications.

    • GravityImport

      GravityImport

      Trending

      Import entries from CSV files into Gravity Forms to transfer data, create new forms, or update existing entries.

    • GravityEdit

      GravityEdit

      Quickly edit Gravity Forms entries inline to save time, reduce clicks, and streamline your workflow.

    • GravityCharts

      GravityCharts

      Trending

      Turn Gravity Forms entries into interactive charts and graphs.

    • GravityActions

      GravityActions

      Update multiple Gravity Forms entries at once, send bulk emails, and streamline your workflow.

    • GravityCalendar

      GravityCalendar

      Turn Gravity Forms entries into dynamic calendars to showcase events, schedules, appointments, and more.

    • GravityExport

      GravityExport

      Export Gravity Forms entries to Excel, CSV, PDF, or Google Sheets, then share them with secure links or deliver them to cloud storage on a schedule.

    • GravityMath

      GravityMath

      Perform advanced calculations on Gravity Forms entries to display totals, averages, or build custom calculators.

    • GravityRevisions

      GravityRevisions

      Track, compare, and restore changes made to Gravity Forms forms and entries with a full version history.

    • GravityMigrate

      GravityMigrate

      Migrate all Gravity Forms data between sites, including forms, entries, settings, Views, feeds, and file uploads, and import forms from other form plugins.

    • GravityBoard

      GravityBoard

      Manage projects with collaborative project management. Coordinate with your team and streamline your workflows.

    • GravitySearch

      GravitySearch

      Search Gravity Forms entries across every form from one screen.

  • Ideal For

    • Nonprofits
    • Web Agencies
    • Education
    • Developers
    • Small Businesses
    • Startups
    Explore All Use Cases

    Case studies

    • Be There Local
    • Killer Shorts
    • West Fork Schools
    • Princeton University
    • BrightLeaf Giving
    • Jacksonville Port Authority
    • National Severe Storms Lab
    • Leadpal
    View All Case Studies
  • Resources

    • Blog
    • Case studies
    • Newsletter
    • GravityKit vs competitors
    • Live Demos
    • Documentation
    • Developer docs
    • GravityKit Academy

    Ultimate guides

    • How to use Gravity Forms
    • Editing Gravity Forms entries
    • Importing Gravity Forms entries
    • Exporting Gravity Forms entries
    • Displaying Gravity Forms entries
    • Gravity Forms conditional logic
    • Gravity Forms calculations
    View More Articles
  • Support
  • Pricing
  • Plugins

    • GravityView

      GravityView

      Bestseller

      Display Gravity Forms entries on the front-end of your site and build powerful web applications.

    • GravityImport

      GravityImport

      Trending

      Import entries from CSV files into Gravity Forms to transfer data, create new forms, or update existing entries.

    • GravityEdit

      GravityEdit

      Quickly edit Gravity Forms entries inline to save time, reduce clicks, and streamline your workflow.

    • GravityCharts

      GravityCharts

      Trending

      Turn Gravity Forms entries into interactive charts and graphs.

    • GravityActions

      GravityActions

      Update multiple Gravity Forms entries at once, send bulk emails, and streamline your workflow.

    • GravityCalendar

      GravityCalendar

      Turn Gravity Forms entries into dynamic calendars to showcase events, schedules, appointments, and more.

    • GravityExport

      GravityExport

      Export Gravity Forms entries to Excel, CSV, PDF, or Google Sheets, then share them with secure links or deliver them to cloud storage on a schedule.

    • GravityMath

      GravityMath

      Perform advanced calculations on Gravity Forms entries to display totals, averages, or build custom calculators.

    • GravityRevisions

      GravityRevisions

      Track, compare, and restore changes made to Gravity Forms forms and entries with a full version history.

    • GravityMigrate

      GravityMigrate

      Migrate all Gravity Forms data between sites, including forms, entries, settings, Views, feeds, and file uploads, and import forms from other form plugins.

    • GravityBoard

      GravityBoard

      Manage projects with collaborative project management. Coordinate with your team and streamline your workflows.

    • GravitySearch

      GravitySearch

      Search Gravity Forms entries across every form from one screen.

    View All Products

    GravityKit All Access

    Our complete Kit of essential tools for extending and enhancing Gravity Forms—everything you need to build powerful web apps and workflows.

    Learn more
  • Ideal For

    • Nonprofits
    • Web Agencies
    • Education
    • Developers
    • Small Businesses
    • Startups
    Explore All Use Cases

    Case studies

    • Be There Local
    • Killer Shorts
    • West Fork Schools
    • Princeton University
    • BrightLeaf Giving
    • Jacksonville Port Authority
    • National Severe Storms Lab
    • Leadpal
    View All Case Studies

    How to build...

    • Client Portal
    • AI-Built Directory
    • Conference Website
    • WordPress CRM
    • Admin Dashboard
    • Inventory Management
    • Vendor Portal
    • Document Library
    View All Guides
  • Resources

    • Blog
    • Case studies
    • Newsletter
    • GravityKit vs competitors
    • Live Demos
    • Documentation
    • Developer docs
    • GravityKit Academy

    ultimate guides

    • How to use Gravity Forms
    • Editing Gravity Forms entries
    • Importing Gravity Forms entries
    • Exporting Gravity Forms entries
    • Displaying Gravity Forms entries
    • Gravity Forms conditional logic
    • Gravity Forms calculations
    View More Articles
  • Support
  • Pricing
0 items

Search

Results appear automatically as you type.
Loading results…

results found matching

    Sign in
    Buy

    Docs

    • Docs Home

    Gravity Forms Add-Ons

    • GravityView
    • GravityActions
    • GravityBoard
    • GravityCalendar
    • GravityCharts
    • GravityEdit
    • GravityExport
    • GravityImport
    • GravityMath
    • GravityRevisions
    • GravitySearch
    • GF Widget for Elementor
    • GF Dynamic Lookup
    • GF Entry Tags
    • GF Event Field
    • GravityExport Lite
    • GF Zero Spam
    • GravityMigrate

    GravityView

    • Getting Started
    • View Setup
    • FAQ
    • Pre-Sale
    • Advanced
    • Common Problems
    • Customizing Your Views
    • Edit Entry
    • Entry Approval
    • Filter and Sort Results
    • Gravity Forms
    • Merge Tags
    • Roles and Capabilities
    • Search
    • Shortcodes
    • View Settings
    • WordPress Posts

    General Help

    • Account, Invoices, and Billing
    • License Related
    • Plugins and Settings
    • Agency accounts
    • Contact
    • Docs Home
    • Gravity Forms Add-Ons

      • GravityView
      • GravityActions
      • GravityBoard
      • GravityCalendar
      • GravityCharts
      • GravityEdit
      • GravityExport
      • GravityImport
      • GravityMath
      • GravityRevisions
      • GravitySearch
      • GF Widget for Elementor
      • GF Dynamic Lookup
      • GF Entry Tags
      • GF Event Field
      • GravityExport Lite
      • GF Zero Spam
      • GravityMigrate
    • GravityView

      • Getting Started
      • View Setup
      • FAQ
      • Pre-Sale
      • Advanced
      • Common Problems
      • Customizing Your Views
      • Edit Entry
      • Entry Approval
      • Filter and Sort Results
      • Gravity Forms
      • Merge Tags
      • Roles and Capabilities
      • Search
      • Shortcodes
      • View Settings
      • WordPress Posts
    • General Help

      • Account, Invoices, and Billing
      • License Related
      • Plugins and Settings
      • Agency accounts
    • Contact

    GravityExport

    • Checkbox values are missing from exports after a choice is deleted
    • Connecting Box to GravityExport
    • Error: “Allowed memory size exhausted” when exporting entries
    • Export Gravity Forms entries to Google Sheets
    • Adding a download button for entries in GravityView using GravityExport
    • Attaching all entries to an email in GravityExport
    • Attaching an entry export to a notification using GravityExport Lite
    • Changing labels in GravityExport
    • Changing the File Format of a Report by Adding the File Extension to the URL
    • Changing values in GravityExport
    • Connecting Dropbox to GravityExport
    • Connecting FTP to GravityExport
    • Customize Download URLs in GravityExport
    • Filtering entries included in a GravityExport download
    • Filtering exports by date in GravityExport
    • Formatting an address in GravityExport
    • Getting started with GravityExport
    • GravityExport and caching plugins
    • GravityExport Developer Hooks
    • GravityExport FAQ
    • GravityExport field: BaseField
    • GravityExport field: DateField
    • GravityExport field: FileUploadField
    • GravityExport field: ListField
    • GravityExport field: MetaField
    • GravityExport field: NotesField
    • GravityExport field: NumberField
    • GravityExport field: ProductField
    • GravityExport field: RepeaterField
    • GravityExport field: SectionField
    • GravityExport field: SeparableField
    • GravityExport Filters
    • GravityExport: Exporting only one entry
    • GravityExport: How to output dropdown field labels Instead of values
    • GravityExport: Splitting complex fields in Multiple Columns
    • GravityExport: The “Enable multi-row splitting” setting
    • How Is GravityExport Lite Different From GravityExport?
    • How to configure GravityExport to save File Upload fields
    • How to export all forms in bulk to an Excel spreadsheet
    • How to Export Checkbox Fields as Separate Columns in GravityExport
    • How to re-run a GravityExport Save feed
    • How to schedule automated exports
    • How to trigger a GravityExport Save Feed
    • How to use FastCron to trigger exports on a custom schedule
    • PDF export settings and style controls
    • Restricting file access in GravityExport & GravityExport Lite
    • Styling PDF file exports using CSS
    • Home
    • Docs
    • GravityExport
    • Error: “Allowed memory size exhausted” when exporting entries

    Error: “Allowed memory size exhausted” when exporting entries

    Estimated reading: 5 minutes

    Updated on October 28, 2026

    A GravityExport download link builds the whole file while the request is open. It reads every matching entry and builds every row and column in PHP’s memory before it sends the file. The memory and the time this takes grow with the number of entries times the number of columns, so a large form can use up PHP’s memory limit before the file is ready.

    What the error looks like #

    The download link opens a page headed GravityExport Lite: Something is broken. WordPress’s own message, “There has been a critical error on this website.”, may appear above it. Signed in as a user who can export entries, you also see the error message, such as “Allowed memory size of 268435456 bytes exhausted (tried to allocate 2097152 bytes)”. The first number is the memory limit in bytes: 268435456 bytes is 256 MB.

    The GravityExport Lite error page showing "Allowed memory size of 268435456 bytes exhausted (tried to allocate 2097152 bytes)"

    Anyone else who opens the link sees “The export could not be created. The reason was written to the server’s error log.” The stack trace below the message on the signed-in page lists only the handler that reported the error, so it doesn’t help find the cause.

    A large export can also end in a timeout. GravityExport lifts PHP’s own time limit for a download, but your web server, your host or a service in front of the site, such as Cloudflare, stops waiting after a set time. The browser then shows a timeout or gateway error, or a page that keeps loading. Each fix below helps with both errors: it makes the file smaller or moves the work off the download link.

    How much memory an export needs #

    As a guide, an Excel file needs roughly 1.5 KB of memory for each cell, which is one entry in one column. On a test server, a form with 20,000 entries reached these peaks:

    ExportPeak memoryTime
    All 20,000 entries, 32 columns, Excel841 MB57 seconds
    All 20,000 entries, 32 columns, CSV582 MB55 seconds
    One year (9,946 entries), 32 columns, Excel425 MB29 seconds
    All 20,000 entries, 12 columns, Excel375 MB25 seconds

    With a 256 MB limit, the 12-column export of all entries failed, and the same columns for one year downloaded at 192 MB.

    Export a smaller date range #

    The date range is applied when GravityExport reads the entries, so a range with half the entries needs about half the memory. To download a range yourself:

    1. In your WordPress dashboard, go to Forms, hover over the form, and click Settings.
    2. Open the GravityExport tab.
    3. In the Instant Download section, enter the Start and End dates as YYYY-MM-DD, and click Download.
    The GravityExport tab of a form's settings with the Start and End dates of the Instant Download section outlined

    For a download link you share, add the range to the link, for example ?start_date=2026-01-01&end_date=2026-03-31. See Filtering entries included in a GravityExport download for date ranges and field filters in the link. A form that is too large for one file can be exported in several, one range at a time.

    Export fewer columns #

    By default the download includes every form field and a set of entry properties, such as User Agent, Source Url and the payment columns, even when they are empty. On the same GravityExport tab, in Field settings, keep only the columns you need under Enabled Fields: click the × next to a field to move it to Disabled Fields, then click Save Settings.

    The Field settings section with 12 fields under Enabled Fields, outlined, and the unused entry properties under Disabled Fields

    In the test above, going from 32 columns to 12 cut the peak from 841 MB to 375 MB and the time from 57 to 25 seconds.

    Download a CSV file instead of Excel #

    A CSV file needs a quarter to a third less memory than an Excel file with the same rows. Choose .csv under File Extension in the Download settings section, or add .csv to the end of the download link. CSV helps less than a date range or fewer columns, because GravityExport still builds the whole file in memory.

    Raise the PHP memory limit #

    The download link runs as a normal page of your site, so it gets the memory limit WordPress sets for the front end. To raise it, add define( 'WP_MEMORY_LIMIT', '512M' ); to wp-config.php, above the line that reads / That's all, stop editing! Happy publishing. /. WordPress raises PHP’s limit to that value when the server allows it. WP_MAX_MEMORY_LIMIT is the separate limit WordPress raises for the dashboard, and download links stay at WP_MEMORY_LIMIT.

    Some hosts cap PHP’s memory below what you set. If the error message still shows the old limit, ask your host to raise PHP’s memory_limit.

    Run large exports on a schedule #

    With GravityExport, a Save feed can create the file on a schedule and store it on your server, in Dropbox, Box or on an FTP server. When a scheduled run has more than 500 entries to export, GravityExport reads them 100 at a time in the background, and a CSV file is written as it goes. In the same test, a scheduled CSV export of all 20,000 entries stayed within a 256 MB limit. See How to schedule automated exports to set one up, and choose .csv as the File Extension on the feed’s File Settings tab.

    The File Settings tab of a GravityExport Save feed with .csv chosen under File Extension, outlined

    An Excel file is still put together in one piece at the end of the run. Before it starts, GravityExport estimates the memory the file needs. When the file wouldn’t fit in the memory left, it stops the run and says so on the feed’s Activity Log tab:

    The Activity Log tab of a Save feed: "XLSX export for feed 4 would exceed memory limit. Entries: 20000, estimated: 976MB, available: 132MB. Switch the feed's Extension to CSV, or increase memory_limit."

    Only scheduled runs are split up. Export Now on the feed list, the feed’s On-Demand Trigger URL and a webhook build the file in one request, the same way a download link does.

    Still stuck? How can we help?

    How can we help?

    "*" indicates required fields

    This field is for validation purposes and should be left unchanged.
    Replies will go to this email.
    How can we help?*
    My pre-sale question is related to...*
    My WordPress skills are....*
    My Gravity Forms skills are...*
    You will be shown articles from our documentation.
    Vous pouvez nous écrire dans votre langue maternelle si c’est plus facile pour vous—nous nous occuperons de la traduction!
    Puedes escribirnos en tu idioma nativo si te resulta más fácil; ¡nosotros nos encargamos de la traducción!
    Sie können uns in Ihrer Muttersprache schreiben, wenn das für Sie einfacher ist – wir kümmern uns um die Übersetzung!
    U kunt ons in uw moedertaal schrijven als dat gemakkelijker voor u is — wij zorgen voor de vertaling!
    Du kan skrive til oss på ditt morsmål hvis det er enklere for deg — vi tar oss av oversettelsen!
    Du kan skriva till oss på ditt modersmål om det är lättare för dig — vi tar hand om översättningen!
    Você pode nos escrever em seu idioma nativo se for mais fácil para você — nós cuidaremos da tradução!
    Puoi scriverci nella tua lingua madre se ti è più facile — penseremo noi alla traduzione!
    Please provide as much detail as you're able; this helps us provide you with faster support.
    Drop files here or
    Accepted file types: jpg, jpeg, gif, png, tiff, pdf, bmp, zip, json, csv, xls, xlsx, Max. file size: 256 MB.
      Get better at Gravity Forms every Friday

      Was this page helpful?

      Table Of Contents
      • What the error looks like
      • How much memory an export needs
      • Export a smaller date range
      • Export fewer columns
      • Download a CSV file instead of Excel
      • Raise the PHP memory limit
      • Run large exports on a schedule
      GravityKit
      • How to Build It
      • GravityKit vs competitors
      • Pricing
      • Products
      • Our Team
      • Our Values
      • Work With Us
      • Partner Directory
      • Coupons
      Support
      • Support
      • Contact
      • Documentation
      • Scope of Support
      • Brand Guidelines
      • Brand Kit
      • Privacy Policy
      • Terms of Service (“Terms”)
      I am a...
      • Nonprofit
      • Web agency
      • Small business owner
      • Web developer
      • Educational institution
      • WordPress freelancer
      • Startup founder
      • One-person agency
      Get notified of updates.

      We’re constantly improving GravityKit. Fill out your email below and we’ll notify you anytime major updates drop.

      See past editions
      • Facebook
      • Twitter
      • Mastodon
      GravityKit is a Gravity Forms Certified Developer.

      Copyright © 2026, Katz Web Services, Inc.

      GravityKit and GravityView are registered trademarks of Katz Web Services, Inc.