Whether you run a WordPress community with 1,000 members or a WooCommerce store with 100,000 orders, sometimes for testing you want to change all the account emails to something like “email@example.com”
After all, you don’t want to accidentally send a test email to all those users!
How to Change All WordPress User Emails to firstname.lastname@example.org
Run the following SQL query on the database for recent versions of phpMyAdmin:
UPDATE `wp_users` SET `email@example.com'
Run the following SQL query on the database for earlier versions of phpMyAdmin:
UPDATE wp_users SET firstname.lastname@example.org'
This will set all WordPress users’ email addresses to “email@example.com”.
How To Update All WooCommerce Order Email Addresses to firstname.lastname@example.org
If you are using WooCommerce, do the above and THEN do this for newer versions of phpMyAdmin:
UPDATE `wp_usermeta` SET `meta_value` = 'email@example.com' WHERE `meta_key` = 'billing_email'
If you are using WooCommerce, do the above and THEN do this for older versions of phpMyAdmin:
UPDATE wp_usermeta SET meta_value = 'firstname.lastname@example.org' WHERE meta_key = 'billing_email'
Pretty nifty, eh?
More posts from themightymo.com
How to style FacetWP checkbox hierarchy results using jQuery
How to fix SpinupWP ballooning disk space issue
A site we host on Digital Ocean recently went down. It took me a lot of troubleshooting and digging before realizing that the issue was that our disk space was maxed out on Digital Ocean. The site in question needs ~20gb of space, so our 50gb server should be plenty. But alas, there it was…
Google Removed Our Business Listing – How we restored our biz to the Map and got our reviews back.
I was about to send an email to a potential customer pointing them to our 5-star Google Reviews via our Google Business profile (e.g. the Google Map), hoping this added information about our customers’ past experiences might help me close a deal. But when I checked the Google Reviews link, it was down. And after…