How to get a list of all WordPress Blocks in the Editor

Early on in the development of the new Gutenberg editor I asked how to get a list of all the blocks available in the new editor, then today Keith Devon asked how to do it on Twitter. So I thought I would post the answer here.

To get a list of all the WordPress Blocks currently available in your Post/ Page editor you should open up the browser console and then enter the following:

wp.blocks.getBlockTypes()

The output looks something like this:

A screenshot of the Firefox console with a list of (most of) the blocks on this website.

A screenshot of the Firefox console with a list of (most of) the blocks on this website.

This will list all blocks, the core ones, and the ones added by plugins. It’s particularly handy for WordPress plugin developers, but will also be useful when setting properties in theme.json a new feature that is part of the upcoming Full Site Editing functionality of WordPress.

Was it good/ useful/ a load of old rubbish? Let me know on Mastodon, or BlueSky (or Twitter X if you must).

Link to this page

Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.

WordPress News

The latest WordPress updates from the WPBriefs Podcast.

Related Posts

04 Nov 2006

WordPress Tips and Tricks – Post in Advance

I’m sure most people know about this but the ability to post things in advance with WordPress is absolutely great. My two blogs (this one and Binary Joy) posted 16 articles whilst I was on holiday despite me not being...
09 Jul 2010

Lowercase p, dangit! WordPress Controversy

There has recently been a new piece of code added to the WordPress core which makes sure that people spell WordPress correctly – automatically correcting misspellings (ie. making the P in the middle uppercase).On its own this seems harmless enough...
14 May 2013

Redesigning the WordPress Post Editor

Ghost is a project born from frustration with WordPress. Ironically it seems to be mostly WordPress power users who want to use it. The Ghost team – led by John O’Nolan – put Ghost on KickStarter last week and it...
28 May 2010

WordPress caching, Part 2

As I mentioned in WordPress caching part 1, WordPress has built-in caching that can be hooked into by plugins such as W3 Total Cache and Batcache (developed by Andy Skelton who is employed by Automattic).In this article I am going...
08 Jun 2010

What do you want me to write about?

Part of improving my website involves me wanting to write about the sort of things you want to read about.If you could take 1 minute to answer 1 quick question then that would really help me to work out what...