Title: Repeat event causing infinite loop
Last modified: September 10, 2024

---

# Repeat event causing infinite loop

 *  Resolved [emeeder](https://wordpress.org/support/users/emeeder/)
 * (@emeeder)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/repeat-event-causing-infinite-loop/)
 * i had an event with 3 re-occurring events on our calendar (so 3 events total).
   I had to adjust the event by 1 day. (so initial event started the next day and
   the the other 2 events the following 2 days).
 * This caused a situation where it the plugin started creating duplicate events..
   thousands of them. I got my shred hosting support to stop the script from running
   before my sever ran out of resources. After about 15 minutes i had over 5000 
   duplicate events.
 * I deleted all the events thinking that perhaps it had something to do with the
   fact that i had edited an event. so deleted all that event and started fresh.
   1st i made the initial event and saved it. All good. Then i went to add re-occurring
   events and the same error occurred. Making many many duplicates.
 * In teh end i just made 3 separate events for this particular event.
 * Now i am unsure about using the reoccurring events feature, Has there been a 
   codding change that has caused this problem?
 * Thanks. The plugin has been great for us so far.
 * PS. i am using the current/latest version: 4.0.4.4
    -  This topic was modified 1 year, 8 months ago by [emeeder](https://wordpress.org/support/users/emeeder/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frepeat-event-causing-infinite-loop%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [gsethkramer](https://wordpress.org/support/users/gsethkramer/)
 * (@gsethkramer)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/repeat-event-causing-infinite-loop/#post-18006734)
 * I am having the same problem, and had to uninstall the plugin because of it. 
   Now I have a problem deleting nearly 2000 events it created before timing out!
   Can someone please tell us how to do this without deleting them page by page 
   in the WordPress admin, which will take a very long time.
 *  Thread Starter [emeeder](https://wordpress.org/support/users/emeeder/)
 * (@emeeder)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/repeat-event-causing-infinite-loop/#post-18006763)
 * i had that too.
 * I followed these instructions. I edited so that i could see 200 ‘post’ per page.
   If you make this number too large it will take very long to load. Go for 200.
   then you can delete them really quick 200 at a time.
 * [How to display more than 20 posts in WordPress’ dashboard | Solutions by shayatik.com](https://www.shayatik.com/2013/11/how-to-display-more-than-20-posts-in-wordpress-dashboard/)
 * How to display more than 20 posts in WordPress’ dashboard:
    1. Connect to your website’s FTP or just filemanager in CPanel (or something similar),
       and look for the following file: /wp-admin/includes/post.php
    2. Open the file and edit it
    3. Go to line 1260 (In my wordpress), or look for the following:
 * `1``if ( empty( $posts_per_page ) || $posts_per_page < 1 )``2``3``$posts_per_page
   = 20;`
 * 4. Change the number 20 to whatever you want.
    -  This reply was modified 1 year, 8 months ago by [emeeder](https://wordpress.org/support/users/emeeder/).
 *  [eventprimesupport](https://wordpress.org/support/users/eventprimesupport/)
 * (@eventprimesupport)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/repeat-event-causing-infinite-loop/#post-18008014)
 * [@emeeder](https://wordpress.org/support/users/emeeder/) [@gsethkramer](https://wordpress.org/support/users/gsethkramer/)
 * Thanks for reaching out to us.
 * We want to inform you that the issue has been resolved, and we are now live with
   the latest update to EventPrime (version 4.0.4.5). Please update to this version
   and confirm if the issue has been resolved at your end.
 * To remove duplicate event, please navigate to the parent event in your WordPress
   dashboard. In the Repeat section, simply edit the repeat settings and then update
   the event. This action should automatically delete all child events.
 * If you have any further questions, please don’t hesitate to reach out to us.
 *  [gsethkramer](https://wordpress.org/support/users/gsethkramer/)
 * (@gsethkramer)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/repeat-event-causing-infinite-loop/#post-18008430)
 * Hello, and thank you for the update – but unfortunately, your suggested method
   does not work for removing all the extra events. I found the parent event and
   removed the Repeat, then updated. I tried it both “Only for this occurrence” 
   and “For all occurences”, but neither works. Is there another way? I’d be willing
   to do it directly in the WordPress database if you could show us how to construct
   the SQL to do it safely
 *  [eventprimesupport](https://wordpress.org/support/users/eventprimesupport/)
 * (@eventprimesupport)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/repeat-event-causing-infinite-loop/#post-18009577)
 * [@gsethkramer](https://wordpress.org/support/users/gsethkramer/)
 * Please use the following code and add it to the functions.php file of the currently
   active theme. Please replace the $post_id value (123) with the parent event’s
   post ID.
 *     ```
       function delete_child_events()
           {
               $post_id = 123;
               $dbhandler = new EP_DBhandler;
               $dbhandler->ep_delete_child_events($post_id);
           }
           add_action('init','delete_child_events');
       ```
   

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Repeat event causing infinite loop’ is closed to new replies.

 * ![](https://ps.w.org/eventprime-event-calendar-management/assets/icon-256x256.
   gif?rev=2961582)
 * [EventPrime – Events Calendar, Bookings and Tickets](https://wordpress.org/plugins/eventprime-event-calendar-management/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/eventprime-event-calendar-management/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/eventprime-event-calendar-management/)
 * [Active Topics](https://wordpress.org/support/plugin/eventprime-event-calendar-management/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eventprime-event-calendar-management/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eventprime-event-calendar-management/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [eventprimesupport](https://wordpress.org/support/users/eventprimesupport/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/repeat-event-causing-infinite-loop/#post-18009577)
 * Status: resolved