Migrating Widget Settings in WordPress(在 WordPress 中迁移小部件设置)
问题描述
我在工作中和其他地方完成了很多从一台服务器到另一台服务器的 WordPress 迁移,但我一直无法理解的一件奇怪的事情是为什么小部件设置永远不会被继承.
I've done a lot of WordPress migrations from one server to another at work and elsewhere, but one strange thing I've never been able to understand is why widget settings never get carried over.
我将转储 MySQL 数据库,用实时域查找/替换 localhost,将数据库通过 SSH 连接到实时服务器,然后 ftp 整个 WP 安装(核心和主题,从我的本地计算机),仍然是小部件设置被清除.有时,我在仪表板中创建的主题选项页面中保存的值也是如此.
I'll dump the MySQL database, find/replace localhost with the live domain, SSH the database up to the live server, and then ftp the whole WP installation (core and theme, from my local machine), and still the widget settings are wiped out. And sometimes this is also the case with values saved in theme options pages I make in the Dashboard.
我错过了什么?
推荐答案
Wordpress 存储小部件选项 - 一些插件和主题也存储它们的选项 - 作为序列化数据,因此您必须比完整的查找/替换更加小心的网址.
Wordpress stores widget options - and some plugins and themes also store their options - as serialized data, and so you have to be more careful than a full find/replace of the URLs.
更全面的答案和其他一些移动数据库和保留序列化数据的方法:https://wordpress.stackexchange.com/questions/9076/why-is-my-database-import-losing-text-widget-data
Much more comprehensive answer and some other ways to do move databases and retain serialized data: https://wordpress.stackexchange.com/questions/9076/why-is-my-database-import-losing-text-widget-data
这篇关于在 WordPress 中迁移小部件设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 WordPress 中迁移小部件设置
基础教程推荐
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 在多列上分布任意行 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
