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

访问/wp-admin跳转至异常页面,如何恢复WordPress后台访问权限?

Troubleshooting the Unusual wp-admin Page Showing WP Super Cache Content

Hey there, let's break down what's likely causing this weird behavior and walk through steps to get back to your WordPress dashboard.

Possible Causes & Fixes

1. WP Super Cache is Accidentally Caching Admin Pages

Normally, plugins like WP Super Cache are configured to exclude admin pages from caching—but misconfigurations or glitches can break this. When that happens, you're seeing static cached content instead of the dynamic admin interface.

Fix:

  • Access your site via FTP or your hosting control panel's file manager.
  • Navigate to wp-content/cache and delete all files/folders inside it (this forces the plugin to rebuild fresh cache).
  • If you have command line access, run: rm -rf wp-content/cache/* (double-check the path first!)
  • Try reloading site.com/wp-admin after clearing the cache.

2. Default Admin Entry Was Hidden (Security Measure)

Many developers use security plugins (like iThemes Security, Wordfence, or Hide My WP) to rename/hide the default wp-admin or wp-login.php paths to prevent brute-force attacks. Using the old path will land you on an error or cached garbage.

Fix:

  • First, try accessing the core login page directly: site.com/wp-login.php (most hiding plugins leave this intact, or redirect it to the custom login URL).
  • If that doesn't work, disable all plugins to bypass the hiding feature:
    1. Rename the wp-content/plugins folder to plugins_disabled via FTP/file manager.
    2. This deactivates every plugin, including the one hiding your admin entry.
    3. Now try site.com/wp-admin again—you should see the normal login screen.

3. Corrupted .htaccess File (From WP Super Cache)

WP Super Cache adds rewrite rules to your .htaccess file to serve cached content. If these rules get corrupted, they might redirect admin requests to static cache files instead of the actual WordPress backend.

Fix:

  • Back up your existing .htaccess file (copy it to your computer just in case).
  • Replace the contents of .htaccess with the default WordPress rewrite rules:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
  • Save the file and reload site.com/wp-admin.

4. Restricted Admin Access (Intentional or Accidental)

It's possible the original developer restricted access to the admin area—either via IP whitelisting, modified user permissions, or even deleting your admin account.

Fix:

  • Check user permissions via database:
    1. Access your site's database via phpMyAdmin (your hosting control panel usually has this tool).
    2. Find the wp_users table (your prefix might be different if the developer changed it) and verify your account exists.
    3. If you need to create a new admin account, run this SQL query (replace placeholders):
    INSERT INTO wp_users (user_login, user_pass, user_nicename, user_email, user_registered, user_status, display_name) 
    VALUES ('new_admin', MD5('your_secure_password'), 'New Admin', 'your_email@example.com', NOW(), 0, 'New Admin');
    
    INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) 
    VALUES (NULL, 483678, 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
    
    INSERT INTO wp_usermeta (umeta_id, user_id, meta_key, meta_value) 
    VALUES (NULL, 483678, 'wp_user_level', '10');
    
  • Check IP restrictions: If your hosting has a firewall or the developer used a plugin to whitelist IPs, make sure your current IP is allowed.

Start with the simplest fixes first to save time:

  1. Clear WP Super Cache
  2. Try site.com/wp-login.php
  3. Disable all plugins
  4. Reset .htaccess
  5. Verify user permissions/database

内容的提问来源于stack exchange,提问作者Jackie

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 07:55:28