Why is my WP logout redirect not working?

Why is my WP logout redirect not working?

The culprit is the following lines in um-logout.php: Strangely, various sources and help forums on the net claim that this can’t possibly work, as wp_logout () will already have dumped you on the standard WP login page, and the redirect simply won’t happen. Those same sources recommend to use the following, which works like a charm:

Is there a way to redirect to logout page?

Logout redirects to wordpress’s logout page. @yosmc if you could add a little bit more detail to your fix that would be awesome. I tried replacing the snippet with your snippet, but it just lead to a blank logout page with no actions taken.

Why is my logout not working on my WordPress site?

Two sites are on CloudFlare, rest are not. After logout, the user goes to the WordPress page on all sites on 2.n. Creating a new logout page and changing it in UM settings did not work for us.

Where do I go after logout in PHP?

We use the latest UM version and still get the WP logout page on multiple sites, multiple PHP versions (5.6 and 7.2). This was not the case before the 2.x update. After logout, the user currently goes to: /wp-login.php?loggedout=true, instead of the pages specified in settings.

What is the redirect loop issue in WordPress?

WordPress login redirect loop issue occurs when the platform keeps redirecting you to the wp-admin page even though you input the correct login credentials.

What causes WordPress login page refresh and redirecting?

What Causes Login Page Refresh and Redirect Issue in WordPress? Incorrect WordPress URL settings and failure to set login cookies are the most common reasons causing the login page redirect and refresh issue. Normally, when you login, WordPress validates your username and password and then sets a login cookie in your browser.

What to do if your logout is not working?

Make sure that you are using yoursite/logout page and make sure it is assigned as logout page in Ultimate member -> Settings -> Setup. Regards. That’s odd. What else can you recommend for trouble-shooting? Could the fact that I am using multisite has anything to do with it?

How can I stop a WordPress page from redirecting to my website?

2) Check in wp-admin under Settings → General to be sure you do not have the page set as the WordPress Address (URL) or Site Address (URL). 3) Check your .htaccess file to be sure that you do not have a redirect set in there that is redirecting it.

What to do if your WordPress page has wrong url?

A few more things to check 1) Check in wp-admin under Settings → Reading settings to make sure you do not have the page selected as your Static Homepage 2) Check in wp-admin under Settings → General to be sure you do not have the page set as the WordPress Address (URL) or Site Address (URL).