When using wp_redirect() you will facing Header error “PHP Warning: Cannot modify header information – headers already sent by …… wp-includes/pluggable.php on line 1228”
To solve this problem you need to change the PHP.ini value. In PHP.ini find “output_buffering” and then change in to “On”
output_buffering = OnRun the script again. you will found that it can redirect without the warning anymore.