Wordpress帖子没有显示出来

时间:2009-12-15 12:25:51

标签: php wordpress

我最近将我的wordpress移到了新主机上,我在主页上收到以下错误:

Not Found
Sorry, but you are looking for something that isn't here.

相应的代码(在index.php中)是:

<?php if (have_posts()) : while(have_posts()) : the_post(); ?>
    ...

<?php endwhile; else: ?>
  <h2 class="center">Not Found</h2>
  <p class="center">Sorry, but you are looking for something that isn't here.</p>
  <?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>

我不明白为什么它没有找到任何要显示的帖子?

我真的很感激任何帮助。非常感谢!

4 个答案:

答案 0 :(得分:1)

要检查的一些事项:

  • 主页设置为查看帖子(设置&gt;阅读)
  • 已设置正确的主题(外观&gt;主题)
  • 域名对于新主机是正确的 - 它不会将您转发回旧域。 (设置&gt;一般)

另一种选择是使用新的wordpress设置再次启动并使用工具&gt;出口和工具&gt;导入您可以传输所有旧内​​容。

希望有所帮助。 约什

答案 1 :(得分:1)

检查/删除.htaccess并重置永久链接。 Moving WordPress « WordPress CodexUsing Permalinks « WordPress Codex

答案 2 :(得分:0)

如果您切换主机,我要检查的第一件事就是存储在wp-config.php文件中的数据库连接字符串。

您需要使用新数据库的路径/用户/密码进行更新。

答案 3 :(得分:0)

停用所有插件。确保已成功传输所有WordPress文件。在选项中重新保存永久链接结构&gt;固定链接。

相关问题