Better Search Replace

Опис

При перенесенні вашого сайту WordPress на новий домен або сервер, ви, швидше за все, зіткнетеся з необхідністю виконати пошук/заміну в базі даних, щоб все працювало коректно. На щастя, для цього завдання існує кілька плагінів, проте всі вони мають різний підхід до кількох ключових функцій. Цей плагін об’єднує найкращі можливості цих плагінів, об’єднуючи наведені нижче функції в одному простому плагіні:

  • Підтримка серіалізації для всіх таблиць
  • Можливість вибору конкретних таблиць
  • Можливість запустити “пробний запуск”, щоб побачити, скільки полів буде оновлено
  • Жодних вимог до сервера, окрім запущеної інсталяції WordPress
  • Мультисайтова підтримка WordPress

Функції, що заощаджують час, доступні у версії Pro:

  • Можливість переглянути, що саме змінилося під час пошуку/заміни
  • Резервне копіювання та імпорт бази даних під час виконання пошуку/заміни
  • Пріоритетна підтримка електронною поштою від розробника плагіна
  • Збереження або завантаження власних профілів для швидкого повторення пошуку/заміни в майбутньому
  • Підтримка та оновлення протягом 1 року

Дізнатись більше про Better Search Replace Pro

Функція пошуку та заміни значною мірою базується на чудовому скрипті з відкритим вихідним кодом Search Replace DB, модифікованому для використання функцій власної бази даних WordPress для забезпечення сумісності.

Підтримувані мови

  • Англійська
  • Французька
  • Німецька
  • Іспанська

Хочете зробити свій внесок?

Не соромтеся відкривати проблему або надсилати запит на GitHub.

Скріншоти

  • Сторінка Better Search Replace додана в меню “Інструменти”
  • Після виконання пробного запуску пошуку/заміни.

Встановлення

Встановлюйте Better Search Replace так само, як ви встановлюєте будь-який інший плагін WordPress.

Встановлення з Майстерні:

  1. Увійдіть до адмін-панелі WordPress і перейдіть до розділу Плагіни -> Додати новий
  2. Введіть “Better Search Replace” в рядку пошуку та виберіть цей плагін
  3. Натисніть “Встановити”, а потім “Активувати плагін”

Метод завантаження:

  1. Розпакуйте плагін і завантажте папку “better-search-replace” у вашу директорію ‘wp-content/plugins’
  2. Активуйте плагін через меню “Плагіни” в WordPress

Часті питання

Використання Better Search Replace

Після активації Better Search Replace додасть сторінку в меню “Інструменти” в адмінці WordPress.

Чи підтримується мій хост?

Так! Цей плагін має бути сумісним з будь-яким хостом.

Чи можу я пошкодити свій сайт за допомогою цього плагіна?

Так! Введення неправильного рядка пошуку або заміни може пошкодити вашу базу даних. Тому перед використанням цього плагіна завжди рекомендується створювати резервну копію бази даних.

Як це працює на мультисайтах WordPress?

When this plugin is installed on a WordPress multisite network:

  • Subsite administrators can only search and replace within tables that belong to that subsite by visiting Dashboard > Tools > Better Search Replace from WP Admin of the subsite.
  • Network administrators (i.e. Super Admins) and administrators of the primary site can search and replace across all tables in the multisite network by visiting Dashboard > Tools > Better Search Replace from WP Admin of the primary site.

To change which users have access to the plugin, the user capability can be modified via code using the bsr_capability filter.

Як я можу використовувати цей плагін під час зміни URL-адрес?

Якщо ви переносите свій сайт з одного сервера на інший і змінюєте URL-адресу вашої інсталяції WordPress, описаний нижче підхід дозволить вам зробити це легко, не впливаючи на старий сайт:

  1. Створіть резервну копію бази даних на вашому поточному сайті
  2. Встановіть базу даних на новий хост
  3. На новому хості визначте нову URL-адресу сайту у файлі wp-config.php, як показано тут
  4. Увійдіть за новою URL-адресою адміністратора та запустіть Better Search Replace, щоб замінити стару URL-адресу сайту на нову URL-адресу
  5. Видаліть константу site_url, яку ви додали до wp-config.php. Вам також може знадобитися відновити ваш .htaccess, перейшовши в Налаштування – > Постійні посилання та зберігши налаштування.

Більше інформації про перенесення WordPress можна знайти тут.

Відгуки

14.04.2025
This is the standard for Find-and-Replace functions on your WordPress site.The ‘Dry Run’ setting is awesome, allowing you to see how many items will be updated prior to replacing ‘Live’.If you know of a more developer friendly and robust plugin, we want to know!
27.03.2025
It doesn’t find some or all URLs apparently (doesn’t work for me and there are many open issues about that). I’ve posted about this in a support thread opened by someone with the same problem, but they decided to remove my post (apparently it’s a problem if 2 people with the same issue post in the same thread), so I would have to write again from scratch all the explanation of my problem to open another thread. I’m going to use another plugin instead.
11.03.2025
Does what it says it does (5 stars) A rare occasion where a good plugin stays good and doesn’t clutter its own pages or worse; the entire site with upsells and advertisements. Oh right, and it refrains from opting you in for the frequent, unsollicited bulk spam that so many freemium plugins waste your time with these days
19.02.2025
This plugin is a must-have for any WordPress user who needs to make bulk database changes without hassle. Its interface is simple yet powerful, allowing you to search and replace across tables safely and efficiently. I’ve used it multiple times to update URLs after migrations and fix database entries, and it has always worked flawlessly. Plus, the dry-run option before executing changes is a great feature. Highly recommended! A must-have in my WordPress toolkit! ———————————————————————————- Spanish Este plugin es una herramienta esencial para cualquier usuario de WordPress que necesite realizar cambios masivos en la base de datos sin complicaciones. Su interfaz es sencilla, pero potente, permitiendo buscar y reemplazar en tablas de forma segura y eficiente. Lo he utilizado en varias ocasiones para actualizar URLs tras migraciones y corregir datos en la base de datos, y siempre ha funcionado a la perfección. Además, la opción de prueba antes de ejecutar los cambios es un gran acierto. Totalmente recomendado. ¡Un imprescindible en mi caja de herramientas de WordPress!
Прочитати всі 535 відгуків

Учасники та розробники

“Better Search Replace” — проект з відкритим вихідним кодом. В розвиток плагіну внесли свій вклад наступні учасники:

Учасники

“Better Search Replace” було перекладено на 32 локалізації. Дякуємо перекладачам за їх роботу.

Перекладіть “Better Search Replace” на вашу мову.

Цікавитесь розробкою?

Перегляньте код, перегляньте сховище SVN або підпишіться на журнал розробки за допомогою RSS.

Журнал змін

1.4.10 – January 14, 2025

  • Fix: Improved security and stability

1.4.9 – October 4, 2024

  • Security: The plugin now uses its own update mechanism from WP Engine servers
  • New: Dependencies have been updated

1.4.8 – September 3, 2024

  • No changes as this was a pro-only release for Better Search Replace Pro

1.4.7 – May 30, 2024

  • Fix: The case-insensitive setting once again allows case-insensitive strings to be matched within serialized data, fixing a regression introduced in version 1.4.6

1.4.6 – April 17, 2024

  • Changed: Serialized text strings are now only deserialized when containing a match, resulting in faster performance
  • Security: Table names are now escaped when displaying search results

1.4.5 – January 18, 2024

  • Security: Unserializing an object during search and replace operations now passes 'allowed_classes' => false to avoid instantiating the object and potentially running malicious code stored in the database (thanks to Wordfence for responsible disclosure on December 18, 2023 followed by development and testing of the fix by WP Engine)
  • Fix: A regression in version 1.4.4 which caused some search results to be skipped has been fixed to ensure only numeric keyed objects are skipped

1.4.4 – December 14, 2023

  • Fix: Objects with numerical properties are now skipped to avoid causing errors

1.4.3 – September 5, 2023

  • New: Links to plugin documentation, support, feedback, and changelog are now available in the footer of WP Admin
  • Improvement: PHP 8.2 and Better Search Replace are now compatible

1.4.2 – January 11, 2023

  • Security: Arbitrary tab templates in the templates directory can no longer be loaded using a query parameter.

1.4.1 – July 25, 2022

  • Security: Selected tables are now confirmed to exist before processing the request

1.4 – April 7, 2022

  • New: Better Search Replace has a brand new user interface
  • Improvement: Default capability required to use the plugin has changed from “install_plugins” to “manage_options” for compatibility with DISALLOW_FILE_MODS

1.3.4 – December 7, 2020

  • Improvement: WordPress 5.6 and PHP 8 compatible
  • Fix: Strings that have been serialized twice showing up as false-positives

1.3.3 – February 26, 2019

  • Fix: Some special characters interfering with search/replace
  • Security: Pass template filenames through sanitize_file_name()
  • Security: Verify nonce when downloading diagnostic info

1.3.2 – January 3, 2018

  • Fix: Only one table searched on some environments (props @Ov3rfly)
  • Tweak: Update text in sidebar

1.3.1 – September 14, 2017

  • Security: Check if data is serialized before unserializing it
  • Improvement: Increased size of table select

1.3 – November 10, 2016

  • Improvement: Updated sidebar and added pro version discount
  • Fix: Outdated links to old website
  • Fix: Prevent requests to invalid tabs

1.2.10 – June 2, 2016

  • Fix: CSS not loaded on details page

1.2.9 – December 8, 2015

  • Fix: Bug with case-insensitive searches in serialized objects
  • Fix: Bug with early skip due to lack of primary key

1.2.8 – November 25, 2015

  • Fix: Bug with report details

1.2.7 – November 24, 2015

  • Fix: Untranslateable string
  • Tweak: Check BSR_PATH instead of ABSPATH to be consistent
  • Tested with 4.4

1.2.6

  • Removed unused code/small cleanup

1.2.5

  • Improved progress bar info and styles
  • Small cleanup

1.2.4

  • Added “Settings saved” notice when saving settings
  • Fixed bug with wp_magic_quotes interfering with some search strings

1.2.3

  • 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

1.2.2

  • 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)

1.2.1

  • Fixed minor issue with display of progress bar
  • Updated translation file

1.2

  • Switched to AJAX bulk processing for search/replaces
  • Decreased minimum “Max Page Size” to 1000
  • Added “Help” tab with system info for easier troubleshooting

1.1.1

  • Added ability to change max page size
  • Decreased default page size to prevent white screen issue on some environments

1.1

  • Added ability to change capability required to use plugin
  • Small bugfixes and translation fixes

1.0.6

  • Added table sizes to the database table listing
  • Added French translation (props @Jean Philippe)

1.0.5

  • Added support for case-insensitive searches
  • Added German translation (props @Linus Ziegenhagen)

1.0.4

  • Potential security fixes

1.0.3

  • Fixed issue with searching for special characters like ‘\’
  • Fixed bug with replacing some objects

1.0.2

  • Fixed untranslateable strings on submit button and submenu page.

1.0.1

  • 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)

1.0

  • Initial release