在WordPress中迁移小部件设置 [英] Migrating Widget Settings in WordPress

查看:73
本文介绍了在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数据库,使用活动域查找/替换本地主机,将数据库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.

更全面的答案以及一些其他方法来移动数据库并保留序列化数据:

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中迁移小部件设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆