I’ve installed Trellis today, with all the latest updates.
All works, but I have problem with wp_redirect it goes to blank page.
I don’t get ‘headers already sent’ error, just blank page, http status 200.
I have tried to turn on output buffer, but it doesn’t resolve the issue like expected.
I’ve added:
add_action('init', function () {
ob_start();
});
If I try to do eg:
add_action(‘template_redirect’, function() {
if ( is_page_template('tpl-something.php')) {
wp_redirect( 'http://www.some-url.com');
exit;
}
});
It just displays blank page.
Same is in wp-admin, when I save post, activate plugin… blank page.
I have also added:
output_buffering = on
to php.ini, but that doesn’t help either.
Any suggestion welcome.
Update
It’s funny, when I add filter:
add_filter( 'wp_redirect', function( $url ) {
header("Location: $url");
}, 10, 3 );
so it’s obviously something with server config and I can’t figure what’s wrong.