I have traced the problem to this code in wp-login.php:
case 'logout' :
check_admin_referer('log-out');
$user = wp_get_current_user();
wp_logout();
echo "hello";
echo $_REQUEST['redirect_to'];
if ( ! empty( $_REQUEST['redirect_to'] ) ) {
$redirect_to = $requested_redirect_to = $_REQUEST['redirect_to'];
} else {
$redirect_to = 'wp-login.php?loggedout=true';
$requested_redirect_to = '';
}
It appears if I change this line:
$redirect_to = 'wp-login.php?loggedout=true';
to this:
$redirect_to = 'http://wp-login.php?loggedout=true';
Then it works as expected. Not sure why. In fact I can also change it to any of the following and it still works as expected:
$redirect_to = ‘http://’;
or
$redirect_to = ‘http://somerandomsite’;
Not sure what is going on.
Related Posts:
- Can only access homepage and admin panel
- Why isn’t my imported database showing up? install.php pops up and adds new tables to the database
- After finishing building a site on localhost, how do I transfer everything to a client’s server?
- Cannot complete migration on LAMP
- migration wordpress to local machine does not work with all broken URLs except frontpage
- Absolute Hyperlinks in WordPress Website Will Not Work In the Local Server
- WordPress migration from live server to localhost having 404 error? [closed]
- 404 Not Found The requested URL was not found on this server
- Xampp MySQL not starting – “Attempting to start MySQL service…”
- Moved WordPress to New Server, Now Tries to Download a File
- Change site url when moving site to another url?
- Recover WordPress blog from an inactive domain name
- Is it possible just by using wp-cli to migrate one multisite instance to single site?
- How to transfer changes from test environment to live site?
- Export and overwrite pages on import?
- URLs to images get messed up after migration
- Does WordPress Import/Export tool actually exports media (images) as well?
- Links after moving my site to another domain
- Migrating my existing WP site to localhost
- Will post id change when migrating to new site?
- Should I enable FastCGI on WordPress?
- Critical Site Health Issue after WordPress Migration
- How can I find the cause of theme crashing Apache in Xampplite?
- call_user_func_array() errors after migrating site with InstantWP
- WAMP to XAMPP WordPress transfer
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- We have a static Hugo website and we want to migrate it to WordPress
- How do I force password reset even with wrong password entered?
- How can I migrate (export and import) wordpress users without loosing their password?
- Tags not importing when using WordPress import system
- preventing the duplicate wp_insert_post
- How to configure Multisite Network with randomized hostnames?
- Trying to move an Expression Engine site to WordPress, but not having luck with content
- Migrate ProcessWire to WordPress
- Preserve password hashes when migrating to another server
- Change pagination url format
- migrating my wordpress site
- How to redirect specific URL to Subdomain
- Moving WordPress page to a new domain
- Is it possible to transfer my local installation entirely to the server?
- Why WordPress isn’t and/or can’t be domain agnostic
- migrated wordpress site not running properly, on Ubuntu localhost?
- Moving my newly made site from subdirectory
- What is the difference between wp-admin>Export>All content and MySql dump and import
- Clean private data (passwords, ftp, database) before zipping my site and SQL and give it to other person
- wordpress changing host breaks image links
- Redirect – remove custom query string
- Tried to move blogs to a new server – “white screen of death”
- Blank screen after moving WordPress to new server with same domain name
- I changed my domain name and REST API stopped working
- Getting HTTP error 500 after migrating a website
- WordPress migration to new domain and environment with only zip file
- Clone WordPress site from development server to live server
- Server Migration Issues
- Migrating WP website from local host
- After migration the website is really slow
- How to remove symlink from folder
- Transfer WordPress
- Server ip to Domain
- Migrating from foo.com/wordpress/ to foo.com/ — how can I do it?
- How can I view my site directly from WordPress dashboard?
- Migrate VB.net website to wordpress website
- How do you do your big exports / imports?
- Import from Windows to Linux
- Wrong URL to CSS and JS after change domain
- Migrate site from local to local via a backup
- Migration from environment to master WordPress
- How to recover wordpress website moved from a PC to another
- Making a development site live, on Amazon EC2
- How can I migrate asp.net website to a wordpress site?
- Changing permalink stops me from creating webpages
- Update around 200,000 posts
- Migrate wordpress server to localhost problems
- Cannot combine two site’s pages together
- URL Rewrite 404
- Migration from XAMPP in windows to MAMP in Mac
- Internal server error
- Redirects and Subdirectory migration to Root Directory
- Moving WordPress site from local PC to local Mac
- WordPress giving gibberish and wp-admin gives HTTP 500 error
- How to change permalink structure and keep permalinks for old posts
- Moved wordpress dashboard still pointing to testing server
- SVG files and wordpress
- WordPress migration ended with 500 Error page on pages excluding homepage
- Authorization link broken when migrating from Blogger to WordPress
- Migrating a WordPress site has broken UTF8 encoding
- How to make Youtube short code transfer
- Error after moving wordpress blog
- Source code get entity escaped after migrating
- Fast way to copy a Blog x to another domain/server without deleting it
- Migrated from localhost to server and cannot get custom_fields content anymore
- Can’t get pretty permalinks to work without index.php
- Can’t restore my wordpress site from zip back up file
- WordPress.com blog migration to self hosted WordPress website [closed]
- ColdFusion site to WordPress?
- How do I set up a test environment in a sub-folder?
- Site is broken after transferring to adminer
- Changing a domain for a current WP site without having it go inactive
- wp-admin keeps forwarding me to an old url
- Settings > Permalinks – mod_rewrite ineffective if expression not preceded by /index.php/