复制了所有文件,并备份了MySQL数据库并将其还原到新服务器。除了"更多类型"以外,其他一切似乎都运转良好。插入。甚至它的姐妹插件" More Fields"工作正常。
有没有其他人遇到过这个问题,如果有的话你是怎么解决的?
答案 0 :(得分:2)
MySQL备份和恢复如何? 你在新服务器上运行更新查询? 像这样:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
/**
After that you will need to fix URLs of the WordPress posts and pages, which translated from post slug, and stored in database wp_posts table as guid field. The URL values in this field are stored as abolute URLs instead of relative URLs, so it needs to be changed with the following SQL query:
**/
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
/**
If you have linked internally within blog posts or pages with absolute URLs, these links will point to wrong locations after you move the blog location. Use the following SQL commands to fix all internal links to own blog in all WordPress posts and pages:
**/
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
答案 1 :(得分:1)
哈哈发现了这个问题。选项表包含选项值的字符串长度值,因此更改域值而不更改字符串长度值会破坏插件。
此:
s:23:"http://old-domain.com"
成为:
s:23:"http://my-new-domain.com"
s:23无效,也需要更改。解决这个问题的一种方法是将插件选项的所有完整路径更改为相对路径......这就是我所做的;)