Adding some check to avoid errors

I think you can just do:

    heat stack-list|awk '/ wordpress / {print $2}'|xargs -r echo heat stack-delete