https://gist.github.com/railmedia/0e76c0e988c03d06dff0002875bfc5b9
Category: PHP
-
Install Nginx, PHP, MySQL on Mac
A very good guide here
-
Remove WordPress users via WP CLI
Remove users with customer role:
# Delete user 123 and reassign posts to user 567 $ wp user delete 123 --reassign=567 --yes Success: Removed user 123 from http://example.com # Delete all contributors and reassign their posts to user 2 $ wp user delete $(wp user list --role=customer --field=ID) --reassign=2 --yes Success: Removed user 813 from http://example.com Success: Removed user 578 from http://example.com # Delete all contributors in batches of 100 (avoid error: argument list too long: wp) $ wp user delete $(wp user list --role=customer --field=ID | head -n 100) --reassign=567 --yes
Source: https://developer.wordpress.org/cli/commands/user/delete/