Imagine you want to replace a Buy Plugin button shortcode because you’ve updated the shortcodes on your sites. Normally, you would have to find and replace old shortcodes on WordPress posts one by one, which is a tedious and time-consuming task if you have hundreds or thousands of posts to update.
Fortunately, we can help you with that. We’ll show you how to find and replace old shortcodes for all WordPress 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.
You can download the plugin here: Download Posts, Pages, and Custom Post Types Spreadsheet Plugin - or - Check the features
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.
Done!
Have you seen how easy it is to find and replace old shortcodes in WordPress posts content? You just need to follow these simple steps, and you’ll have saved a lot of hours and clicks. The best part is that you don’t need to use any PHP snippets.
You can download the plugin here: Download Posts, Pages, and Custom Post Types Spreadsheet Plugin - or - Check the features