Skip to content

Instantly share code, notes, and snippets.

@bueltge
Created October 17, 2011 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bueltge/1292097 to your computer and use it in GitHub Desktop.
Save bueltge/1292097 to your computer and use it in GitHub Desktop.
Update User Data in WordPress, depending from domain
-- generic email addresses and new passwords for users
UPDATE wp_users
SET user_email = CONCAT(user_login, '@example.com'),
user_pass = MD5(CONCAT(RAND(), CAST(ID AS CHAR), user_login));
-- generic email addresses for commentors
UPDATE wp_comments
SET comment_author_email = CONCAT(CAST(comment_ID AS CHAR), '@example.com');
-- admin email address
UPDATE wp_options
SET option_value = 'admin@example.com'
WHERE option_name = 'admin_email';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment