0

I migrated a working Wordpress site to a sandbox server. Prior to importing the database I did a search and replace for the domain name.

example.com/wp-admin loads wp-login.php

Submitting form results in immediate reload of form. No errors seen. When my user and pass were not accepted I attempted password reset but the email was not received and the form just rapidly reloads on submission.

I tested that changing blog name in options table resulted in new name displayed on login form. So definitely loading site settings from this database.

No other tables exist in database.

I edited user database row to set new email. No mail received.

I added the following with verified user id to my functions.php

$user_id = 4;
$password = 'newpasswd';
$output = wp_set_password( $password, $user_id );

Still could not log in and observed that hashed password in database was in fact changed. Having seen the change the wp_set_password() call was removed from functions.php

Enabled WP_DEBUG in wp-config. Saw some plugin Notice level flags but no errors.

I changed plugins directory name and added a new empty plugins directory. No change.

Same with themes.

No more WP_DEBUG Notices seen so disabled again.

Emptied the .htaccess which had default WP rules plus Wordfence rules and re-uploaded.

Commented out the Wordfence .user.ini file which sets auto_prepend_file. No change.

Tried multiple browsers. No change.

Console does not show errors.

This screenshot shows network panel headers when submitting form.

enter image description here

Here is main network panel showing a 301 before a 200. Thinking this may be relevant...

enter image description here

What should I try next?

  • How did you search and replace? If you just used a text editor, some of the data is likely corrupt as WP stores a lot of serialized information - if the new URL contains a different number of characters than the old URL, everything can go sideways fast. It's safer to use a db migration plugin which will handle serializing as well as the basic search and replace. – WebElaine Mar 2 '18 at 22:52
  • @WebElaine I did do the s// via a text editor but have now reloaded database from original export and just edited siteurl and home rows of options and issue remains the same – jerrygarciuh Mar 5 '18 at 0:29
  • @WebElaine your point was well taken and I ended up wiping the lot and using UpdraftPlus to successfully migrate. Thank you – jerrygarciuh Mar 9 '18 at 19:23
  • Want to add your comment as an answer @WebElaine ? – jerrygarciuh Mar 9 '18 at 19:23
1

How did you search and replace? If you just used a text editor, some of the data is likely corrupt as WP stores a lot of serialized information - if the new URL contains a different number of characters than the old URL, everything can go sideways fast. It's safer to use a db migration plugin which will handle serializing as well as the basic search and replace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.