php 本地主机 wp-admin 的 Wordpress-url 不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28073035/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 23:40:51  来源:igfitidea点击:

Wordpress- url for localhost wp-admin is not working

phpwordpress.htaccesswordpress-theming

提问by Manoj Gupta

I am working in a project with wordpress, it was working properly but I think I have changed some setting in wordpress setting-general option.

我正在一个 wordpress 项目中工作,它工作正常,但我想我已经更改了 wordpress setting-general 选项中的一些设置。

So now when I type localhost/wordpress-demo/wp-admin/then it redirected me to http://localhost/wordpress-Demo/Home/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%2Fwordpress-Demo%2Fwp-admin%2F&reauth=1url.

所以现在当我输入时,localhost/wordpress-demo/wp-admin/它会将我重定向到http://localhost/wordpress-Demo/Home/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%2Fwordpress-Demo%2Fwp-admin%2F&reauth=1url。

wordpress-demois my root folder that I have created

wordpress-demo是我创建的根文件夹

but it is giving me error like this:

但它给了我这样的错误:

Not Found

The requested URL /wordpress-Demo/Home/wp-login.php was not found on this server.

在此服务器上找不到请求的 URL /wordpress-Demo/Home/wp-login.php。

I have typed Homein somewhere setting. So can you please give me some suggestion for work it properly and give me the name of url-mapping file name.

我在某个地方输入了Home。所以你能给我一些正确工作的建议,并给我 url-mapping 文件名的名称。

回答by Cal Evans

If you can't get to your admin page then you will have to use a database tool to check this.

如果您无法进入管理页面,则必须使用数据库工具进行检查。

In a database tool (phpMyAdmin will work) enter this:

在数据库工具(phpMyAdmin 可以工作)中输入:

select * from wp_options where option_name='siteurl' or option_name='home';

These are the 2 places that WordPress stores your URL. See if either of them have /home/ in it. If so, correct it and it should fix the problem.

这些是 WordPress 存储您的 URL 的 2 个地方。看看它们中是否有 /home/ 。如果是这样,请更正它,它应该可以解决问题。

Cheers!

干杯!

=C=

=C=

回答by mrjhon01

Login in phpmyadmin > wp_options > edit the value for site_url and home_url to your site;

登录 phpmyadmin > wp_options > 将 site_url 和 home_url 的值编辑到您的站点;

This occur needs to be changed when you're migrating. If still not working try renaming your .htaccess in root directory.

迁移时需要更改这种情况。如果仍然无法正常工作,请尝试在根目录中重命名 .htaccess。