【问题标题】:My wordpress website not found after I amended coding at Index.php我在 Index.php 修改编码后找不到我的 wordpress 网站
【发布时间】:2018-01-26 02:13:23
【问题描述】:

我在 WP Root 中的 index.php 中插入了以下代码:

update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );

更改我的 wordpress 网址并没有帮助,而是将我的 wordpress 变为 404 not found。而且我无法访问我的 wordpress 管理员,尝试过 login.php 也一样。 我确实删除了编码,但网站仍然保持不变。

【问题讨论】:

  • 您将此代码放入哪个index.php?主题是 index.php 还是 WP 根目录中的 index.php?也许您将它放在文件顶部,而 WP 的其余部分甚至都没有加载。
  • WP 根目录中的 index.php
  • 您不应该编辑根目录的 index.php。试着把它放在你主题的functions.php中

标签: php wordpress url


【解决方案1】:

你读过这篇吗,Changing The Site URL

没有提到你必须编辑 index.php。

您可以在编辑代码后尝试清除缓存并尝试重新加载您的网站。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-09-17
    • 1970-01-01
    • 2023-02-05
    • 2012-10-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多