You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

WordPress全账号无法登录,数据库可见用户但验证失败技术求助

Troubleshooting WordPress Login & Password Reset Failures

Hey there, let's work through this frustrating login issue you're stuck with. Since you already have access to phpMyAdmin, we can focus on database-level fixes and common pitfalls that cause these "invalid username/email" errors—even when users clearly exist in the wp_users table.

1. Fix the Password Hash (Critical Step!)

WordPress stores passwords as hashed strings, not plain text. If you just typed a plain password into the user_pass field in wp_users, that's why your login attempts are failing. Here's how to fix it properly:

  • Open phpMyAdmin, navigate to your wp_users table
  • Find your user row and click "Edit"
  • For the user_pass field:
    • Select MD5 from the "Function" dropdown (this is a legacy but reliable method for quick testing; for production, generate a proper WordPress password hash using a tiny local PHP script: echo wp_hash_password('your-new-password');)
    • Type your desired plain password into the value box next to the MD5 function
  • Save the changes, then try logging in again

2. Double-Check Database Connection & Table Prefix

Even though you can see the wp_users table, it's worth confirming WordPress is pointing to the right database resources:

  • Access your site's files via FTP or cPanel File Manager, open wp-config.php
  • Verify these values match your actual database details:
    • DB_NAME: Exact name of your WordPress database
    • DB_USER: Database user with full permissions to this DB
    • DB_PASSWORD: Correct password for that database user
    • $table_prefix: Ensure this matches the prefix of your user tables (e.g., if your table is mywp_users, the prefix should be mywp_)

3. Validate User Account Status

A disabled or malformed user entry can block logins silently:

  • In phpMyAdmin's wp_users table, check the user_status column for your user—it must be set to 0 (a value of 1 means the account is disabled)
  • Scan the user_login and user_email fields for extra spaces, typos, or special characters that might break matching during login/reset
  • Confirm the user_registered date is a valid timestamp (not empty or garbled)

4. Rule Out Cache & Plugin Conflicts

Cached data or misbehaving plugins can interfere with login logic:

  • If you can access your site's wp-content/plugins folder, rename it to plugins-disabled to temporarily turn off all plugins
  • Clear server-side caching (like Redis, Memcached, or your host's built-in cache) and your browser's cache
  • Try logging in or resetting your password again after these steps

5. Fix Password Reset Email Matching

If resetting via email still fails, ensure WordPress can properly match your email to your account:

  • In phpMyAdmin, run this SQL query (replace placeholders with your actual details):
    SELECT * FROM wp_users WHERE user_email = 'your-email@example.com' OR user_login = 'your-username';
    
    If this returns your user row, copy-paste the exact username/email from the query when requesting a password reset—typos (even subtle ones like extra spaces) are a common culprit here

内容的提问来源于stack exchange,提问作者Clas Östman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:46:53