Bulk edit WordPress posts and create reusable blocks

Keeping a website or blog up to date is a lot of work, but you can make the task easier by using features that enable you to mass edit WordPress posts and insert Gutenberg reusable blocks.

Sometimes you need to make sweeping changes across the whole website or blog, such as to turn comments on or off, or to enable or disable pingbacks. You might want to add or remove a category or tag to multiple posts, and so on. When you need to make changes to multiple posts, the bulk editing feature is very useful and here we will look at how it works.

Another type of bulk editing is the Gutenberg reusable block. Since WordPress 5, Gutenberg has been the default post editor. Some people love it and some hate it, but either way it does have some useful features and one is the reusable block.

Let’s say you have a paragraph of text on many posts, such as an affiliate link, copyright notice, a link to some content or resources, a special offer and so on. Instead of typing the same thing into many posts, type it once and save it as a reusable block. It can then be inserted into any post by selecting it on the blocks menu.

That saves you time and effort when creating posts, but there is an even more useful feature. If you change a reusable block, it updates every post on the site that uses it. If you offer a product or service for example, the details could be stored in a reusable block. If the price changes, change the reusable block and every page on the site is updated with the new price.

It is a sort of bulk editing feature and you should make use of reusable blocks for any repeated information that is likely to change. It’s great being able to change one thing and have the whole site updated.

Bulk edit WordPress posts

Let’s take a look at how to bulk edit posts first.

1 Find WordPress posts

Bulk edit WordPress posts on the Posts admin page

You might want to make bulk changes to all posts with a certain keyword and the Search facility enables you to find and list them. You could click All Categories and select a specific category of post to list. You could also use the date selector to choose posts with a certain date. Click the Filter button if you use either of these options.

2 Select posts for bulk editing

Bulk edit WordPress posts on the Posts admin page

Now that you have a list of posts you want to bulk edit, tick the checkbox next to Title to select all the posts or use the post checkboxes to choose just the ones you want to edit. Select Edit in the Bulk Actions menu and then click the Apply button next to it.

3 Edit multiple WordPress posts

Bulk edit WordPress posts on the Posts admin page

If you have ever let the mouse hover over a post title on the Posts page and then clicked the Quick Edit link that appears below, you will recognise the bulk editing features. The screenshot shows all the items that can be changed.

Author, Comments, Pings, Status, and Sticky are all set to No Change. Click them to select a different option. For example, click Comments and choose Allow or Do not allow. Click Status and set them all to Published, Pending Review, Private and so on.

The categories associated with all the selected posts can be selected or deselected. Tags can be applied to all selected posts too.

Don’t forget to click the Update button when everything has been set the way you want it. Any changes will be applied to all selected posts.

Gutenberg reusable blocks

The content of posts cannot be changed using the bulk editing feature on the WordPress Posts page. However, there is a way to make changes across multiple posts and that is by using reusable blocks. Let’s see how it works.

1 Create a reusable block

Create a block in WordPress Gutenberg editor

First create a block, such as by typing in some text, creating a bullet list, adding links, or whatever you want. Any block can me made reusable, just click the three dots above the block or at the top of the page and select Add to Reusable blocks on the menu that is displayed.

2 Name the reusable block

Name a block in WordPress Gutenberg editor

You are prompted to enter a name for the reusable block. Keep it short so that it easily fits on the menu in the next screenshot.

Click the Save button and that block is saved and can be used elsewhere when you need the same content. Use it for things like affiliate notices, products, services and prices, copyright notices, messages or other content that us used on multiple pages.

3 Insert a reusable block

Insert a reusable block in the WordPress Gutenberg editor

The next time you are writing a post and want to use that same content. Mouse over a block in the WordPress post editor and click the plus button above or below. Expand the Reuseable section in the blocks menu and click the block you want. There is only one reusable block in the screenshot, but you can create as many as you need.

The Manage All Reusable Blocks link takes you to a page that lists all reusable blocks. They can be edited and deleted from here. It even offers a way to export them so that they can be used on other WordPress sites.

Manage reusable blocks in WordPress

Mouse over a block title and click the Export as JSON link to save it to disk. Use the Import from JSON button at the top to read in blocks exported from other sites.

4 Identify reusable blocks

Identify reusable blocks in WordPress Gutenberg editor

How can you tell a reusable block from a regular block in the WordPress post editor? Let the mouse hover over a block and it says Reusable Block in the top left corner and there is a special icon in the right corner.

5 Edit a reusable block

Edit a reusable block in the WordPress Gutenberg editor

Click the icon in the top right corner of a reusable block and it turns into an Edit button. Click Edit and the block’s contents can be changed in the usual way. The Edit button becomes Save.

When a reusable block is changed, it is changed everywhere that block is used. It is a brilliant feature that enables mass editing of WordPress posts and you can update one or 100 posts at the same time.

Bear this in mind when making changes because you change everything.

6 Remove reusable blocks

Delete a reuseable block in the WordPress Gutenberg editor

Click the three dots at the top of the reusable block and there is an option to Remove from Reusable Blocks. We saw earlier how to manage and trash reusable blocks and this is an alternative method.

Also notice the Convert to Regular Block menu option on this menu. If you don’t want to change this block everywhere on your site, convert it to a regular block before you edit it.