Search Regex adds a powerful set of search and replace functions to WordPress. These go beyond the standard searching capabilities, and allow you to search and replace almost any data stored on your site. In addition to simple searches you have the full power of PHP’s regular expressions at your disposal.
The driving force behind this plugin is to aid in website migration and upgrading. If you’ve ever done either of these then you know the pain of having to go back through all your data, changing URL paths and fixing things. With this plugin you can reduce this work to a search and replace pattern and the job is finished in seconds.
Why would you want this? The primary reason for the plugin was to aid in relocating directories. It’s a real pain to manually go through every post and change image directory names. With this plugin all that was required was a simple search and replace pattern, and the job was finished in a few seconds.
Search Regex is available in the following languages:
- Arabic, thanks to R.SN
- Belarussian, thanks to Marcis Gasuns
Full documentation can be found on the Search Regex Page page.
The plugin is simple to install:
search-regexdirectory to your
- Go to the plugin management page and enable the plugin
- Configure the plugin from
You can find full details of installing a plugin on the plugin installation page.
ALthough it no longer seems to be in development, you can get a lot done with this plugin. There are a few idiosyncracies to know about though. I wrote them up here:
With the idiosyncracies fixed, or with slightly improved documentation, this plugin would easily rate 5 stars. As it is, once you get used to the workarounds, you get 5-star functionality.
Great for cleaning up post content, changing urls etc
This plugin works 10/10, I had the wrong path of images in 500 + posts, and in 1 minute I had all of theme inside the posts, loved it!
very useful plugin.
I translated the description in Japanese.
However, search-regex.php could not be translated in GlotPress.
I hope to be able to translate.
It provides a very safe approach to using powerful search and replace operations that can affect 100s of pages. Thanks!
very useful plugin
Contributors & Developers
“Search Regex” is open source software. The following people have contributed to this plugin.Contributors
- Fix error thrown by regex options, props to leoxavier
- Fix pagination problem
- Minor refresh
- WP 3.5 compat
- Code cleanup
- Add Arabic translation
- Fix deep slashes
- WP 2.8 compatibility
- Update base library
- Fix issue with regex not being selected
- WP 2.6
- Added tag & sniplet searching.
- Make work in Safari
- Add search regex capabilities (‘search_regex_read’ and ‘search_regex_write’).
- Fix meta values
- Fix escaping issue
- Allowing search limit and direction
- Allow searching in pings & trackbacks
- Fix escaping bug
- Extensible plugins
- Reorganisation of code
- Use correct table prefix
- Fix stupid typo
- Minor cosmetic changes
- Set a timeout limit