为什么要从 WordPress 配置中删除 Define('RELOCATE',true) ?

发布于 2024-09-19 02:27:57 字数 284 浏览 3 评论 0原文

似乎使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

坦然微笑 2024-09-26 02:27:57

您删除它的原因是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文