Plugin Support
Mehmet
(@gandomi)
Hi @taojing10,
Thank you for reporting this. We’ve identified this as a known issue where the background migration process can stall and stop progressing.
This problem is often related to hosting resource limits. Before applying the fix below, we recommend checking the following with your hosting provider:
- PHP Memory Limit: Should be at least
256M. You can check this in Tools > Site Health > Info > Server. If it’s lower, ask your host to increase it or add define('WP_MEMORY_LIMIT', '256M'); to your wp-config.php.
- PHP Max Execution Time: Should be at least
120 seconds. Low values (30s) can cause the migration to time out silently.
- WP-Cron: The migration relies on WordPress cron to keep running in the background. Some hosts disable WP-Cron or limit how often it fires. Check with your host that cron jobs are enabled. You can also ask them to set up a real server-side cron job for better reliability.
If after checking these settings the migration is still stuck, you can reset it with the following steps:
- Using your hosting’s file manager or FTP, navigate to
wp-content/
- Create a folder called
mu-plugins if it doesn’t already exist
- Create a new file inside it called
wp-statistics-reset-migration.php
- Paste the following code into that file:
<?php
add_action('admin_init', function () {
global $wpdb;
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wp_statistics_update_visitors_source_channel_batch_%'");
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE 'wp_statistics_visitor_columns_migrator_batch_%'");
delete_transient('wp_statistics_update_visitors_source_channel_process_lock');
delete_transient('wp_statistics_visitor_columns_migrator_process_lock');
delete_site_transient('wp_statistics_update_visitors_source_channel_process_lock');
delete_site_transient('wp_statistics_visitor_columns_migrator_process_lock');
delete_option('wp_statistics_update_visitors_source_channel_status');
delete_option('wp_statistics_visitor_columns_migrator_status');
$jobs = get_option('wp_statistics_jobs', []);
if (is_array($jobs)) {
unset($jobs['update_source_channel_process_initiated']);
unset($jobs['update_visitors_source_channel_total']);
unset($jobs['update_visitors_source_channel_processed']);
unset($jobs['visitor_columns_migrator_initiated']);
unset($jobs['visitor_columns_migrator_total']);
unset($jobs['visitor_columns_migrator_processed']);
update_option('wp_statistics_jobs', $jobs);
}
wp_clear_scheduled_hook('wp_statistics_update_visitors_source_channel_cron');
wp_clear_scheduled_hook('wp_statistics_visitor_columns_migrator_cron');
@unlink(__FILE__);
}, 1);
- Visit any page in your WordPress admin, the stuck notice should disappear and the file will delete itself automatically.
- remove
wp-statistics-reset-migration.php after that.
After the reset, once you’ve confirmed your hosting resources are adequate, the migration prompt may reappear on the Referrals page and you can re-trigger it.
We’ve escalated this matter to our development team and we will follow up with you once a permanent fix is available.
Please let us know if this resolves the issue for you.