WordPress - 从一台主机移动到另一台主机 [英] WordPress - moving from one host to another

查看:37
本文介绍了WordPress - 从一台主机移动到另一台主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 WordPress 安装从一台服务器移动到另一台服务器,包括所有 SQL 数据和文件系统数据(照片、模板文件).

I am trying to move a WordPress installation from one server to another one, including all of the SQL data, and the file-system data (photos,template files).

我只是在更改数据库中的 URL 时遇到问题,因为我需要用旧 URL 替换新 URL.

I just have a problem changing the URLs in the database, since I need to replace the new URL with the old one.

我很想就如何替换 URL 提出一些建议(也许 SQL 中有一个 rplace 语句?)

I would love to have some suggestions about how can I replace the URLs (maybe there's a rplace statement in SQL?)

提前致谢.

推荐答案

Edit 5/16/2015

最好使用 interconnectit.com WordPress Serialized PHP Search替换工具以查找/替换数据库中的 URL 并正确反序列化/重新序列化该数据.在文本转储中或使用下面的 UPDATE 查询进行查找/替换将破坏序列化数据.

It's much better to use interconnectit.com WordPress Serialized PHP Search Replace Tool to find/replace URLs in the database and to correctly deserialize/reserialize that data. Doing a find/replace in a text dump or with the UPDATE queries below will break serialized data.

几个简单的方法:如何将 WordPress 博客移动到新的域或位置 » 我的数字生活:

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';

和其他人:如何在更改域时使用 SQL 在 WordPress MySQL 数据库中查找和替换文本 » 我的数字生活

搜索 RegEx « WordPress 插件 以作为 WP 搜索帖子和页面基于插件的方式来替换帖子和页面中的图片和其他 URL.

Search RegEx « WordPress Plugins for grepping through posts and pages as a WP plugin-based way to replace image and other URLs in posts and pages.

还有 移动 WordPress « WordPress Codex.

这篇关于WordPress - 从一台主机移动到另一台主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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