<commit_before>echo "Import latest live db backup"
gzip -dc /vagrant/wordpress.sql.gz | mysql --user=root --password=root wordpress-skydreams

echo "Truncate domain mapping table"
mysql --user=skydev --password=<PASSWORD> wordpress-skydreams -e 'TRUNCATE wp_domain_mapping;'

echo "Replace live domain with dev domain"
php /vagrant/scripts/search-replace-db/srdb.cli.php -h localhost -u skydev -n wordpress-skydreams -p skydev -s https://wordpress.skydreams.com -r http://wordpress.skydreams.com
php /vagrant/scripts/search-replace-db/srdb.cli.php -h localhost -u skydev -n wordpress-skydreams -p skydev -s wordpress.skydreams.com -r wordpress.skydreams.com.dev

cd /vagrant/www/wordpress-skydreams/htdocs/

echo "Add skydev user"
wp user create skydev <EMAIL> --user_pass=<PASSWORD> --role=administrator
wp super-admin add <EMAIL><commit_msg>Update skydev roles + disqus urls during db update<commit_after>echo "Import latest live db backup"
gzip -dc /vagrant/wordpress.sql.gz | mysql --user=root --password=root wordpress-skydreams

echo "Truncate domain mapping table"
mysql --user=skydev --password=<PASSWORD> wordpress-skydreams -e 'TRUNCATE wp_domain_mapping;'

echo "Replace live domain with dev domain"
php /vagrant/scripts/search-replace-db/srdb.cli.php -h localhost -u skydev -n wordpress-skydreams -p skydev -s https://wordpress.skydreams.com -r http://wordpress.skydreams.com
php /vagrant/scripts/search-replace-db/srdb.cli.php -h localhost -u skydev -n wordpress-skydreams -p skydev -s wordpress.skydreams.com -r wordpress.skydreams.com.dev

cd /vagrant/www/wordpress-skydreams/htdocs/

echo "Add skydev user"
wp user create skydev <EMAIL> --user_pass=<PASSWORD> --role=administrator
wp super-admin add <EMAIL>

for url in $(wp site list --field=url)
do
	wp option update disqus_forum_url skydreams-test --url=$url
	wp user set-role skydev administrator --url=$url
done
{'fraction_non_alphanumeric': 0.11636556854410202, 'fraction_numerical': 0.0, 'mean_word_length': 4.489795918367347, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6160277', 'n_tokens_mistral': 676, 'n_tokens_neox': 640, 'n_words': 181}