How to Delete an IP Address from LoginPress Limit Login Attempts

Do you want to delete an IP address from LoginPress Limit Login Attempts Add-on?

Suppose you are using LoginPress Limit Login Attempts Add-on. When you enter the incorrect password multiple times, your own security measures might have locked you out of your WordPress dashboard. Then you’ll have trouble accessing your WordPress site due to exceeding the maximum allowed failed login attempts. 

Delete an IP Address from LoginPress

So, if you are locked out from the dashboard and have FTP access only, the following knowledge-base article will be helpful and explain how to remove a blacklisted IP address from LoginPress Limit Login Attempts using a custom function in WordPress.

Let’s get started!

Delete an IP Address from LoginPress Limit Login Attempts Add-on

In order to regain access to your site’s dashboard, all you need to do is to open your theme's functions.php file. Copy the code below, Save the file, and upload it through FTP.

The function is hooked to the WordPress init action with a priority of 100. This ensures that the function is executed early during the initialization process.

Once the function is executed, the blacklisted IP address defined in the $ip variable will be deleted from the LoginPress Limit Login Attempts database table.

Here is the code for you:

/**
 * Remove the Blacklisted IP Address from LoginPress Limit Login Attempts.
 *
 * @return void
 */
function loginpress_llla_remove_blacklist_ip() {
	global $wpdb;
	$llla_table = $wpdb->prefix . 'loginpress_limit_login_details';
           // Replace the value of the $ip variable with the actual IP address you want to remove from the blacklisted IPs.
	$ip         = '192.165.23.56';
	// The Delete query.
	$wpdb->query(
		$wpdb->prepare(
			"DELETE FROM `{$llla_table}` WHERE `ip` = %s",
			$ip
		)
	);
}
add_action( 'init', 'loginpress_llla_remove_blacklist_ip');

Function: loginpress_llla_remove_blacklist_ip()

This function removes a blacklisted IP address from the LoginPress Limit Login Attempts plugin by executing a DELETE query on the database table.

Parameters

This function does not accept any parameters.

Return Value

This function does not return any value.

Important Notes:

  • Ensure you have the necessary permissions to execute delete operations on the database table.
  • Replace the value of the $ip variable with the actual IP address you want to remove from the blacklisted IPs.
  • Verify that the $llla_table variable holds the correct table name where LoginPress Limit Login Attempts stores blacklisted IP addresses.

That’s it! Following the above steps and using the provided code, you can successfully delete a row representing a blacklisted IP address from the LoginPress Limit Login Attempts plugin's database table.

If you have any doubts or questions, please don’t hesitate to contact our support forum

Still stuck? How can we help?

Updated on January 3, 2024

Documentation
triangular shape yellowish icon

Frequently Asked Questions (FAQs)

These FAQs answer the most common questions about our WordPress custom login page plugin.

three shapes icon

Where can I get support for LoginPress?

If you need help with LoginPress, you can contact us here. We’ll be happy to answer any questions about the plugin.

Do you have an affiliate program?

Yes, we have an affiliate program that you can sign up for here. As an affiliate, you’ll earn a commission on every sale you refer to us.

Do you offer refunds?

Yes, we offer a 14-day money-back guarantee on all of our plans. If you’re unsatisfied with LoginPress, simply contact us within 14 days of your purchase, and we’ll process a refund.

Can I upgrade my license after my initial purchase?

Yes, you can upgrade your LoginPress license at any time. Simply log into your account and go to the My Downloads page. From here, you can upgrade your license and download the latest version of the plugin.

Will LoginPress slow down my website?

No, LoginPress will not slow down your website. The plugin is lightweight and only loads the necessary files when someone tries to access your login page.

three shapes icon

If you Still have Questions?

Get In Touch