How to Fix Envato Theme Demo Import Failed or Stuck in WordPress

by Fahim

You hit “Import Demo Data” on a fresh ThemeForest theme, watch the progress spinner grind for five minutes, and get slapped with an AJAX error, a 504 Gateway Timeout, or an infinite loading screen. Worse, when you check the homepage, the styling is broken, widgets are missing, and your navigation menu has four duplicated copies of everything.

I’ve debugged this exact mess across dozens of client builds. Demo importers usually crash because the server chokes on massive XML files and bulk image downloads. Here is how to fix the underlying server limits, wipe partial database clutter, and run a manual import if the theme’s built-in wizard refuses to cooperate.

Close-up of a terminal screen running a WordPress demo data import process
Close-up of a terminal screen running a WordPress demo data import process

Why Envato Theme Demo Imports Get Stuck

Theme authors on Envato routinely pack dozens of pages, hundreds of stock photos, Customizer presets, Revolution Sliders, and full WooCommerce catalogs into a single demo package. When you trigger the installer, a PHP worker script tries to pull all those remote assets over HTTP, insert hundreds of database rows, and crop up to ten thumbnail variations for every single image.

That workload almost always fails due to one of four bottlenecks:

  • PHP Execution Timeout: The importer exceeds your server’s max_execution_time (often defaulted to just 30 seconds) while fetching heavy remote media.
  • PHP Memory Limit Exhaustion: Parsing a 30MB+ XML file runs the PHP process straight into your hosting plan’s memory ceiling.
  • Low Max Input Vars: Complex customizer trees and mega-menus get cut off because the default max_input_vars threshold is set to 1000.
  • Firewall or cURL Timeouts: Cloudflare, ModSecurity, or strict host firewalls block outbound cURL requests trying to pull images from the author’s staging server.

If you’re having trouble getting the theme files active in the first place, check our walkthrough on how to install an Envato WordPress theme and import demo content before tweaking server settings.

Step 1: Bump Your PHP Limits

Most demo imports freeze because the server kills the PHP process mid-stream. Giving PHP more execution time and memory is usually enough to let the importer finish.

Connect to your server via SSH, FTP, or your host’s file manager, navigate to your WordPress root directory, and apply one of the configuration adjustments below.

Option A: Edit .htaccess (Apache / LiteSpeed)

Open your root .htaccess file and place these directives right before the # BEGIN WordPress block.

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 512M
php_value max_execution_time 300
php_value max_input_time 300
php_value max_input_vars 5000

This gives PHP five full minutes (300 seconds) to process incoming assets and grants 512MB of RAM to handle bulk XML parsing.

Option B: Edit php.ini or .user.ini

If your site runs on Nginx or your host ignores PHP flags in .htaccess, add these values to your php.ini or .user.ini file in the document root.

upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 512M
max_execution_time = 300
max_input_time = 300
max_input_vars = 5000

You can reference the full directive list in the PHP core runtime configuration documentation.

Option C: Define Limits in wp-config.php

WordPress enforces its own internal memory cap regardless of server-level settings. Open wp-config.php and paste this right above the /* That's all, stop editing! Happy publishing. */ line:

define('WP_MEMORY_LIMIT', '512M');
define('WP_MAX_MEMORY_LIMIT', '512M');
set_time_limit(300);

You can read more about runtime constants in the WordPress wp-config.php documentation. If you’re modifying an active staging site, see our guide on how to set up a WordPress staging site to safely test configuration changes first.

Step 2: Clear Failed and Partial Database Records

When an

import crashes halfway through, your database is left in an inconsistent state. Re-running the importer right away creates duplicate menus ("Primary Menu 1", "Primary Menu 2"), orphaned terms, and duplicate pages.

If this is a fresh build with no real content yet, wipe the database back to a clean slate before trying again.

If you have terminal access, run this WP-CLI command from your site root to empty the database and reinstall a fresh WordPress instance in seconds:

wp site empty --yes
wp core install --url="https://example.com" --title="My Site" --admin_user="admin" --admin_email="dev@example.com" --prompt=admin_password

If you prefer using the dashboard, install the WP Reset plugin, head to Tools → WP Reset, type reset into the confirmation box, and hit Reset WordPress. This wipes database junk without deleting your uploaded theme or plugin files.

Step 3: Check Debug Logs for Specific Failures

If the import still stalls after bumping resources, let WordPress log the exact error. Turn on file logging by adding these lines to your wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

Run the demo import again. As soon as it fails or hangs, tail the debug log from your terminal or open wp-content/debug.log in a text editor:

tail -n 50 wp-content/debug.log

Look out for these common culprits:

  • cURL error 28: Operation timed out after 30000 milliseconds — The author’s demo asset server is slow, down, or blocking requests from your host’s IP.
  • Allowed memory size of 268435456 bytes exhausted — Your hosting provider is enforcing a hard memory limit at the PHP pool level, ignoring your config files.
  • Cannot redeclare function... — A bundled demo plugin is conflicting with another active plugin.

If your theme relies on Elementor and the page builder hangs immediately after the import, check our fix for Elementor stuck on loading screen in WordPress.

Step 4: Manually Import Demo Files (The Fail-Proof Route)

When a theme’s one-click installer is buggy or poorly coded, skip it entirely and import the raw demo assets manually. Most ThemeForest packages include these raw files inside folders named demo-data, inc/importer/data, or as a standalone download inside your Envato account.

Extract your theme package and look for these four core files:

  • content.xml or demo-content.xml (Pages, posts, menus, and custom post types)
  • widgets.wie or widgets.json (Sidebar and footer widget layouts)
  • customizer.dat (Theme settings, colors, and typography)
  • revslider.zip (Slider Revolution templates)

1. Import Content via Native WordPress Importer

Head to Tools → Import in your WordPress dashboard. Under WordPress, click Install Now, then Run Importer.

Upload the content.xml file. On the author assignment screen, map the content to your admin user. If your server struggles with image timeouts, uncheck “Download and import file attachments”. This imports all layouts, typography, and page structures instantly without downloading gigabytes of stock photos.

2. Import Widgets with Widget Importer & Exporter

Install the Widget Importer & Exporter plugin (or check the One Click Demo

Import plugin repository if your theme relies on that framework). Go to Tools → Widget Importer & Exporter, select your .wie or .json file, and click Import Widgets.

3. Import Customizer Settings

Install the Customizer Export/Import plugin. Navigate to Appearance → Customize → Export/Import, choose your theme’s customizer.dat file, check “Download and import image files”, and run the import.

4. Import Revolution Slider Templates

If the demo includes Slider Revolution, open the Slider Revolution menu in your dashboard, click Manual Import, and select the .zip slider files found in your theme’s download folder.

Step 5: Regenerate Missing Thumbnails

If you skipped media downloads during a manual import, or if the installer aborted during image processing, your grid layouts and featured images might appear distorted or blank.

If you have WP-CLI available, run this command to batch-process all registered image sizes across your media library:

wp media regenerate --yes

From the admin dashboard, install Regenerate Thumbnails by Alex Mills, open Tools → Regenerate Thumbnails, and click Regenerate Thumbnails For All Attachments.

If you ran into theme upload issues prior to importing, take a look at our guide on resolving the Envato theme missing stylesheet error.

Frequently Asked Questions

Why does my demo import stop at 99%?

A hang at 99% almost always happens during thumbnail regeneration. The database entries and pages are already created, but the PHP script times out while resizing dozens of images. Check your Pages list — if your pages are there, the import actually finished and you only need to run a thumbnail regeneration pass.

Will re-importing a demo delete my current blog posts?

Standard WordPress demo installers don’t delete existing content. Instead, they append new data, leading to duplicated posts, pages, and menus. Always wipe the database back to a clean state before running another import attempt.

What is the minimum max_input_vars required for ThemeForest themes?

Set max_input_vars = 3000 at a minimum. Multi-purpose themes with heavy mega-menu builders or extensive theme options panels often require max_input_vars = 5000 to avoid truncating settings.

Can I import demo content on localhost without an internet connection?

You can import the layout files, page content, and menu structures offline, but remote media downloads will fail because the importer can’t reach the author’s image server.

Next Steps

Once your demo content is in place, review your menus under Appearance → Menus and set your homepage under Settings → Reading. If template files are missing or styling looks broken across subpages, double-check your child theme setup and confirm all required bundled plugins are active.

all_in_one_marketing_tool