Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 4 years ago.
Improve this questionhow can I transform all email addresses in my DB in lowercase?
I did an import and all addresses are uppercase and if a user registers again with lowercase the system thinks is another email. So I want to change all the emails to lower to avoid further duplications.
best will be to have a SQL query to do that
Thanks for your help!
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 4 years ago.
Improve this questionhow can I transform all email addresses in my DB in lowercase?
I did an import and all addresses are uppercase and if a user registers again with lowercase the system thinks is another email. So I want to change all the emails to lower to avoid further duplications.
best will be to have a SQL query to do that
Thanks for your help!
Share Improve this question asked Nov 24, 2020 at 19:15 TommasoTommaso 1 6 | Show 1 more comment1 Answer
Reset to default 2This is probably what you want:
update wp_users set user_email = lower(user_email) where user_email is not null;
However I'm surprised you need this: WordPress's default collation is case-insensitive.
LOWER()
function, I believe. – Pat J Commented Nov 24, 2020 at 19:55