diff --git a/modules/website/wordpress/wordpress-cron-manager.sh b/modules/website/wordpress/wordpress-cron-manager.sh index c4714f2..f3ba97a 100755 --- a/modules/website/wordpress/wordpress-cron-manager.sh +++ b/modules/website/wordpress/wordpress-cron-manager.sh @@ -1467,10 +1467,10 @@ extract_user_from_path() { remove_disable_wpcron_from_config() { local wp_config="$1" - # Remove any existing DISABLE_WP_CRON lines using extended regex - # Pattern matches: define('DISABLE_WP_CRON', true); - # With flexibility for spacing and quotes - sed -i.wpbak -E '#define[[:space:]]*\([[:space:]]*['\''"]'"$WP_CRON_DISABLED_VAR"'['\''"][[:space:]]*,[[:space:]]*true[[:space:]]*\)#d' "$wp_config" + # Remove any existing DISABLE_WP_CRON lines using simple pattern + # Pattern matches: define('DISABLE_WP_CRON', true); and similar variations + # Simplified from complex extended regex that wasn't matching properly + sed -i.wpbak '/define.*DISABLE_WP_CRON.*true.*;/d' "$wp_config" return $? }