← BACK TO HELP
How to Search and Replace Links (URLs) in Elementor?
The ability to search and replace links is essential for updating or managing URLs across your Elementor content. With the Search & Replace for Elementor plugin, you can achieve this efficiently using various methods. These features are available in both the Free and Pro versions, offering flexibility for individual and bulk updates.
1. Text-only Method
The Text-only search method is ideal for scenarios where links are embedded within text widgets. When using this method:
- All HTML tags are stripped from the data field, except for the
<a>
tag (anchor tag), which is retained for links. - For example, if you have URLs embedded in text widgets that need updating, the Text-only method allows you to search and replace the URLs without affecting other HTML elements.
This approach is straightforward and works well for simple link updates within text content.
2. Links (URLs) Method
The Links (URLs) search method targets all Elementor widgets that use the "url"
data field key. This includes default widgets like Buttons, where the "url"
key is standard for link attributes.
When using this method for individual or bulk search and replace, the plugin automatically identifies these fields and replaces the URLs as specified. This makes it especially useful for updating button links or other elements across your site.
Learn more about Elementor widgets and data fields in the Elementor documentation.
3. Links (URLs) Method + Unfiltered URLs
For more complex scenarios, such as partial or non-compliant URLs, the Links (URLs) method with Unfiltered URLs is invaluable.
- Filtered Input: By default, all input data for this method is sanitized and validated to ensure compliance with URI syntax.
- Unfiltered Input: For cases where URLs contain non-Latin symbols, special characters, or mixed entities, you can disable sanitization and validation.
To enable Unfiltered URLs:
- Navigate to the Options page in the plugin settings.
- Set the Unfiltered URLs option to “Yes.”
This allows partial or complex URLs to be updated without interference from validation filters.
4. Custom URL Data Field Keys
For users leveraging 3rd-party Elementor addons, the plugin supports custom data field keys:
- Many 3rd-party plugins prefix their data fields (e.g.,
elkit_
). - To locate these keys, use the Scan Data button on the Options page.
- Look for fields containing the
"url"
keyword within the add-on’s data field keys.
Once identified, select the required keys and perform the search and replace operation. This method is particularly useful for managing links added by 3rd-party plugins and addons.
Best Practices for Searching and Replacing Links
- Backup Your Database: Before performing search and replace operations, always back up your database to ensure you can restore your site if needed. Learn how in this guide.
- Test Changes: Use the Dry-run option (enabled by default) to preview changes before applying them. This ensures accuracy and prevents unintended modifications.
- Review Unfiltered URLs: Only use the Unfiltered URLs option when absolutely necessary, as it bypasses validation and may accept potentially malformed data.
Conclusion
The Search & Replace plugin provides a comprehensive toolkit for updating URLs in Elementor content. Whether you need to manage simple text-based links, handle complex URLs, or work with custom data fields, the plugin’s flexible options make the process efficient and reliable.
For advanced configurations or troubleshooting, visit the plugin documentation or the WordPress Support page. With these powerful tools, managing links across your Elementor site has never been easier.