Better Search Replace

描述

将 WordPress 站点移动到新域或服务器时,您可能需要在数据库上运行 search/replace,以使一切正常工作。 幸运的是,有几个插件可用于此任务,但是,对于一些关键功能,它们都有不同的方法。 该插件整合了这些插件的最佳功能,将以下功能合并到一个简单的插件中:

  • 连播支持所有的表格
  • 选择指定的表格的能力
  • 运行“试运行”以查看将更新多少字段的能力
  • 没有服务器需求来自一个运行安装的WordPress
  • WordPress多站点支持

时间保存功能能够在Pro版本中:

  • 准确查看 search/replace 期间发生的变化
  • 备份以及导入数据库当运行 search/replace
  • 来自开发者的优先邮箱支持
  • 保存或者加载自定义的资料用于快速的重复 search/replace 在一个位置
  • 支持1年的更新

了解更多关于 Better Search Replace Pro

搜索和替换功能在很大程度上基于互连/它是伟大的开源搜索替换数据库脚本,修改为使用 WordPress 本机数据库功能以确保兼容性。

支持的语言

  • 英国
  • 法国
  • 德国
  • 西班牙

想要继续?

请随意提交一个问题或者提交一个请求在GitHub.

屏幕截图

  • The Better Search Replace Page 添加到 ”Tools“ 菜单
  • 在进行了 Search/Replace 试运行之后

安装

安装Better Search Replace 就想你安装其他的WordPress插件一样

Dashboard 方法:

  1. 登陆你的WordPress admin 然后去到 Plugins -> 添加新的
  2. 输入”Better Search Replace” 再搜索栏中并且选择这个插件
  3. 点击“安装”,然后”激活插件“

上传方法:

  1. 解压插件并且上传“better-search-replace”文件夹到你的”wp-content/plugins”目录
  2. 在WordPress中通过插件菜单激活插件

常见问题

使用Better Search Replace

一旦激活,Better Search Replace 会在WordPress 管理员的 “Tools” 菜单页面添加一个页面。

我的主机是否支持?

是的!这个插件应该与任何主机兼容。

这个插件会损坏我的网站吗?

是的!输入错误的搜索或替换字符串可能会损坏您的数据库。因此,始终建议在使用此插件之前备份数据库。

这个怎么用于WordPress 多站点?

在 WordPress 多站点安装上运行此插件时,它只会被网络管理员加载和可见。 网络管理员可以转到任何子站点的仪表板以仅对该子站点的表运行搜索/替换,或者转到主站点/基本站点的仪表板对所有表运行搜索/替换。

当改变URLs的时候我怎么使用插件?

如果您要将站点从一台服务器移动到另一台服务器并更改 WordPress 安装的 URL,以下方法可让您轻松完成,而不会影响旧站点:

  1. 备份你当前站点的数据库
  2. 在你的新主机中安装数据库
  3. 在新主机上,在 wp-config.php 文件中定义新站点 URL,如下所示 这里
  4. 等你到你的新的admin UR 并且运行 Better Search Replace 在老的站点URL 用于新的URL。
  5. 上一个 下一个链接 删除您添加到 wp-config.php 的 site_url 常量。您可能还需要通过转到 Settings -> Permalinks 并保存设置来重新生成 .htaccess。

更多的信息你可以通过WordPress来找到 这里

评价

2024年2月10日
Hace justo lo que se le pide sin complicaciones. Me ha sido de mucha utilidad, lo recomiendo 100%
2024年1月25日 1 回复
I feel misled as the 'dry run' option is NOT part of the free plugin but rather a paid option. Imho 'dry run' is essential in any search and replace plugin so advertising this plugin as 'free' is a bit misleading. Technically this plugin is free but unusable (way to dangerous/powerful) as such.
2023年12月14日 2 回复
I was going to try doing some search and replacements, and chose to do the 'dry run' first, but apparently you can't view the results from the dry run, without upgrading to the paid version. This effectively makes it less than useless. I'm not going to run a search/replace on a table unless I can preview what's going to be changed first.
阅读所有508条评价

贡献者及开发者

“Better Search Replace” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

“Better Search Replace”插件已被翻译至28种本地话语言。 感谢所有译者为本插件所做的贡献。

将“Better Search Replace”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

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

  • 提升:WordPress 5.6 以及 PHP 8 兼容性
  • FIX:已序列化两次的字符串显示为假阳性

1.3.3 – February 26, 2019

  • 修复:某些特殊字符干扰 search/replace
  • 安全:通过末班文件sanitize_file_name()
  • 安全:当下载诊断信息的时候仅验证一次

1.3.2 – January 3, 2018

  • 修复:再一些换进中仅一个表单搜索 (props @Ov3rfly)
  • 优化:在侧边栏更新文字

1.3.1 – September 14, 2017

  • 安全:检查如果数据在为序列化之前序列化它
  • 优化:增加表格选择的尺寸

1.3 – November 10, 2016

  • 提升:更新sidebar 并且添加Pro 版本折扣
  • 修复:Outdated 链接到老的网站
  • 修复:保留对无效的tab的请求

1.2.10 – June 2, 2016

  • 修复:CSS 没有再详情页加载

1.2.9 – December 8, 2015

  • 修复:序列化对象中搜索大小写敏感的错误
  • 修复:由于缺少主要key而导致的早起跳过

1.2.8 – November 25, 2015

  • 修复:带有报告详情的Bug

1.2.7 – November 24, 2015

  • 修复:未翻译的字符串
  • 优化:检查 BSR_PATH 于 ABSPATH 是否一致
  • 通过4.4进行测试

1.2.6

  • 移除不使用的代码/小的cleanup

1.2.5

  • 优化进度条信息以及风格
  • 小的cleanup

1.2.4

  • 添加 “Setting Saved” 当保存设定注意时
  • 修复了wp_magic_qutes干扰某些搜索字符串的错误

1.2.3

  • 修复了反斜杠中的搜索bug
  • 修复了在大型多站点中获取表的潜在错误
  • 修复了 append_report 中的潜在通知
  • 改进了对丢失主键的处理

1.2.2

  • 修复了与 WooCommerce 的 AJAX 冲突
  • 修复了一些翻译上的问题
  • 调整“系统信息”用于使用get_locale() 代替 WP_LANG 常数
  • 更新了德语的翻译 (props @Linus Ziegenhangen)

1.2.1

  • 修复带有进度条的镜像问题
  • 更新翻译文件

1.2

  • 切换AJAX批量进程用于 Search/Replaces
  • 减少最小的”最大页面尺寸” 到1000
  • 添加”Help” tab 带有系统信息用于简单的问题排除

1.1.1

  • 添加能力能够改变最大的页面尺寸
  • 减少默认页面的尺寸来保留白色屏幕的问题再一些环境中

1.1

  • 添加能够改变
  • 小的bug修复以及翻译修复

1.0.6

  • 添加表单大小到数据库表单列表
  • 添加法语翻译 (props @Jean Philippe)

1.0.5

  • 添加对于大小写敏感的搜索
  • 添加德国翻译 (props @Linus Ziegenhagen)

1.0.4

  • 潜在的安全修复

1.0.3

  • 修复了搜索特殊字符 (如‘\’) 时出现的问题
  • 通过替换一些对象修复bug

1.0.2

  • 修复未能翻译的字符串再提交那妞一级子菜单页面

1.0.1

  • 修复了加载翻译和添加西班牙语翻译的问题 (道具Eduardo Larequi)
  • 通过报告时间修复bug
  • 更新将“试运行”作为默认
  • 添加支持用于WordPress多站点(查看FAQs 了解更多信息)

1.0

  • 初始化发布