最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Widgets are not showing after moving domain

programmeradmin4浏览0评论

I recently moved my wordpress installation to a new domain. Everything worked fine; all my images, posts and plugins copied across fine. My widget setup seems to be gone after moving domain. I can see the setup in the database but nothing on the page. Is it some manual thing you have to do to get the widgets to follow?

I recently moved my wordpress installation to a new domain. Everything worked fine; all my images, posts and plugins copied across fine. My widget setup seems to be gone after moving domain. I can see the setup in the database but nothing on the page. Is it some manual thing you have to do to get the widgets to follow?

Share Improve this question edited Feb 20, 2012 at 15:20 Scott 12.3k15 gold badges68 silver badges99 bronze badges asked Dec 22, 2011 at 8:34 PaparappaPaparappa 1034 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

Redrag and drop them in the widgets area.

Put this function into functions.php in the wp-include folder:

function maybe_unserialize( $original ) {
    if ( is_serialized( $original ) ) {
        $fixed = preg_replace_callback(
            '!(?<=^|;)s:(\d+)(?=:"(.*?)";(?:}|a:|s:|b:|i:|o:|N;))!s',
            'serialize_fix_callback',
            $original );
        return @unserialize( $fixed );
    }
    return $original;
}
function serialize_fix_callback($match) { return 's:' . strlen($match[2]); }
发布评论

评论列表(0)

  1. 暂无评论