File I/O Issues during Build
Symptoms
- The ARCHIVE build phase runs very slowly
- It fails with "Cannot open file" / "Disk read error"
- The build stops midway (50-80%) and makes no progress
- Server load goes up sharply
Causes and fixes
1. Slow disk
The build has to read hundreds of thousands of files → IOPS matters more than bandwidth. An SSD is many times faster than an HDD. On shared hosting you have no control over this - you can move to a host with SSDs if needed.
2. Too many small files
A site with several hundred thousand small image files → metadata IOPS becomes the bottleneck. PHP ZipArchive is very slow with this pattern.
Fix:
- Switch to the DupArchive engine (default)
- Exclude cache folders with many files:
wp-content/cache/wp-content/uploads/cache/wp-content/litespeed/- The cache folder of whichever caching plugin you use
3. Not enough disk for the tmp folder
The build extracts temporarily into wp-content/backups-slm/tmp/. You need free disk >= 2× the site size.
Check the free disk space before building.
4. Too many concurrent processes
Web server workers + database queries + the build process → compete for IOPS.
Fix: build during off-peak hours. Temporarily turn off other heavy cron jobs while building.
5. Files locked by another process
Antivirus, a search indexer or another plugin is locking files → the build skips them and logs a warning.
PHP tuning
On a server where you can change PHP settings:
realpath_cache_size = 256K
realpath_cache_ttl = 600
opcache.enable = 1
opcache.memory_consumption = 256