⚠ The Black Friday 2020 WordPress Deals List Is Live!
Check It Out!

Search & Replace in Gutenberg

Authored By: James LePage
Published On: July 12, 2020

Affiliate Disclosure: Some links on this website are affiliate links. We make commissions for purchases made through those links.

We only recommend items/tools that we've personally used and like.

Full Disclosure | FTC Statement

amazon elementor E book

In this article, we wanted to discuss adding search and replace into the Gutenberg editor. For many writers, this is a necessary feature. We’re included in that mix, as we typically miss capitalizations of product names. Instead of having to go back and find/edit every single word, searching and bulk replacing everything at once saves a ton of time.

Microsoft Word has a great search and replace feature (it’s actually called find and replace) which works like this. Simply enter the word that needs replacing, enter what it will be replaced by, and click "replace all".

Many other writing platforms have this feature, yet Gutenberg does not have this built into the core functionality of the editor.

There's been some activity regarding this feature from other writers:

https://wordpress.org/support/topic/search-replace-in-Gutenberg/

One would think that this is a fairly easy feature to implement, yet it hasn't been done yet. We decided to hunt around for a plugin or software solution that would allow us to add search and replace in Gutenberg.

There are two main ways (that we found) to search and replace Gutenberg content. Both aren't a great solution, and it may just be easier to create content in Word, find and replace what needs to be found and replaced, and then upload it to your Gutenberg editor.

Method One: TinyMCE Advanced Plugin

The closest functionality can you get to the find and replace interface that can be accessed via Microsoft Word would be by installing the tinyMCE advanced plugin.

This plugin adds a lot of functionality to the tinyMCE editor (which is the same thing as the classic editor in WordPress), such as table creation, advanced formatting, and more. This applies to the classic editor block that can be added to the Gutenberg interface.

Access the feature by going to the edit menu, and selecting find an replace. Once you've clicked on it, this modal box will pop up allowing you to find a specific word, and replace it with whatever term you need. You can match case, select whole words, and more. You can selectively find it replace, or replace everything at once.

Unfortunately, this tool only works for content that is within the individual classic editor block in the Gutenberg editor. It won't replace all content (which is what we want), and kind of defeats the purpose by requiring all of the content to be within the classic editor block.

However, there are some work arounds to this issue. You could write all of your content initially within one classic editor block, utilized the find and replace function , and then cut the content from the classic editor block and paste it into the Gutenberg editor.

If you have properly broken up the content (this works with images as well) pasting it into the Gutenberg editor will automatically apply the lock styling for each individual content type.

Also, if your workflow involves uploading word files to the Gutenberg editor, Mammoth (the tool that is used to do that) automatically inserts all of the content into one classic editor block, which you then need to copy and paste into the Gutenberg editor. That means that you can upload the document, find and replace within the classic editor, and then copy and paste out of it (however, we would probably just end up using the search and replace feature built into word before doing this anyway).

Method two: General Search And Replace (plugin or WPCLI)

If you don't need to be targeted with your search and replace, you can simply install a plug in That will search for a word throughout the specified database tables and replace it with your query. You can also do this on WordPress CLI, though again, this isn't a targeted method which is what most authors are looking for.

Conclusion

Again, our main recommendation is simply writing all of the content in Word, and then uploading it to your WordPress website. This method carries across the HTML styling as well as images included in the word document, though we’re still missing the search and replace feature in Gutenberg.

We've filed a request for this feature, and hopefully the core team will understand the usefulness of this edition and include it in a future release of the editor.

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
James LePage is the founder of Isotropic Design, a digital agency that builds WordPress websites. I read, write and design constantly!

Social Share

Request A WordPress Tutorial
Crafting Stunning Digital Appearances & Assets Out Of New York.
Get In Touch
Syracuse, NY | Charlotte, NC | New York, NY
© 2020 Isotropic, LLC
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram