Back to Community

Troubleshooting NextGEN Gallery's 'Import Folder' Hangs and Timeouts

26 threads Sep 17, 2025

Content

Many users of the 'Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery' plugin encounter a common and frustrating issue: the 'Import Folder' process starts but then hangs or stops completely after importing a certain number of images, often around 40-50. This guide will explain why this happens and provide the most effective solutions to get your bulk imports working smoothly.

Why Does the Import Process Hang?

Based on community reports and solutions, this problem is almost always caused by server-side limitations, not a bug in the plugin itself. The NextGEN Gallery import process is resource-intensive. It doesn't just copy files; it also generates multiple image sizes (thumbnails, lightbox images, cached versions), which requires significant processing time and server memory. When the PHP process exceeds its allocated time or memory, it terminates, causing the import to stop abruptly.

Common Solutions and Workarounds

1. Adjust Server PHP Configuration (The Primary Fix)

The most effective solution is to increase the resource limits on your server. You or your hosting provider will need to adjust the following PHP settings in the php.ini, user.ini, or via your hosting control panel:

  • max_execution_time: Increase this from a typical default of 30 seconds to 300 seconds or higher.
  • memory_limit: Increase this to at least 256M, though 512M or 1G is better for very large imports.
  • upload_max_filesize & post_max_size: Ensure these are large enough to handle the total payload of images you are importing.
  • max_input_variables: Increase this value if you are importing a folder with a complex structure.

For users in a Docker environment (like Thread 8), remember to also adjust timeouts in your Caddyfile and allocate more CPU and memory to the container.

2. Check for PHP-FPM Timeouts

As one user discovered (Thread 15), a PHP-FPM timeout can cause a deadlock where the process appears to hang indefinitely. Check your PHP-FPM pool configuration (www.conf) for the request_terminate_timeout setting and increase it if necessary.

3. Import in Smaller Batches

If you cannot adjust server settings, a reliable workaround is to break your large folder into smaller subfolders and import them one at a time. This prevents the process from hitting time and memory limits.

4. Verify Image Handling Libraries

Some users (Thread 9) have reported corrupted or pixelated images after import, which was resolved by configuring the image processing library. You can check which library your server uses by going to Dashboard -> Tools -> Site Health -> Info and toggling the Media Handling tab. Ensure both GD and Imagick are properly installed and supported for your file formats (like PNG).

5. For Multisite Users: Enable the Feature

If the 'Import Folder' option is completely missing from your menu (Thread 7), ensure you are on a single-site installation. For WordPress Multisite networks, this feature must be enabled in the Network Admin -> NextGEN Gallery settings.

What to Do If You're Still Stuck

If you've tried these solutions and the import still fails, the next step is to check your server's error logs. These logs will contain specific messages that indicate the exact reason for the failure (e.g., a memory exhaustion error or a strict timeout). Your web hosting provider can usually help you locate and interpret these logs.

By understanding these server limitations and proactively configuring your environment, you can overcome the hurdles of bulk importing folders into NextGEN Gallery.

Related Support Threads Support