Why we stream the archive instead of building it in memory

Written by

in

Most migration plugins read a whole directory into an array and then write it out. That is fine until it is not.

The chunk

Writing one file at a time, and remembering where the last request stopped, keeps the memory use flat. The work is handed to WP-Cron between requests, so a slow site never times out.