[wp-trac] [WordPress Trac] #55430: Installation keeps on clobbering cshayward.com domain name with cjshayward.com
WordPress Trac
noreply at wordpress.org
Mon Mar 21 14:38:59 UTC 2022
#55430: Installation keeps on clobbering cshayward.com domain name with
cjshayward.com
----------------------------+-------------------------------
Reporter: CJSHayward | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 5.9.2
Severity: critical | Keywords: reporter-feedback
Focuses: administration |
----------------------------+-------------------------------
From https://stackoverflow.com/questions/71550140/how-can-i-unconfuse-my-
server-between-cjshayward-com-and-cshayward-com:
I have separate WordPress installations cjshayward.com and a present stub,
cshayward.com. They are on the same host, with separate databases.
I would like to log in to cshayward.com, but when I load cshayward.com/wp-
admin, it has the right title but the form action is cjshayward.com/wp-
login.php. Whenever I try to log in to the present stub's administrative
console, it bounces me to the other site.
I've tried deleting browsing history and using other browsers; I've looked
in cshayward.com's wp-config.php to confirm no reference is stated to
cjshayward.com, and I've looked through the Apache VirtualHost entry to
confirm that HTTP connections are redirected to HTTPS and HTTPS refers to
the files for the new site. Attempts to load cshayward.com/wp-admin
redirect to https://cjshayward.com/wp-
login.php?redirect_to=https%3A%2F%2Fcshayward.com%2Fwp-admin%2F&reauth=1 -
on the old site, although the redirect URL is on the new site. The HTML is
a mix of data from the old site and the new.
How can I unconfuse the installation so that attempts to load
cshayward.com/wp-admin redirect correctly to the new present stub's login
apparatus?
I can post non-private contents of wp-config data or query the database,
but I do not presently know a reproducible way to log into the new site
instead of the old, and looking at the config file plus Apache
configuration has me drawing a near-blank.
The source for https://cshayward.com/wp-login.php pulls the title for the
new site and specifies a form submission URL on the old site, and not the
unchanged title for the old site, but specifies to send the old site a
redirect URL on the new site:
{{{
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
/>
<title>Log In ‹ C.S. Hayward: A Guide to "The Good
Parts" — WordPress</title>
<meta name='robots' content='max-image-preview:large, noindex,
noarchive' />
<link rel='dns-prefetch' href='//s.w.org' />
<link rel='stylesheet' id='dashicons-css'
href='https://cjshayward.com/wp-includes/css/dashicons.min.css?ver=5.9.2'
type='text/css' media='all' />
<link rel='stylesheet' id='buttons-css' href='https://cjshayward.com
/wp-includes/css/buttons.min.css?ver=5.9.2' type='text/css' media='all' />
<link rel='stylesheet' id='forms-css' href='https://cjshayward.com
/wp-admin/css/forms.min.css?ver=5.9.2' type='text/css' media='all' />
<link rel='stylesheet' id='l10n-css' href='https://cjshayward.com/wp-
admin/css/l10n.min.css?ver=5.9.2' type='text/css' media='all' />
<link rel='stylesheet' id='login-css' href='https://cjshayward.com
/wp-admin/css/login.min.css?ver=5.9.2' type='text/css' media='all' />
<meta name='referrer' content='strict-origin-when-cross-origin' />
<meta name="viewport" content="width=device-width" />
</head>
<body class="login no-js login-action-login wp-core-ui locale-en-
us">
<script type="text/javascript">
document.body.className = document.body.className.replace
('no-js','js');
</script>
<div id="login">
<h1><a href="https://wordpress.org/">Powered by
WordPress</a></h1>
<form name="loginform" id="loginform"
action="https://cjshayward.com/wp-login.php" method="post">
<p>
<label for="user_login">Username or Email
Address</label>
<input type="text" name="log"
id="user_login" class="input" value="" size="20" autocapitalize="off" />
</p>
<div class="user-pass-wrap">
<label for="user_pass">Password</label>
<div class="wp-pwd">
<input type="password" name="pwd"
id="user_pass" class="input password-input" value="" size="20" />
<button type="button"
class="button button-secondary wp-hide-pw hide-if-no-js" data-toggle="0"
aria-label="Show password">
<span class="dashicons
dashicons-visibility" aria-hidden="true"></span>
</button>
</div>
</div>
<p
class="forgetmenot"><input name="rememberme" type="checkbox"
id="rememberme" value="forever" /> <label for="rememberme">Remember
Me</label></p>
<p class="submit">
<input type="submit" name="wp-submit" id
="wp-submit" class="button button-primary button-large" value="Log In" />
<input type="hidden" name="redirect_to" value="https://cjshayward.com/wp-
admin/" />
<input type="hidden" name="testcookie" value="1" />
</p>
</form>
<p id="nav">
<a
href="https://cjshayward.com/wp-login.php?action=lostpassword">Lost your
password?</a>
</p>
<script type="text/javascript">
function wp_attempt_focus() {setTimeout(
function() {try {d = document.getElementById( "user_login" );d.focus();
d.select();} catch( er ) {}}, 200);}
wp_attempt_focus();
if ( typeof wpOnload === 'function' ) { wpOnload() }
</script>
<p id="backtoblog">
<a href="https://cjshayward.com/">← Go to
C.S. Hayward: A Guide to "The Good Parts"</a> </p>
</div>
<script type='text/javascript'
src='https://cjshayward.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.0'
id='jquery-core-js'></script>
<script type='text/javascript' src='https://cjshayward.com/wp-
includes/js/jquery/jquery-migrate.min.js?ver=3.3.2' id='jquery-migrate-
js'></script>
<script type='text/javascript' id='zxcvbn-async-js-extra'>
/* <![CDATA[ */
var _zxcvbnSettings = {"src":"https:\/\/cjshayward.com\/wp-
includes\/js\/zxcvbn.min.js"};
/* ]]> */
</script>
<script type='text/javascript' src='https://cjshayward.com/wp-
includes/js/zxcvbn-async.min.js?ver=1.0' id='zxcvbn-async-js'></script>
<script type='text/javascript' src='https://cjshayward.com/wp-
includes/js/dist/vendor/regenerator-runtime.min.js?ver=0.13.9' id
='regenerator-runtime-js'></script>
<script type='text/javascript' src='https://cjshayward.com/wp-
includes/js/dist/vendor/wp-polyfill.min.js?ver=3.15.0' id='wp-polyfill-
js'></script>
<script type='text/javascript' src='https://cjshayward.com/wp-
includes/js/dist/hooks.min.js?ver=1e58c8c5a32b2e97491080c5b10dc71c' id
='wp-hooks-js'></script>
<script type='text/javascript' src='https://cjshayward.com/wp-
includes/js/dist/i18n.min.js?ver=30fcecb428a0e8383d3776bcdd3a7834' id='wp-
i18n-js'></script>
<script type='text/javascript' id='wp-i18n-js-after'>
wp.i18n.setLocaleData( { 'text direction\u0004ltr': [ 'ltr' ] } );
</script>
<script type='text/javascript' id='password-strength-meter-js-extra'>
/* <![CDATA[ */
var pwsL10n = {"unknown":"Password strength unknown","short":"Very
weak","bad":"Weak","good":"Medium","strong":"Strong","mismatch":"Mismatch"};
/* ]]> */
</script>
<script type='text/javascript' id='password-strength-meter-js-
translations'>
( function( domain, translations ) {
var localeData = translations.locale_data[ domain ] ||
translations.locale_data.messages;
localeData[""].domain = domain;
wp.i18n.setLocaleData( localeData, domain );
} )( "default", { "locale_data": { "messages": { "": {} } } } );
</script>
<script type='text/javascript' src='https://cjshayward.com/wp-admin/js
/password-strength-meter.min.js?ver=5.9.2' id='password-strength-meter-
js'></script>
<script type='text/javascript' src='https://cjshayward.com/wp-
includes/js/underscore.min.js?ver=1.13.1' id='underscore-js'></script>
<script type='text/javascript' id='wp-util-js-extra'>
/* <![CDATA[ */
var _wpUtilSettings = {"ajax":{"url":"\/wp-admin\/admin-ajax.php"}};
/* ]]> */
</script>
<script type='text/javascript' src='https://cjshayward.com/wp-
includes/js/wp-util.min.js?ver=5.9.2' id='wp-util-js'></script>
<script type='text/javascript' id='user-profile-js-extra'>
/* <![CDATA[ */
var userProfileL10n = {"user_id":"0","nonce":"1ddd65e585"};
/* ]]> */
</script>
<script type='text/javascript' id='user-profile-js-translations'>
( function( domain, translations ) {
var localeData = translations.locale_data[ domain ] ||
translations.locale_data.messages;
localeData[""].domain = domain;
wp.i18n.setLocaleData( localeData, domain );
} )( "default", { "locale_data": { "messages": { "": {} } } } );
</script>
<script type='text/javascript' src='https://cjshayward.com/wp-admin/js
/user-profile.min.js?ver=5.9.2' id='user-profile-js'></script>
<div class="clear"></div>
</body>
</html>
}}}
The "near" in near-blank is that the first, default HTTPS host in the
Apache config is set to redirect to https://cjshayward.com, but this
redirection should be an all or nothing deal. I can load the stub homepage
from https://cshayward.com, so I don't think it is automatically
redirecting; if that were happening, I'd expect a visit to the stub
homepage to redirect to the original homepage, which isn't happening.
This is true after wiping and re-creating the database.
I read wordpress site address is to a different site and added to wp-
config.php:
{{{
define('WP_SITE_URL', 'https://cshayward.com');
define('WP_HOME', 'https://cshayward.com');
}}}
That still had things confused, but when I dropped and re-created the
database with these settings in place, it stopped bouncing me to controls
for the other site.
--UPDATE--
This represents an incomplete resolution.
I was able, after making these changes, to get into cshayward.com/wp-admin
itself and start editing a homepage. After 15 minutes or so the editor
said my session had timed out and I needed to log in again, and the login
redirected me to the login for cjshayward.com.
Now the editor appears to be up to old tricks.
More specifically, if I go to the "General Settings" panel, the "Wordpress
Address (URL)" entry is cjshayward.com. Furthermore, if I change it to
cshayward.com and click to save my changes, it displays a value of
cjshayward.com that appears to be immune to change.
From the console:
{{{
MariaDB [cshayward]> update cs_options set
option_value="https://cshayward.com" where option_name = "siteurl";
Query OK, 1 row affected (0.001 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [cshayward]> select * from cs_options limit 1;
+-----------+-------------+-----------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+-----------------------+----------+
| 1 | siteurl | https://cshayward.com | yes |
+-----------+-------------+-----------------------+----------+
1 row in set (0.000 sec)
}}}
Then I reload the "General Settings" page and the option value is changed
back.
{{{
MariaDB [cshayward]> select * from cs_options limit 1;
+-----------+-------------+------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+------------------------+----------+
| 1 | siteurl | https://cjshayward.com | yes |
+-----------+-------------+------------------------+----------+
1 row in set (0.000 sec)
}}}
I have never knowingly told the cshayward.com installation to go to
cjshayward.com, and the hostname in /etc/hostname is technoluddites.org,
which so far hasn't cropped up.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55430>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list