How to generate a lot of template pages in Wordpress?

Good day!
There is an aggregator on WordPress. To create the page template (change the variables in the content, tags, titles) use WP All Import. First I had to do 50 pages of the template - easy. Then 2500 different pattern - just takes longer to create and a little more lag from the admin panel of number of pages, but tolerable. Now we need to create another 30,000 pages on a different template. Obviously, with such number of records, the import will occur all afternoon and then admin will mercilessly lag.
Is there any other way to make this thing speed up? I think some option to have when you access the URLS given to the need variables - it should help (in database will store only the template variables). But how to do it? In what direction to dig at least?
March 19th 20 at 08:29
1 answer
March 19th 20 at 08:31
Write a script in any language and use the WP REST API

(in database will store only the template variables)

templates are not stored in the database and in the directory of the theme

Find more questions by tags WordPress