Contributors: Delicious Brains, mattshaw
Tags: search replace, update urls, database, search replace database, update database urls, update live url
Requires at least: 3.0.1
Tested up to: 5.6
Stable tag: trunk
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
A simple plugin for updating URLs or other text in a database.
When moving your WordPress site to a new domain or server, you will likely run into a need to run a search/replace on the database for everything to work correctly. Fortunately, there are several plugins available for this task, however, all have a different approach to a few key features. This plugin is an attempt to consolidate the best features from these plugins, incorporating the following features in one simple plugin:
- Serialization support for all tables
- The ability to select specific tables
- The ability to run a "dry run" to see how many fields will be updated
- No server requirements aside from a running installation of WordPress
- WordPress Multisite support
Premium features available in the Pro version:
- View exactly what changed during a search/replace
- Backup and import the database while running a search/replace
- Priority email support from the developer of the plugin
- Save or load custom profiles for quickly repeating a search/replace in the future
- Support and updates for 1 year
Learn more about Better Search Replace Pro
The search/replace functionality is heavily based on interconnect/it's great and open-source Search Replace DB script, modified to use WordPress native database functions to ensure compatibility.
Install Better Search Replace like you would install any other WordPress plugin.
Dashboard Method:
- Login to your WordPress admin and go to Plugins -> Add New
- Type "Better Search Replace" in the search bar and select this plugin
- Click "Install", and then "Activate Plugin"
Upload Method:
- Upload 'better-search-replace.php' to the '/wp-content/plugins/' directory
- Activate the plugin through the 'Plugins' menu in WordPress
- Improvement: WordPress 5.6 and PHP 8 compatible
- Fix: Strings that have been serialized twice showing up as false-positives
- Fix: Some special characters interfering with search/replace
- Security: Pass template filenames through
sanitize_file_name()
- Security: Verify nonce when downloading diagnostic info
- Fix: Only one table searched on some environments (props @Ov3rfly)
- Tweak: Update text in sidebar
- Improvement: Updated sidebar and added pro version discount
- Fix: Outdated links to old website
- Fix: Prevent requests to invalid tabs
- Fix: CSS not loaded on details page
- Fix: Bug with case-insensitive searches in serialized objects
- Fix: Bug with early skip due to lack of primary key
- Fix: Bug with report details
- Fix: Untranslateable string
- Tweak: Check BSR_PATH instead of ABSPATH to be consistent
- Tested with 4.4
- Removed unused code/small cleanup
- Improved progress bar info and styles
- Small cleanup
- Added "Settings saved" notice when saving settings
- Fixed bug with wp_magic_quotes interfering with some search strings
- Fixed bug with searching for backslashes
- Fixed potential bug with getting tables in large multisites
- Fixed potential notice in append_report
- Improved handling of missing primary keys
- Fixed AJAX conflict with WooCommerce
- Fixed a few issues with translations
- Tweaked "System Info" to use get_locale() instead of WP_LANG constant
- Updated German translation (props @Linus Ziegenhagen)
- Fixed minor issue with display of progress bar
- Updated translation file
- Switched to AJAX bulk processing for search/replaces
- Decreased minimum "Max Page Size" to 1000
- Added "Help" tab with system info for easier troubleshooting
- Added ability to change max page size
- Decreased default page size to prevent white screen issue on some environments
- Added ability to change capability required to use plugin
- Small bugfixes and translation fixes
- Added table sizes to the database table listing
- Added French translation (props @Jean Philippe)
- Added support for case-insensitive searches
- Added German translation (props @Linus Ziegenhagen)
- Potential security fixes
- Fixed issue with searching for special characters like ''
- Fixed bug with replacing some objects
- Fixed untranslateable strings on submit button and submenu page.
- Fixed issue with loading translations and added Spanish translation (props Eduardo Larequi)
- Fixed bug with reporting timing
- Updated to use "Dry Run" as default
- Added support for WordPress Multisite (see FAQs for more info)
- Initial release