October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk10 min

How to Fix wp-admin Returning a 404 Error in WordPress

A WordPress wp-admin 404 is usually a URL, rewrite, migration, extension, proxy, or file-integrity problem. Follow this diagnostic sequence to identify the source and restore dashboard access safely.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A 404 at /wp-admin/ usually means WordPress is sending you to the wrong host, scheme, or path, or the server cannot apply the rewrite rules that route requests to WordPress. It can also be caused by a damaged .htaccess file, disabled Apache rewrite support, a plugin or theme conflict, proxy/HTTPS rules, or incomplete core files.

Start by comparing the exact response and URL. Test both https://example.com/wp-admin/ and https://example.com/wp-login.php using your real domain. A logged-out request to /wp-admin/ normally redirects to wp-login.php. If login succeeds but the redirect returns a 404, concentrate on the site URL, subdirectory, cookies, HTTPS, and proxy configuration before changing server files.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Identify what is generating the 404

The appearance and scope of the error determine the safest first test. Record the complete URL, the time it failed, and whether the page is branded by your host/server or by your WordPress theme.

Symptom Most likely area First checks
Plain or server-branded 404 Document root, virtual host, rewrite module, .htaccess, Nginx/IIS rules, or CDN/proxy Confirm the domain points to the correct installation; inspect server routing and rewrite support.
WordPress- or theme-branded 404 home/siteurl, redirects, plugins, themes, or custom login code Compare the live URL with WordPress settings and isolate extensions.
wp-login.php works, but login lands on a 404 Wrong redirect target, host or scheme mismatch, cookies, subdirectory path, HTTPS or proxy rules Check the canonical URL, clear cookies, and inspect the redirect destination.
Only one admin screen fails A plugin, theme, or request-specific rewrite/PHP error Capture the failing path and logs before changing site-wide rules.
The public home page also returns 404 Document root, migration path, DNS/virtual-host mapping, or broad rewrite failure Fix the installation mapping first; an admin-only repair will not solve a site-wide routing problem.

1. Verify the canonical WordPress URL

Write down the URL that should be canonical, including all four details: http versus https, www versus non-www, the domain name, and any installation directory such as /blog. The address visitors use and the address WordPress stores must agree.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Check WP_HOME and WP_SITEURL

Open wp-config.php through SFTP, FTP, or your hosting file manager and look for definitions of WP_HOME and WP_SITEURL. These constants override the values in the database. After a migration, they may still contain the old domain, an old protocol, or a missing subdirectory.

If you intentionally use constants, both values should use the live address and should not include a trailing slash. For a root installation, the pattern is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');

For an installation in /blog, the site URL normally includes that path where WordPress itself is installed. Do not paste these examples unchanged: replace them with the exact address and path used by your installation. Remove duplicate or contradictory definitions only after making a backup.

Check the database values

If constants are not forcing the values, inspect the home and siteurl rows in the WordPress options table with a database tool such as phpMyAdmin. They must match the live scheme, host, and path. A common migration error is leaving http://old-domain.example, a staging hostname, or a root path when the site now runs under a subdirectory.

Change only the URL values you have verified. A typo here can make the front end and dashboard inaccessible, so export the database or take a hosting snapshot first. If the site uses a multisite network, network and site-specific URL values can both matter; use the network’s documented structure rather than treating it as a single-site installation.

2. Test the login endpoint and redirect

Open /wp-login.php directly on the canonical host. If it loads, sign in and note the exact URL displayed after submission. Then open /wp-admin/ in a private browser window. WordPress normally sends logged-out visitors from /wp-admin/ to the login page automatically.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

When login works but the dashboard URL fails

A successful login proves that at least part of WordPress is reachable; it does not prove that the redirect target is correct. Compare the address before and after login. Look for a change between http and https, between www and non-www, or the loss or addition of an installation directory.

Delete cookies for the affected domain, close all related browser tabs, and sign in again. Stale cookies can preserve an old domain or secure/non-secure session and produce a loop or an apparently missing dashboard. If a CDN, reverse proxy, load balancer, or host-level HTTPS redirect is present, verify that it forwards the original host and protocol consistently to WordPress.

Test a specific admin file

As a diagnostic, request /wp-admin/index.php after logging in. If that file works while the directory URL fails, the issue is likely directory handling or a redirect rule rather than missing WordPress core. Do not make the file URL a permanent substitute; fix the routing so normal admin links work.

3. Flush rewrite rules from the dashboard

If any dashboard page remains reachable, use the lowest-risk repair first:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Sign in and open Settings > Permalinks.
  2. Do not change the permalink structure unless you have a reason. Scroll to the bottom and click Save Changes.
  3. Visit the home page, /wp-login.php, and /wp-admin/ again.

Saving this screen makes WordPress regenerate its rewrite rules and, on Apache installations that permit it, rewrite the .htaccess file. It is useful after a migration, plugin change, or server move. If the save operation itself produces a 404, continue with the file and server checks below.

4. Repair Apache .htaccess and rewrite support

On Apache, WordPress commonly uses a file named .htaccess in the installation directory to route requests to index.php. A corrupted file, an incorrect rewrite base, disabled mod_rewrite, or a server that disallows overrides can leave the front end apparently working while admin paths return 404.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Back up and isolate the existing file

  1. Use SFTP, FTP, or the host’s file manager to download .htaccess before editing it. Include hidden files in the file-manager view.
  2. Rename it temporarily to something such as .htaccess.backup. Renaming is reversible and prevents an invalid rule from being executed.
  3. Test the home page, wp-login.php, and wp-admin. If behavior changes, the old file or its interaction with server configuration is implicated.

Use the matching WordPress rule set

For a standard single-site installation at the document root, the usual block is:

# 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

Keep unrelated security, caching, or host directives outside the WordPress markers. If WordPress is installed in a subdirectory, the rewrite base and the destination must include that directory; copying a root-install block unchanged can route requests to the wrong place. Multisite installations have different generated rules, so use the rule set produced for the network’s subdirectory or subdomain mode rather than this single-site example.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Confirm Apache can apply the file

WordPress documentation identifies Apache’s mod_rewrite as the module that rewrites URLs on the fly. Your hosting provider must have it enabled, and the virtual host must allow directory overrides (often through an AllowOverride setting). A site owner usually cannot correct those settings from WordPress. Ask the host to verify the module, the document root, override permissions, and the active virtual host if the file is correct but has no effect.

5. Account for Nginx, IIS, and proxies

Nginx does not read Apache .htaccess files. On Nginx, the equivalent routing is in the server block, and the host must send requests that are not real files or directories to WordPress’s front controller. Editing .htaccess on an Nginx-only server will not fix an admin 404. IIS uses its own URL Rewrite configuration.

For managed hosting, provide the exact failing path and ask whether the site is running behind Nginx, Apache, IIS, a reverse proxy, or a CDN. Confirm that the proxy forwards the original host and HTTPS state and does not cache a stale 404 for /wp-admin/ or wp-login.php. Purge only the affected cache after correcting the origin; otherwise a cached error can hide a successful repair.

6. Isolate plugins and themes

Extensions can alter login redirects, admin URLs, rewrite rules, or capability checks. A reversible isolation test is more reliable than guessing which extension is responsible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Disable every plugin without dashboard access

  1. Connect through SFTP, FTP, or the hosting file manager.
  2. Open wp-content and rename plugins to a temporary name such as plugins.disabled.
  3. Test /wp-login.php and /wp-admin/ in a private window.
  4. If access returns, rename the directory back to plugins. Reactivate extensions one at a time, testing the dashboard after each activation.

Renaming the directory deactivates all ordinary plugins at once but does not delete their settings. Some must-use plugins in wp-content/mu-plugins are loaded separately; mention them to your host or inspect that directory if the normal plugin test changes nothing.

Switch to a default theme

If plugins are not the cause and you can use the dashboard, activate an unmodified default WordPress theme temporarily. Without dashboard access, a qualified administrator can change the active theme in the database after taking a backup, or use the host’s recovery tools. A theme that adds custom login routes, redirects, or admin filters can generate a WordPress-styled 404 even when core routing is healthy.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

7. Check HTTPS, redirects, and cookies

Redirect chains often conceal the original problem. Use your browser’s developer tools or a header inspection tool to see each response from /wp-admin/ and /wp-login.php. Record every host, protocol, and path change.

  • Ensure the site does not alternate between HTTP and HTTPS.
  • Ensure the certificate, proxy, and origin agree that the request is HTTPS.
  • Remove conflicting redirect rules from the CDN, host panel, web server, and WordPress plugins; one canonical redirect should win.
  • Clear domain cookies after changing the canonical URL.
  • Check that a security or custom-login plugin has not changed the administrator path. If it has, use that plugin’s documented recovery procedure rather than assuming /wp-admin/ was renamed permanently.

WordPress lists conflicting URL and proxy settings as causes of login loops and incorrect admin routing. A 404 after a redirect is therefore different from a missing file: repair the redirect chain first.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

8. Review logs and verify core files

Enable or inspect logging only as long as necessary, and avoid displaying errors publicly. The usual WordPress log location is wp-content/debug.log when debugging has been enabled; your host may also provide PHP, Apache, Nginx, or access logs.

What to capture

  • The exact request path and query string.
  • The HTTP status and whether it was generated by the server, proxy, or WordPress.
  • The timestamp with the site’s timezone.
  • PHP fatal errors, rewrite errors, permission errors, and redirect warnings at that time.
  • Recent migrations, domain changes, updates, security changes, or plugin activations.

If logs show missing or unreadable core files, compare the installation with a fresh WordPress package of the same release. Back up the site first, then replace only affected core directories and files. Do not overwrite wp-content or wp-config.php with a generic package. If the evidence points to compromised files, stop making ad hoc edits and use a documented security-cleanup process.

9. Migration-specific checks

Admin 404s are common immediately after moving a site because the database, configuration file, DNS, and web-server document root can be out of sync.

  1. Confirm DNS resolves the domain to the new server and that the virtual host points to the directory containing wp-admin, wp-includes, and wp-login.php.
  2. Confirm WP_HOME, WP_SITEURL, home, and siteurl all use the new scheme, host, and path.
  3. Check that the copied .htaccess or server rules match the new installation location.
  4. Save Settings > Permalinks after login to regenerate rules.
  5. Clear browser, proxy, and page caches, then test from a private window.
  6. Disable extensions temporarily if the failure began after restoring the database or changing PHP/server versions.

Do not perform a blind search-and-replace across the database: serialized data can be damaged by text-only replacement. Use a migration tool that understands serialized values or have a specialist perform the change.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

10. Subdirectory and multisite installations

The correct admin path depends on the network layout. A single site installed in /blog normally uses /blog/wp-admin/. In a multisite network, the network dashboard and each site’s dashboard can have different paths, and subdomain and subdirectory modes generate different rewrite rules.

First establish whether the failing request is for the network admin or an individual site. Then use the official rules generated for that exact mode. Do not replace a multisite configuration with the single-site root block shown earlier. Check the network’s domain and path settings, the primary site’s URL values, and any mapped-domain or proxy rules before editing files.

Use this decision path when you are stuck

  1. Is the page server-branded? Verify document root, virtual host, rewrite support, .htaccess, and proxy/CDN behavior.
  2. Is it WordPress-branded? Verify home/siteurl, redirects, plugins, themes, and custom login code.
  3. Does wp-login.php load? If no, treat it as a broader routing or file-integrity issue. If yes, inspect the post-login redirect, cookies, HTTPS, and path.
  4. Is the front end also broken? Fix the domain, document root, or migration mapping before troubleshooting a dashboard-only symptom.
  5. Can you reach Settings > Permalinks? Save it once. If not, use reversible file-based isolation and ask the host to check server configuration.
  6. Does disabling plugins or switching themes help? Restore each item individually to identify the conflict.

When to contact your hosting provider

Escalate when you cannot change Apache/Nginx/IIS configuration, the site is behind a managed proxy, or logs show a server-level failure. Send the provider the exact failing URL, the response type, timestamp, recent migration or update details, and relevant log lines. Ask specifically for verification of the document root, active virtual host, rewrite module and override permissions, proxy HTTPS headers, and any cached 404 response.

Host assistance is also appropriate when replacing core files, editing database URL values, or changing multisite rules could cause downtime. Keep a backup and describe every change already made so support can reverse or reproduce the problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prevent the next admin 404

  • Keep a current database and file backup before migrations, updates, and rewrite edits.
  • Document the canonical scheme, host, installation path, and whether the site uses Apache, Nginx, IIS, or a proxy.
  • After a migration, test the home page, wp-login.php, /wp-admin/, media URLs, and at least one permalink before declaring the move complete.
  • Use staging to test plugins, themes, and security redirects.
  • Keep custom .htaccess directives outside WordPress’s generated markers and save a known-good copy.
  • Review logs after server or PHP changes and remove temporary debugging output when finished.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.