Relative Content

Tag Archive for phpwordpresscronbackground-processreactphp

How to run a long script in WordPress PHP Plugin without being stopped by the php max execution time

I’ve created a WordPress Plugin which retrieve rss feeds entered by user and check hourly for new articles. If find new articles, its retrieve article content and title and use AI to generate a new version and publish it in wordpress. The main process is setted up to cooperate with many differents api including text translation if necessary, new content generation, meta tags, keywords and description generation, main image research, download and setting up etc. Every thing is normally working well. But my current problem is about turning main task into a background process.
Because the entire process is too long (considering timeout for some api that may require a long duration to return answer, and also the number of rss feeds urls provided). I noticed that my WordPress website took several minutes before displaying a page even.