{"id":13810387,"url":"https://github.com/10up/wp-hammer","last_synced_at":"2025-05-14T10:33:09.106Z","repository":{"id":41225883,"uuid":"53162222","full_name":"10up/wp-hammer","owner":"10up","description":"ARCHIVED: Please see https://github.com/10up/wp-scrubber as replacement.","archived":true,"fork":false,"pushed_at":"2024-01-24T19:09:11.000Z","size":85,"stargazers_count":152,"open_issues_count":5,"forks_count":15,"subscribers_count":111,"default_branch":"trunk","last_synced_at":"2024-06-26T12:40:11.093Z","etag":null,"topics":["hammer","wordpress","wp-ha"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/10up.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-04T20:03:42.000Z","updated_at":"2024-05-17T09:47:03.000Z","dependencies_parsed_at":"2024-06-28T16:46:02.716Z","dependency_job_id":null,"html_url":"https://github.com/10up/wp-hammer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Fwp-hammer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Fwp-hammer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Fwp-hammer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10up%2Fwp-hammer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/10up","download_url":"https://codeload.github.com/10up/wp-hammer/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213870383,"owners_count":15650179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hammer","wordpress","wp-ha"],"created_at":"2024-08-04T02:00:51.858Z","updated_at":"2024-08-04T02:01:47.009Z","avatar_url":"https://github.com/10up.png","language":"PHP","funding_links":[],"categories":["WordPress Plugins"],"sub_categories":[],"readme":"# WP Hammer\n\n\u003e ``wp ha`` is a multi-tool. You can use it to clean your environment of personally identifiable information and extra content (posts and users) that are not necessary.\n\n\u003e [!CAUTION]\n\u003e WP Hammer has been archived and [WordPress Scrubber](https://github.com/10up/wp-scrubber) should be used as its replacement.\n\n[![Support Level](https://img.shields.io/badge/support-archived-red.svg)](#support-level) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.8%20tested-success.svg) [![MIT License](https://img.shields.io/github/license/10up/wp-hammer.svg)](https://github.com/10up/wp-hammer/blob/trunk/LICENSE.md)\n\n\u003e [!WARNING]\n\u003e All changes are final and modify your site DB. Make sure you take a backup of your database __BEFORE__ you play around with the tool ``wp db export``\n\n## Before You Begin\nMake a copy of your database.\n\n## About\n\nThis tool will help you work on a client's site without having to worry about any of their user's personal information (emails, post content etc) being hosted on your dev environment.\n\n## Installation\nMake sure you have [wp-cli](http://wp-cli.org/) installed and in your $PATH. Following that, run this command in your terminal:\n\n`wp package install ivankruchkoff/wp-hammer`\n\n## Usage\n\nWith ``wp ha`` you can:\n\n### Clean up user emails.\n``wp ha -f users.user_email='ivan.k+__ID__@10up.com'``\n\n### Clean up user passwords.\nTo auto generate passwords:\n``wp ha -f users.user_pass=auto``\n\nTo set all passwords to password:\n``wp ha -f users.user_pass=password``\n\n### Replace posts with dummy posts.\n``wp ha -f posts.post_content=markov,posts.post_title=random``\n\n### Remove extra users.\n`` wp ha -l users=10``\n\n### Remove extra Posts.\n`` wp ha -l posts=100``\n\n\nOr you can chain tasks together like in the following  example, which we'll break down in parts as the syntax is fairly powerful\n`wp ha -f posts.post_author=auto,users.user_pass=auto,users.user_email='ivan.k+__ID__@10up.com',posts.post_title=ipsum,posts.post_content=markov -l users=10,posts=100.post_date`\n\n``wp ha``\nHow you invoke the command\n\n### Format\n`\nwp ha -f posts.post_author=auto users.user_pass=__user_email__UMINtHeroJEreAGleC users.user_email='ivank+__ID__@10up.com' posts.post_title=ipsum posts.post_content=markov\n`\n``posts.post_author`` is set to a random user ID (from those that will remain after we've performed any adjustments to the users)\n`users.user_pass` is set to the user email followed by UMINtHeroJEreAGleC\n`users.user_email='ivank+__ID__@10up.com' - __ID__` is replaced by the user ID\n`posts.post_title=ipsum` replaces all post_titles with auto-generated lorem ipsum\n`posts.post_content=markov` replaces all post_content with randomly generated content, using markov chains for the specified post_content\n\n\n### Limits\n`\n-l users=10 posts=page.100.post_date,post.50.post_content.length`\nusers=10 only the first 10 users remain\n`posts=page.100.postdate,post.50.post_content.length `\nWe keep the following posts:\n `post type = page, 100 posts sorted by postdate, descending\n post type = post, 50 posts with the longest post_content\n `\n\n\n### Another example\n`\nwp db import production.sql \u0026\u0026\nwp ha posts.post_author=auto,users.user_pass=XGRwPjb7uFD5de23,users.user_email='ivan.k+__ID__@10up.com',posts.post_title=ipsum,posts.post_content=markov -l users=10 \u0026\u0026\nwp db export staging.sql\n`\n\n## Support Level\n\n**Archived:** This project is no longer maintained by 10up. We are no longer responding to Issues or Pull Requests unless they relate to security concerns. We encourage interested developers to fork this project and make it their own!\n\n## Credits\n\nCreated by Ivan Kruchkoff ([@ivankk](https://profiles.wordpress.org/ivankk)), at [10up.com](http://10up.com).\n\n## Like what you see?\n\n\u003ca href=\"http://10up.com/contact/\"\u003e\u003cimg src=\"https://10up.com/uploads/2016/10/10up-Github-Banner.png\" width=\"850\"\u003e\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10up%2Fwp-hammer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F10up%2Fwp-hammer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10up%2Fwp-hammer/lists"}