# Delete sample page

**URL:** https://discourse.roots.io/t/delete-sample-page/7153
**Category:** trellis
**Created:** 2016-07-08T10:14:00Z
**Posts:** 6
**Showing post:** 4 of 6

## Post 4 by @cfx — 2016-07-08T13:36:10Z

Verified working:

```
- name: Delete sample page
  shell: "wp post delete --allow-root $(wp post list --allow-root --post_type=page --posts_per_page=1 --post_status=publish --pagename=\"sample-page\" --field=ID --format=ids)"
  args:
    chdir: "{{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }}/"
  with_dict: "{{ wordpress_sites }}"
```

See [method #3 here](https://discourse.roots.io/t/running-single-ansible-tasks-in-development/4808/2?u=cfx) on the best way to test this (best way imho anyway).

---

_[View the full topic](https://discourse.roots.io/t/delete-sample-page/7153)._
