简体   繁体   English

wordpress 页面永久链接在本地不起作用

[英]wordpress page permalink is not working on local

I have wordpress website on server, created pages and that's working fine, but when I download wordpress files and DB on local and want to run with localhost, permalinks for pages are not working.我在服务器上有 wordpress 网站,创建了页面并且工作正常,但是当我在本地下载 wordpress 文件和数据库并希望使用 localhost 运行时,页面的永久链接不起作用。

It seems this is an old post, but this might help others that encounter same error.这似乎是一个旧帖子,但这可能会帮助遇到同样错误的其他人。

Select: Select:

Apache –> Apache Modules –> and that will display the lists of available modules. Apache –> Apache Modules –> 这将显示可用模块的列表。

Now just check rewrite_module .现在只需检查rewrite_module

source from WordPress Custom Permalink not Working in Localhost来源WordPress 自定义永久链接在 Localhost 中不起作用

Hope that helps.希望有帮助。

Sometimes when copying from one server to another, wordpress' permalinks goes a little screwy, try setting them back to default (using the admin panel) and then setting them again to your desired permalink structure (being sure to apply the changes each time).有时,当从一台服务器复制到另一台服务器时,wordpress 的永久链接会有点麻烦,尝试将它们设置回默认值(使用管理面板),然后再次将它们设置为所需的永久链接结构(确保每次都应用更改)。

You can simply fix this by doing the following:您只需执行以下操作即可解决此问题:

  1. Go to settings in your WordPress site. Go 到您的 WordPress 站点中的设置。

  2. click on permalinks ( You will see the URL structures of your newly configured WP site. (if it shows your original website values, go to settings-> general and set your local site URLs单击永久链接(您将看到新配置的 WP 站点的 URL 结构。(如果它显示您的原始网站值,go 到设置-> 常规并设置您的本地站点 URL

  3. Don't do any changes, just click on the Save button.不要做任何更改,只需单击“保存”按钮。

  4. Refresh your local site and click on your page link or post.刷新您的本地站点并单击您的页面链接或帖子。

you need to go into the database and change a few options.您需要将 go 放入数据库并更改一些选项。

Goto your phpmyadmin installation and navigate to wp-options table.转到您的 phpmyadmin 安装并导航到wp-options表。 Change the siteurl and home options to your localhost address.siteurl和 home 选项更改为您的localhost地址。

Wordpress needs these database tries to build your permalinks. Wordpress 需要这些数据库尝试构建您的永久链接。 If they are wrong, then it will direct your links to incorrect locations.如果它们是错误的,那么它会将您的链接指向不正确的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM