• Pricing
  • Help
  • My Account
  • Download
WP Ghost
  • Pricing
  • Help
  • My Account
  • Download

Hide wp-admin And wp-login.php From Source Code

/Developers /Hide wp-admin And wp-login.php From Source Code

Hiding the wp-admin and wp-login.php paths from the source code is essential, especially when you use a hack-prevention security solution like WP Ghost.

You can hide the paths after you customize them with WP Ghost.

  • Follow this tutorial to change and hide the wp-admin path.
  • Follow this tutorial to change and hide the wp-login.php path.

Run a Security Check from WP Ghost > Security Check to see if the paths are correctly hidden in the frontend’s source code.

If the paths still appear in the front end after you change and hide them with WP Ghost, this could be because the theme or other active plugins on your website are adding the paths.

A solution is to deactivate the installed plugins and check which plugin adds the default wp-admin and wp-login paths in the source code.

Contact the plugin author and tell him not to expose the direct paths in the frontend but to use the WordPress function to call the paths.

  • For wp-admin the WordPress function is admin_url('/');
  • For wp-login.php the WordPress function is home('wp-login.php');

Calling the paths like this will let WP Ghost change the paths with the new paths in the frontend and not expose the default paths.

Tagged: hide wp-adminhide wp-logintext mapping

Related Articles

  • Stop Plugin Auto Update Check

  • Adding a Custom CMS Simulator

  • WP Ghost Constants in wp-config.php

  • Change Paths in Admin Dashboard

  • Add Files to “Hide WordPress Common Files”

  • Change or Remove Login Logo Link

WP Ghost - Best Practice

Learn how to set up WP Ghost in Ghost Mode and activate all the security features you need for a stronger and safer website.

Most Popular

  • Change and Hide wp-admin Path with WP Ghost
  • WP Ghost Compatibility Plugins List
  • Setup WP Ghost on Nginx Server
  • Set AllowOverride all on Apache Servers
  • Theme Not Loading Correctly and Website Loads Slower
  • Lesson 3 – Hide Your Site From Theme Detectors and Hackers Bots
  • Lesson 1 – Customize Paths with WP Ghost
  • Change admin-ajax.php Path with WP Ghost
  • Firewall and Security
  • How To Change File Permissions in WordPress
  • Change plugins Path with WP Ghost
  • Brute Force Attack Protection
  • WP Ghost Settings – Best Practice
  • Change REST API Path with WP Ghost
  • Change and Hide wp-login Path with WP Ghost
  • Redirects
  • What is WP Ghost?
  • Change wp-content Path with WP Ghost
  • Two-Factor Authentication
  • Brute Force Protection in Elementor Login Forms
  • Change wp-register Path with WP Ghost
  • Disable Right-Click and Keys
  • Hide wp-admin And wp-login.php From Source Code
  • WP Ghost Compatibility Themes List
  • Website Security Check
  • Install WP Ghost Lite Plugin
  • Change author Path and Hide ID with WP Ghost
  • Temporary Logins
  • Change Paths In Cached Files
  • Setup WP Ghost on Nginx Web Server With Virtual Private Server

Recommended

  • What is WP Ghost?
  • Changelog
  • Plugin Best Practice
  • Plugin Compatibility
  • Theme Compatibility

Categories

  • Change Paths
  • Firewall
  • Temporary Login
  • Two Factor
  • Brute Force
  • Events Log

Company

  • Affiliate
  • Media Kit
  • Terms Of Use
  • Privacy Policy
  • Contact

Useful

  • Hack Attack Types
  • Key Security Features
  • Security Features
  • Free vs PRO
  • Why WP Ghost
  • Pricing
  • Facebook
  • YouTube
  • X
© WP Ghost 2016-2025