You hit “Import Demo Data” on that new ThemeForest theme, wait ten minutes watching a spinner, and then get hit with an HTTP 500 or a progress bar permanently frozen at 90%. Now your site’s stuck with broken styling, missing images, and three copies of the main menu.
Don’t just keep clicking import hoping it works. We need to check the logs, fix the PHP and MySQL bottlenecks killing the process, purge the half-imported junk, and get the demo running cleanly.

Check Your PHP Logs and Site Health First
Never guess what killed the import. Whether your theme uses One Click Demo Import, Merlin WP, or a custom AJAX wizard, PHP always leaves a paper trail when a process crashes.
Drop these lines into your wp-config.php file right above the /* That's all, stop editing! */ line:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );Run the import again until it hangs, then open /wp-content/debug.log. Nine times out of ten, you’ll spot one of these culprits:
Fatal error: Maximum execution time of 30 seconds exceededFatal error: Allowed memory size of 67108864 bytes exhaustedcURL error 28: Operation timed out after 30000 milliseconds
Next, hop over to Tools → Site Health → Info → Server in your dashboard. Look at your actual PHP memory limit and PHP time limit. Default shared hosting configurations cap you at 30 seconds and 128MB. When a multipurpose theme tries to download 400MB of demo sliders, pages, and sample media in one go, those defaults choke almost instantly.
If you hit roadblocks before even getting the theme activated, make sure the zip file is structured correctly by following our guide to fix missing style.css errors in ThemeForest themes.
Raise PHP Limits in php.ini, .user.ini, or .htaccess
Demo content files are massive. They pack raw XML, WooCommerce variations, and serialized page builder layouts. If PHP doesn’t have the runway to parse them, the whole script terminates mid-stream.
Depending on your stack (Apache, Nginx, or LiteSpeed), you’ll need to increase these values in your php.ini, .user.ini, or root .htaccess file.
If you manage your own VPS or your host allows custom runtime files in the site root, set these values in line with the PHP resource configuration guidelines:
upload_max_filesize = 128M
post_max_size = 128M
memory_limit = 512M
max_execution_time = 600
max_input_time = 600
max_input_vars = 5000If you’re on Apache and your host ignores .user.ini, drop these directives into your root .htaccess file right before the standard # 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 600 php_value max_input_time 600 php_value max_input_vars 5000
Why care about max_input_vars = 5000? Complex themes submit giant nested arrays via POST when registering demo menus, sidebars, and theme options. If PHP cuts off inputs at the default 1000 limit, half your settings silently fail to save without throwing an obvious fatal error.
If you’re using an Elementor-based theme that still gets stuck after updating these values, take a look at our troubleshooting steps to fix Elementor stuck loading screens.
Bump WordPress Execution and Memory Directives in wp-config.php
Even when your server’s PHP memory is set to 512MB, WordPress limits itself internally unless told otherwise. Out of the box, core sets a 40MB limit for frontend requests and 256MB for the admin area.
Open wp-config.php and add these rules above your database credentials, following the WordPress wp-config documentation:
define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
set_time_limit( 600 );Calling set_time_limit( 600 ) directly resets the PHP execution timer back to 10 minutes when WordPress initializes. Because modern demo importers process data in sequential batches, this gives each batch enough breathing room to finish downloading images without cutting off.
If you run into “The link you followed has expired” while uploading large theme plugins or bundle zips, see our writeup on the link you followed has expired error.
Fix MySQL max_allowed_packet for Large Serialized Demos
Here’s a sneaky bug that trips people up: the database connection dropping out mid-import. Modern themes store massive serialized JSON blobs for Elementor layouts or Slider Revolution bundles directly in wp_options or wp_postmeta.
If an importer tries to push a single 20MB or 30MB SQL INSERT query and your database server’s packet limit is set to the default 16MB, MySQL shuts down the socket.
When that happens, your PHP log spits out this gem:
WordPress database error MySQL server has gone away for query INSERT INTO `wp_options`...If you have root access to your database server, open your MySQL config (usually /etc/mysql/my.cnf or /etc/my.cnf) and bump the limit according to the MySQL reference manual:
[mysqld]
max_allowed_packet = 128M
wait_timeout = 300Restart the MySQL service to load the new config:
sudo systemctl restart mysqlIf you’re on locked-down shared hosting without root access, you can’t edit this yourself. Open a ticket with support and ask them to raise max_allowed_packet to 64M. If they won’t, your best bet is switching to the WP-CLI import method covered below.
Prevent CDN and Cloudflare 524 Gateway Timeouts
If your site routes through Cloudflare, you’ll hit an HTTP 524 timeout whenever a single AJAX batch request runs longer than 100 seconds. Cloudflare cuts the browser connection, even if your server is still crunching posts in the background.
That’s why you see the progress bar hang at 60%: the browser console throws a 524 error on admin-ajax.php and stops listening. Meanwhile, your server finishes importing half of the content, leaving everything broken and out of sync.
To work around this while importing:
- Log in to your Cloudflare dashboard.
- Flip your domain’s DNS record from Proxied (Orange Cloud) to DNS Only (Grey Cloud).
- Give it two minutes for DNS to resolve directly to your origin server.
- Run the demo import straight to the server.
- Turn the proxy back on once everything imports cleanly.
If turning off the proxy isn’t an option, add a Cache Rule or Configuration Rule inside Cloudflare to bypass cache and bump the proxy timeout specifically for /wp-admin/admin-ajax.php.
Clean Database Bloat Before Re-attempting the Import
Whatever you do, don’t run the importer on top of a failed run. If your first attempt died halfway through, running it again will create duplicate menus, double up sidebar widgets, and append random numbers to page slugs (like home-2 and about-us-2).
Wipe the half-baked database tables first. If you don’t have real content on the site yet, use a plugin like WP Reset or clear it from the terminal.
If you have SSH access, wiping and reinstalling a clean database takes literally five seconds with the WP-CLI toolset:
wp db reset --yes
wp core install --url="https://example.com" --title="Staging Site" --admin_user="devadmin" --admin_password="SuperSecretPass123!" --admin_email="dev@example.com"Re-enable your theme and the necessary plugins straight from the command line:
wp theme activate your-envato-theme
wp plugin activate --allNow your database is completely clean, with zero duplicate terms or orphaned attachment rows cluttering things up.
Run the Import via WP-CLI When Web Imports Keep Crashing
Browser-based importers are fragile. Web browsers, HTTP proxies, web servers (Nginx/Apache), and PHP workers all have their own timeout limits. If any single layer gets impatient, the whole thing crashes.
Running the import through WP-CLI avoids the HTTP stack entirely. The CLI runs in pure PHP CLI mode, bypassing web server timeouts and running until the job is done.
Most ThemeForest themes stash their demo files right inside the theme directory—usually under inc/demo-data/, assets/demo/, or bundled inside an importer plugin. You’re looking for content.xml, widgets.wie (or widgets.json), and customizer.dat.
Here’s how I run this when the web interface won’t stop timing out:
# 1. Install the official WordPress importer command
wp plugin install wordpress-importer --activate # 2. Run the XML content import directly
wp import wp-content/themes/my-theme/demo-data/content.xml --authors=create # 3. Import widget configuration if a JSON/WIE file is present
wp plugin install widget-importer-exporter --activate
wp widget import wp-content/themes/my-theme/demo-data/widgets.wieFor a detailed breakdown of automating this entire workflow, check out our guide on how to install Envato theme demo content with WP-CLI.
What if the theme pulls images dynamically from an external S3 bucket? You can pass an extra flag to fetch remote attachments without failing on local SSL certificate issues:
wp import wp-content/themes/my-theme/demo-data/content.xml --authors=create --skip=image_resizeAdding --skip=image_resize speeds up imports by roughly 80%. It downloads the raw images and maps them to your posts, but skips generating twenty thumbnail crops per image on the fly. You can regenerate thumbnails later in the background whenever you’re ready:
wp media regenerate --yesDisable Third-Party Security Plugins Temporarily
Security plugins like Wordfence or Solid Security love to block demo imports. The importer fires off hundreds of rapid database queries, dumps dozens of media files into wp-content/uploads, and pounds the REST API or admin-ajax.php endpoints.
Wordfence’s Web Application Firewall (WAF) routinely mistakes this for a brute-force attack or local file inclusion and terminates the connection mid-import.
To see if a security plugin is killing your import:
- Head to Plugins → Installed Plugins.
- Temporarily deactivate your security plugins.
- If you’re using Wordfence, switch the Web Application Firewall to Learning Mode instead of disabling the whole plugin.
- Run the demo import again.
- Flip your firewall back to Enabled once the import finishes.
Frequently Asked Questions
Why does my demo import succeed, but all the images are gray placeholders?
Theme authors usually aren’t licensed to redistribute the copyrighted stock photos shown in their live previews. To keep things legal, they swap those images for blank gray SVGs or PNG placeholders in the demo XML. It’s completely normal and not a bug. Check your theme documentation to see if they link to free asset packs you can download separately.
Why did the demo import fail with a cURL error 28?
A cURL error 28 means your server tried to download demo assets from a remote server (like the theme author’s CDN or storage bucket), but the connection timed out before the file finished transferring. Either your host’s firewall is blocking outgoing traffic on ports 80/443, or the author’s demo server is temporarily overwhelmed. Ask your host to verify that outbound cURL requests aren’t being restricted.
Can I import only the theme settings without the dummy posts and pages?
Yes. Importers like One Click Demo Import and Merlin WP usually have checkboxes for Content, Widgets, Customizer, and Sliders. Uncheck “Content” and “Media” to import just the fonts, colors, headers, and footer layouts without filling your database with hundreds of dummy blog posts.
How do I fix memory limit errors if my host locks php.ini?
If your hosting provider locks down php.ini and ignores your .htaccess edits, open a support ticket. Tell them: “Please increase memory_limit to 512M and max_execution_time to 600 seconds on this account so I can complete a theme setup.” If they say no, you’re on an overpacked shared host and will need to import via WP-CLI or move the site to a better host.
What to Do Next
Now that your demo content is imported properly, take a look at what the theme actually loaded onto your site. Most multipurpose themes enqueue an absurd number of scripts, icon fonts, and stylesheets on pages that don’t even use them.
Check out our walkthrough on how to dequeue unused CSS and JavaScript in Envato WordPress themes to strip out the excess weight and get your load times back under control.

