# Cope Login

**Change your WordPress login URL from the default `wp-login.php` or `/wp-admin` to anything you like. This helps protect your site from brute-force attacks and automated login attempts by making your login page harder to find.**

## Features

- Change your login URL to anything you want (e.g., `https://yourdomain.com/my-login`)
- Prevents use of slugs that already exist as posts, pages, or custom post types
- Only administrators (single site) or super admins (multisite) can change the login URL
- Set a custom redirect if someone tries to access the default login page (`wp-login.php`)
- Easy-to-use settings page in your WordPress admin menu
- No need to edit Permalinks or core WordPress files

## Installation

1. Upload the plugin files to the `/wp-content/plugins/cope-login` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Cope Login** in your WordPress admin menu.
4. Set your desired custom login URL and (optionally) a redirect URL.

## Usage

1. After activating the plugin, find the **Cope Login** menu item in your WordPress admin sidebar.
2. Enter your custom login URL slug (e.g., `my-login`).
3. (Optional) Enter a redirect URL slug for users who try to visit the default login page.
4. Click **Save Changes**.
5. **Important:** Bookmark your new login URL. If you forget this URL, you may not be able to log in to your site.

**Example:**  
If your site is at `https://www.example.com` and you set your login URL to `my-login`, your new login page will be:  
`https://www.example.com/my-login/`

## Multisite Support

- Only network super admins can change the login URL on multisite installations.
- Each site on the network can have its own custom login URL if the plugin is activated per-site.

## Security

- The plugin restricts who can change the login URL (admin or super admin).
- Prevents login slug collisions with existing posts, pages, and custom post types.
- Users visiting the old login page (`wp-login.php`) will be redirected as specified.

## Frequently Asked Questions

### What happens if I forget my custom login URL?

You will not be able to access the login page! Always bookmark your new login page after you set it. If you forget the URL, you may need to disable the plugin via FTP or your hosting file manager.

### Do I need to update my site's Permalinks?

No. This plugin manages the login URL independently. Do not change the Permalinks settings for this purpose.

### Will this plugin conflict with other security plugins?

Cope Login is lightweight and should not conflict with most plugins. However, if you use other plugins that change the login URL, only one should be active at a time.

## Changelog

### 1.0

- Initial release
- Custom login URL feature
- Admin settings page
- Redirect from wp-login.php
- Slug validation (avoid conflicts with posts/pages)
- Multisite support
- AJAX check for slug availability

## Credits

Developed by [copewp](https://copewp.com/)

## License

This plugin is open source and distributed under the [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html).