开发者

Migrating Widget Settings in 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.

I'll dump the MySQL database, find/replace localhost with the live domain, SSH the database up t开发者_Go百科o 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.

What am I missing?


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


To move a wordpress site and to reconvert all serialized data I used this script. the using is very simple, download the script, change the credential variable to the database inside the php script and run it.

link to download the script: http://davidcoveney.com/575/php-serialization-fix-for-wordpress-migrations/

work fine.


Don't do it manually!

Dont edit database manually when migrating between different domains!
Use small scripts, like this: Wordpress-Migrator.php (read description too.)

because SERIALIZED arrays needs to be modified specifically too!!!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜