为什么要从 WordPress 配置中删除 Define('RELOCATE',true) ?
似乎使用 define('RELOCATE') 命令是使用本地数据库和网络服务器,然后上传到生产环境。否则,需要执行 SQL REPLACE 命令来更新帖子、媒体和其他内容中的所有 URL。
Wordpress 法典明确指出必须将其删除,但有时删除后,链接会恢复到开发服务器。有删除的理由吗?安全似乎不应该是问题,也许是性能?
谢谢, 乔纳森
It seems that using the define('RELOCATE') command is a convenient tool to perform site development using a local database and webserver, then to upload into production. Otherwise, its necessary to perform SQL REPLACE commands to update all the URLs in the posts, media and other content.
The Wordpress codex specifically states that it must be removed, but occasionally after removing, the links revert back to the dev server. Is there a reason for removal? it doesn't seem that security should be the issue, perhaps performance?
Thanks,
Jonathan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您删除它的原因是
define('RELOCATE',true);
会将您网站的每个访问者指向管理员登录名。如果您仍然被重定向到开发服务器,那么您需要重新配置数据库。
The reason you remove it is because
define('RELOCATE',true);
will point every visitor of your site to the admin login.If you are still getting re-directed to the dev server then you need to re-configure your database.