Title: Database Migration
Last modified: November 3, 2022

---

# Database Migration

 *  Resolved [webtecky](https://wordpress.org/support/users/webtecky/)
 * (@webtecky)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-migration-3/)
 * Would it be possible to have the plugin running the database migration on ‘admin_init’
   instead of ‘init’? We have a dockerized environment with multiple docker instances
   for public, but only 1 for admin. This way would avoid calling the same process
   from different containers and crashing the site.
 * Thank you for the consideration!

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

 *  Plugin Support [Ruel](https://wordpress.org/support/users/ruel214/)
 * (@ruel214)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-migration-3/#post-16163530)
 * Hi there,
 * Thanks for reaching out.
 * I am not sure if you are inquiring about the right plugin but WebinarPress does
   not have a “Database Migration” feature. Can you please clarify which functionality
   are you referring to?
 *  Plugin Support [Ruel](https://wordpress.org/support/users/ruel214/)
 * (@ruel214)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-migration-3/#post-16164736)
 * [@webtecky](https://wordpress.org/support/users/webtecky/) I have consulted our
   development team regarding your inquiry. I was told that you must be referring
   to the DB upgrade feature. They currently run in “init”. If this is what you 
   are referring to, they can change it to “admin_init”. These changes will be part
   of our next version update.
 *  Thread Starter [webtecky](https://wordpress.org/support/users/webtecky/)
 * (@webtecky)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-migration-3/#post-16165401)
 * Yes, correct, I am referring to line 56 of \wp-webinarsystem\includes\class-webinarsysteem.
   php, add_action(‘init’, [$this, ‘run_database_migrations’]);.
 * If also the ‘run_database_migrations’ callback method could run only if not AJAX,
   it would be perfect.
 *     ```
       /*
            * Run migrations
            */
           public function run_database_migrations() {
               if( ! wp_doing_ajax() ){
                   $db = new WebinarsysteemDbMigrations();
   
                   $force_db_upgrade = isset($_GET['force-db-migrate']);
   
                   if (is_user_logged_in() && current_user_can('administrator') && $force_db_upgrade) {
                       $db->force_migrations_with_debug();
                   }
   
                   $db->run_migrations();
               }
           }
       ```
   
 *  Plugin Support [Ruel](https://wordpress.org/support/users/ruel214/)
 * (@ruel214)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/database-migration-3/#post-16167743)
 * I will relay that information to our technical team.

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

The topic ‘Database Migration’ is closed to new replies.

 * ![](https://ps.w.org/wp-webinarsystem/assets/icon-256x256.jpg?rev=2757966)
 * [WebinarPress – Webinar System for WordPress](https://wordpress.org/plugins/wp-webinarsystem/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-webinarsystem/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-webinarsystem/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-webinarsystem/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-webinarsystem/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-webinarsystem/reviews/)

## Tags

 * [database-migration](https://wordpress.org/support/topic-tag/database-migration/)

 * 4 replies
 * 2 participants
 * Last reply from: [Ruel](https://wordpress.org/support/users/ruel214/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/database-migration-3/#post-16167743)
 * Status: resolved