需要帮助更改 WordPress 中的永久链接,我已经尝试了一切

发布于 2024-08-24 06:25:56 字数 290 浏览 3 评论 0原文

我在使用 Wordpress 实例更改固定链接时遇到问题。我有大约 5 篇博客文章,它们是使用默认的“postid”永久链接创建的。我现在尝试将我的永久链接更改为 %postname% 但我无法让它工作。每当我更改 WordPress 中的永久链接时,我所有的旧帖子都会抛出 404。我已经尝试了 4 个 WordPress 永久链接插件来解决这个问题,但我无法让它们中的任何一个正常工作。我还更新了博客的 .htaccess 文件以包含必要的信息。最后我删除了所有原来的帖子并更改了固定链接,然后重新创建了它们,但它仍然不起作用。请帮忙,我不知道还能尝试什么!谢谢

I am having problems getting my Permalinks changed with my Wordpress instance. I have about 5 blog posts which were created using the default "postid" permalinks. I am now trying to change my permalink to %postname% but I cannot get it to work. Any time I change the Permalinks in Wordpress all my old posts throw 404s. I have tried 4 Wordpress Permalink plugins to resolve this issue but I cannot get any of them to work. I have also updated my blog's .htaccess file to include the necessary information. Finally I deleted all my original posts and changed the Permalink, then recreated them and it still did not work. Please help, I don't know what else to try! Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(5

苯莒 2024-08-31 06:25:57

阅读本文将对权限和 PHP 处理程序有很大帮助。我在这里遇到了一些问题...只是想分享它

http://www.itsabhik.com/how-to-increase-size-of-var-tmp-centos/

Reading this article will help a lot with permissions and PHP handlers. I had some of the problems here... just thought I'd share it

http://www.itsabhik.com/how-to-increase-size-of-var-tmp-centos/

马蹄踏│碎落叶 2024-08-31 06:25:56

确保 .htaccess 中只有一个 WordPress 重写块。您可能需要使用 phpmyadmin 进入数据库中的 wp_options 表并清除那里的永久链接设置。有时,永久链接设置会“卡在”wp_options 表中,并且 WordPress 无法将新设置写入数据库,即使 WP 将更改写入 .htaccess 文件。 数据库描述 « WordPress Codex

编辑 3/03/10

结果是大多数情况下,CentOS 与 Wordpress 固定链接的配合不太好,但 Google 提供了已记录的修复程序。

编辑 3/02/10

如果您的 .htaccess 可写并且正在保存更改并且您可以看到它们,则 wp_options 中的 permalink_struct 字段不应为空。您是否禁用并删除了所有与永久链接相关的插件并从头开始?您使用的是 Windows 还是 Linux 主机?

Be sure there is only one wordpress rewrite block in .htaccess. And you may need to go into the wp_options table in the database with phpmyadmin and clear the permalink setting there. Once in a while permalink settings get "stuck" in the wp_options table and wordpress can't write the new setting to the database, even though WP writes the changes to the .htaccess file. Database Description « WordPress Codex

Edit 3/03/10

Turned out to be mostly CentOS not playing nice with Wordpress Permalinks, but there are documented fixes via Google.

Edit 3/02/10

If your .htaccess is writable and changes are being saved and you can see them, then permalink_structure field in wp_options should not be blank. Did you disable and delete all plugins relating to permalinks and start from scratch? Are you on Windows or Linux hosting?

芯好空 2024-08-31 06:25:56

我遇到了完全相同的问题,而且很微妙。 apache 指令需要放入 容器中。如果您像我一样,您的指令位于 容器中,认为 会递归地从根开始覆盖整个网站。

这做到了这一点:

<Directory /path/to/wordpress>
    AllowOverride All
    Options FollowSymLinks
</Directory>

I had the exact same issue, and it's subtle. The apache directives need to go in a <Directory> container. If you are like me, you had your directive in a <Location> container, thinking that <Location /> would cover the entire site from the root, recursively.

This did the trick:

<Directory /path/to/wordpress>
    AllowOverride All
    Options FollowSymLinks
</Directory>
我只土不豪 2024-08-31 06:25:56

使用 Deans 永久链接迁移插件,您将轻松更改永久链接结构,而不会在一分钟内破坏任何链接。对于那些正在考虑更改默认永久链接结构并考虑从 blogspot 博客迁移到自托管博客的人来说,这个插件是一个救星。

Use deans permalink migration plugin and you will easily change your permalink structure without breaking any links within a minute. This plugin is a life saver for those who are thinking of changing default permalink structure and thinking of migrating from blogspot blog to self-hosted blog.

落墨 2024-08-31 06:25:56

我知道这是一个旧线程,但我昨晚遇到了这个问题。我在这里找到了一篇文章 http://www.mobiledataup .com/fix-wordpress-permalink-404-error-with-centos-6/

这非常有帮助,并为我解决了问题。

有一个额外的部分可以选择打开AllowOverride。

工作起来就像一个魅力。

I know this is an old thread but I ran into this issue last night. I found a post here http://www.mobiledataup.com/fix-wordpress-permalink-404-error-with-centos-6/

which was very help and fixed the probem for me.

There was an extra section that had options to turn on AllowOverride.

Worked like a charm.

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