Last active
October 14, 2016 21:27
-
-
Save KrzysztofMadejski/362547a70400a4a313b3e46f0b8e469d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # TODO: anonimization of dat | |
| mysql fg -u fg -pfg -e "UPDATE fg_users SET user_pass=MD5('Password1'), user_email=CONCAT('user', ID, '@faktograf.hr'), display_name='Faktograf user', user_url=NULL, user_login=CONCAT('user',ID), user_nicename=CONCAT('user',ID);" | |
| mysql fg -u fg -pfg -e "DELETE FROM fg_usermeta WHERE meta_key != 'fg_capabilities';" | |
| mysql fg -u fg -pfg -e "DELETE FROM fg_options WHERE option_name LIKE '\\_%';" | |
| mysql fg -u fg -pfg -e "DELETE FROM fg_options WHERE option_name LIKE 'et\\_%';" | |
| mysql fg -u fg -pfg -e "DELETE FROM fg_options WHERE option_name LIKE 'wpseo%';" | |
| mysql fg -u fg -pfg -e "DELETE FROM fg_options WHERE option_name LIKE 'yst%' OR option_name LIKE 'yoast%';" | |
| # safer would be to whitelist options | |
| # TODO sed can messup with serialized arrays.. need to do it from php | |
| # delete wf* plugin tables | |
| mysql fg -u fg -pfg -N -e "SELECT GROUP_CONCAT(CONCAT('DELETE FROM ', table_name, ';') separator ' ') FROM information_schema.tables WHERE table_schema = 'fg' AND table_name LIKE 'fg_wf%';" | mysql fg -u fg -pfg | |
| mysql fg -u fg -pfg -e "DELETE FROM fg_pollsip;" | |
| mysql fg -u fg -pfg -e "DELETE FROM fg_et_social_stats;" | |
| # fg_options -> clear admin_email |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment