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...
28 Aug 2008

WordPress 2.7 and Crazyhorse

Last weekend I spent a few days away from WordPress and work in general to spend some quality time with the girlfriend. When I got back and updated my local copy of WordPress (via svn) I was surprised to see...