Change 1000+ of WordPress Featured Images in 5 Minutes! › Forums › Questions and Answers › Gateway Timeout Error › Reply To: Gateway Timeout Error
The trick is to split up the big process into multiple small processes, i.e. in processes with fewer posts. The less posts a process has to edit the faster it runs. That will circumvent the timeout error.
For that the filters are helpful. My favourite filter is the Time Filter. It let you set a time period, e.g. from October 2016 to December 2016, to narrow down the number of affected posts. Repeat the process with other periods until all posts are done.
That needs a bit more time than one single process, but is still way faster than editing post by post manually.