You can try using wp cron functions, programing a feed import every 10 minutes or so, until you have nothing left in queue.
Example code:
<?php
register_activation_hook( __FILE__, 'wp1903_schedule_cron' );
function wp1903_schedule_cron() {
$counter = 0;
$feeds = array(
'http://example.com/feed1',
'http://example.com/feed2',
'http://example.com/feed3',
'http://example.com/feed4'
);
foreach ($feeds as $feed) {
$counter++;
// schedule every 10 mins
$time = time() + (600 * $counter);
wp_schedule_single_event( $time, 'wp1903_process_feed', $feed );
}
}
add_action('wp1903_process_feed', 'wp1903_import_feed');
function wp1903_import_feed($feed_url="") {
// do the import
}
It is essential only to run the scheduler on a activation hook, or else at every page load the crons will be rescheduled.
Related Posts:
- Function to return true if current page has child pages
- Cleaning up WordPress to improve performance?
- List of all theme customizer control types?
- How to preserve PHP modifications while upgrading WordPress?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- Change comments form title on a page by page basis
- Setting up the child theme so as to enable right-to-left WordPress?
- delete an array element when its date expires
- How to add default images into theme customizer image control?
- Overriding a theme redux file in child theme
- PHP can I add line numbers to file_get_contents()
- Setting custom canonical urls
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Converting HTML Template to WordPress Theme
- How to check if a meta value has already been assigned to any user?
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- How to pick the default selected value in wordpress dropdown?
- Modify custom field input data before creating a new post
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- Need help enqueueing webfonts
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Create page template via functions.php?
- How to create a field in customize and show that in header.php?
- List post by title length
- How do i wrap woocomerce attribute in list?
- get_theme_mod outputs number when using WP_Customize_Cropped_Image_Control
- Is there a hack for using is_page() within the function.php file?
- Customize field names in backend profile edit page through function.php [duplicate]
- WP insert post Redirect after function has executed
- WP-Bakery – Add custom colors to buttons with template colors
- Trying to update Woocommerce meta values
- update_user_meta as multiple value but with same meta key
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Delete post meta by serialized meta value
- Remove node from multisites?
- Automatically refresh page if widget is added to page?
- Where can I find the declaration of `$_wp_theme_features`?
- How do I routinely extract the thumbnail of the most recent post?
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Check if values exists DB
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How to add button to top of theme customizer?
- How can I clear the theme mod settings?
- Display a list of users with avatar filterable with alphabets
- Select area and checkbox data is not saving?
- WP Custom tables query
- Add multiple HTML attributes to an Elementor button
- Woocomerce custom add to cart button edit functionality [closed]
- How to change product title color in shop page if product has specific product tag (Woocommerce)?
- Restricting page by user role
- Modify previous and next text from pagination links
- Show the most popular post per week
- Add a class to links in the visual editor (how to get old dialog back)
- Creating custom Woocommerce attribute taxonomies from a plugin
- wp_set_object_terms and arrays
- Shortcode putting html such as
- Load post content into iframe
- wp_customize_image_control default value
- How to get the original price of the product in woocommerce?
- Calling a method from functions.php on a click of a button
- How to redirect users to custom lostpassword page?
- How to use WordPress (PHP) functions in AngularJS partials files?
- How to change featured content to a different tag in WordPress Twenty Fourteen?
- Can I write ‘RewriteCond’ using ‘functions.php’?
- How do I create comment-reply-button using element not
- How to add 2 posts under another post? Formatting should be intact
- WordPress menu deletes when trying to add a hook
- Validate a users email address when using gmail to register
- Get widget settings function?
- Widgets not showing in my custom theme
- How to display custom field on homepage
- enqueue multiple Google fonts with multiple weights and styles (italic)
- Nested shortCode functions in the functions.php file
- How to speed up admin-ajax.php in wordpress
- My Own layout in WooCommerce pages [closed]
- Woocommerce – remove product from category
- Add a Second Menu to a theme that only support 1 menu
- Custom excerpt function re-factoring
- How do I publish only one page to production after making changes on staging?
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Using Multiple Submit buttons to trigger customised php functions
- How to get specific image in media library with php
- Change the site tagline (or similar) based on current page
- get current product name in functions.php
- Only Show Link If div Exists
- How to style options page in dashboard?
- Change the WP Video Shortcode Output
- Using WP-API and SSE not authenticating user ID
- Validate functions before inserting then into functions.php
- How to retrieve current wordpress profile page URL?
- Why ajax doesn’t work on certain wordpress hooks?
- Print last modified date only on posts
- Customize position of social icons in upme plugin [closed]
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- How to Reference/Echo Variable from Another PHP Function
- Replace shortcode in substring
- Detecting classes, adding widgets, and adding divs in with a Nav Walker