WordPress – Find and Replace Old Shortcodes on All Posts at Once

Imagine you want to replace a Buy Plugin button shortcode because you’ve updated the shortcodes on your sites. Normally, you would have to open your posts one by one in WordPress. After opening them, you would have to search for the shortcodes, replace them, and save changes. Of course, that’s just one post.

Now imagine you have two thousand posts to apply that change to them. That doesn’t sound any good. It will be tedious and time-consuming.

Fortunately, we can help you with that. We’ll show you how to find and replace shortcodes on all posts at once. For that you’ll use the Posts, Pages, and Custom Post Types Spreadsheet plugin.

This plugin displays all your posts on a spreadsheet and allows you to edit thousands of posts at once. It contains a Search tool that allows you to do advanced searches. Also, it contains an easy-to-use Bulk Edit tool that allows you to apply changes massively.

Once installed and activated, you need to go to Sheet Editor > Edit Posts to open the spreadsheet.

Now just follow these simple steps.

1- Open the Bulk Edit tool

You can open the Bulk Edit tool by clicking on it on the plugin’s toolbar. You’ll be able to filter and edit all your posts at once in just some seconds.

2- Filter the posts you’ll edit

You need to find all posts containing the shortcode you want to replace in their content. For this, you need to select the I want to search rows to update option in the Select the rows that you want to update dropdown.

Once there, you need to tick the Enable advanced filters checkbox and use these values to find all posts containing a specific short code in their content.

  • Field key: Content
  • Operator: CONTAINS
  • Value: Enter the shortcode you want to search. For example, [buy_extension].

Now just click on Run search to filter your posts and go back to the bulk edit tool.

3- Replace old short codes in your filtered posts

After filtering all your posts containing the shortcode you want to replace, you need to select these values to remove the shortcode and insert a new one.

  • Select the rows that you want to update: I want to search rows to update
  • What field do you want to update: Content
  • Select type of edit: Replace
  • Replace this: [buy_extension], for example
  • With this: [buy_our_extension], for example
  • Click on Execute now to apply the changes.


Did you see how simple it is to replace shortcodes from your posts’ content? You just need to follow these simple steps, and you’ll have saved a lot of hours and clicks. It’s that simple, fast, and you don’t need to use any PHP snippets.

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.

Close Menu