WordPress, and WP Elementor: How to search and replace text, email addresses, and URLs
To search and replace text, email addresses, and URLs in your WordPress website and its database, including Elementor content, you may use the following plugins and respective steps. Of course, the steps assume you have basic knowledge of how to search, install, and activate plugins.
Better Search and Replace plugin
This plugin allows you to search for specific terms in the database and replace them efficiently, with an emphasis on Elementor’s custom data. Download and install the plugin from here: https://wordpress.org/plugins/better-search-replace/
Steps:
- Install and activate the Better Search Replace plugin from the WordPress repository.
- Go to Tools > Better Search Replace in your WordPress dashboard.
- In the Search/Replace tab:
- Enter the search term (text, email, or URL) in the "Search for" box.
- Enter the replacement term in the "Replace with" box.
- Select the database tables, such as wp_posts (for Elementor content), wp_postmeta, or any other table containing the information you need to update.
- Check the box for Run as a dry run to test the changes.
- If the results look good, uncheck the dry run option and click Run Search/Replace to make the changes.
Elementor Note: Elementor stores its content in wp_postmeta and wp_posts, so make sure to include these tables during the search.
Search and Replace plugin
If the above does not work for some reason, this is an alternative plugin that may work. The "Search and Replace" plugin is a powerful tool for finding and replacing content in your WordPress database. Download and install the WP plugin from here: https://wordpress.org/plugins/search-and-replace/
Steps:
- Install and activate the Search and Replace plugin from the WordPress repository.
- Go to Tools > Search & Replace in your WordPress dashboard.
- In the Search tab:
- Enter the search term (text, email address, or URL) you want to replace.
- Enter the replacement term.
- Choose the tables where the plugin should search (e.g., posts, pages, Elementor data).
- Choose whether to make a dry run (simulates the process without making actual changes).
- If satisfied with the results, click Search and Replace.
Note: Always create a backup before performing a database search and replace operation.
Elementor Search and Replace
The Elementor Search and Replace plugin is specific to Elementor-based content and allows for global changes across the page builder. Download and install the Elementor plugin from here: https://wordpress.org/plugins/search-replace-for-elementor/
Steps:
- Install and activate the Elementor Search and Replace plugin from the WordPress repository.
- Go to Elementor > Tools > Search and Replace in the WordPress dashboard.
- Enter the text, email address, or URL you want to search for.
- Enter the replacement content.
- Select the relevant Elementor templates and content areas where the search should be applied.
- Review the results and click Replace to make the changes.
Tip: Elementor’s global elements and widgets can also be updated using this plugin, allowing changes across multiple pages at once.
Best Practices
Backup First
Before performing any database changes, always create a complete backup and ensure you are able to use and reload the same backups.
Test Changes
Always run a dry run first to ensure that the replacement will only affect the intended content.
Review Affected Tables
For Elementor users, wp_posts and wp_postmeta are critical tables for storing content. Double-check that these tables are included in the search.
These plugins simplify the process of replacing text, emails, and URLs in your WordPress website, including Elementor content, helping to avoid manual updates across multiple posts or pages.
While the above steps are generally doable for techies and even basic users, it is always best to seek professional help and expertise from WordPress web developers.
If you need help with similar maintenance, fixes, troubleshooting, upgrades, or revamping activities on your websites, let us know. Check out our maintenance services here, whatever the CMS or platform: https://www.ibuild.ph/services/website-maintenance
Here's a quick video tutorial for the Better Search and Replace, which should basically be the same steps and should work for any of the other plugins mentioned in this article.
UPDATES/EDITS:
- On the last part of the video, the changes and updates actually worked, but needed flushing and clearing the LiteSpeed cache of the website.
- YouTube Video is best viewed on high definition; check the settings in your YouTube player.