Title: wp post block
Published: October 6, 2026
Last modified: October 27, 2026

---

# 󠀁[wp post block <command>](https://developer.wordpress.org/cli/commands/post/block/)󠁿

Manages blocks within post content.

## In this article

 * [Examples](https://developer.wordpress.org/cli/commands/post/block/?output_format=md#examples)
 * [Subcommands](https://developer.wordpress.org/cli/commands/post/block/?output_format=md#subcommands)

 [ ⌊GitHub⌉ ](https://github.com/wp-cli/entity-command)

 [ View Open Issues (0) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Apost-block+sort%3Aupdated-desc+org%3Awp-cli+is%3Aopen)
[ View Closed Issues (1) ](https://github.com/login?return_to=%2Fissues%3Fq%3Dlabel%3Acommand%3Apost-block+sort%3Aupdated-desc+org%3Awp-cli+is%3Aclosed)
[Create New Issue](https://github.com/wp-cli/entity-command/issues/new)

>  **Note:** This command is not part of a stable WP-CLI release yet. To use it 
> now, [switch to the nightly build](https://make.wordpress.org/cli/handbook/guides/installing/#updating-wp-cli)
> with `wp cli update --nightly`. If you installed the command as a separate package,
> updating that package may be enough.

 Provides commands for inspecting, manipulating, and managing Gutenberg blocks in
post content.

### 󠀁[Examples](https://developer.wordpress.org/cli/commands/post/block/?output_format=md#examples)󠁿

    ```
    # List all blocks in a post.
    $ wp post block list 123
    +------------------+-------+
    | blockName        | count |
    +------------------+-------+
    | core/paragraph   | 2     |
    | core/heading     | 1     |
    +------------------+-------+

    # Parse blocks in a post to JSON.
    $ wp post block parse 123 --format=json

    # Insert a paragraph block.
    $ wp post block insert 123 core/paragraph --content="Hello World"
    ```

### 󠀁[Subcommands](https://developer.wordpress.org/cli/commands/post/block/?output_format=md#subcommands)󠁿

| Name | Description | 
| [wp post block clone](https://developer.wordpress.org/cli/commands/post/block/clone/) |

Clones a block within a post.

  | 
| [wp post block count](https://developer.wordpress.org/cli/commands/post/block/count/) |

Counts blocks across multiple posts.

  | 
| [wp post block export](https://developer.wordpress.org/cli/commands/post/block/export/) |

Exports block content to a file.

  | 
| [wp post block extract](https://developer.wordpress.org/cli/commands/post/block/extract/) |

Extracts data from blocks.

  | 
| [wp post block get](https://developer.wordpress.org/cli/commands/post/block/get/) |

Gets a single block by index.

  | 
| [wp post block import](https://developer.wordpress.org/cli/commands/post/block/import/) |

Imports blocks from a file into a post.

  | 
| [wp post block insert](https://developer.wordpress.org/cli/commands/post/block/insert/) |

Inserts a block into a post at a specified position.

  | 
| [wp post block list](https://developer.wordpress.org/cli/commands/post/block/list/) |

Lists blocks in a post with counts.

  | 
| [wp post block move](https://developer.wordpress.org/cli/commands/post/block/move/) |

Moves a block from one position to another.

  | 
| [wp post block parse](https://developer.wordpress.org/cli/commands/post/block/parse/) |

Parses and displays the block structure of a post.

  | 
| [wp post block remove](https://developer.wordpress.org/cli/commands/post/block/remove/) |

Removes blocks from a post by name or index.

  | 
| [wp post block render](https://developer.wordpress.org/cli/commands/post/block/render/) |

Renders blocks from a post to HTML.

  | 
| [wp post block replace](https://developer.wordpress.org/cli/commands/post/block/replace/) |

Replaces blocks in a post.

  | 
| [wp post block update](https://developer.wordpress.org/cli/commands/post/block/update/) |

Updates a block’s attributes or content by index.

  |

 _Command documentation is regenerated at every release. To add or update an example,
please submit a pull request against the corresponding part of the codebase._