Title: Change Error Message
Last modified: December 6, 2018

---

# Change Error Message

 *  Resolved [jkdev](https://wordpress.org/support/users/jkdev/)
 * (@jkdev)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/change-error-message-2/)
 * Hello,
 * Is there a way I’m not seeing to change the error message you get when a user
   gets locked out? Or even direct them to another page upon lockout?
 * Here is the message I’m talking about: “ERROR: Access from your IP address has
   been blocked for security reasons. Please contact the administrator.”
 * Thank you
    -  This topic was modified 7 years, 6 months ago by [jkdev](https://wordpress.org/support/users/jkdev/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [wpsolutions](https://wordpress.org/support/users/wpsolutions/)
 * (@wpsolutions)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/change-error-message-2/#post-10955427)
 * Hi,
    Yes that message is wrapped in following filter hook:
 * `$error_msg = apply_filters( 'aiowps_ip_blocked_error_msg', __('<strong>ERROR
   </strong>: Access from your IP address has been blocked for security reasons.
   Please contact the administrator.', 'all-in-one-wp-security-and-firewall') );`
 * You can change it by hooking into the above filter.
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/change-error-message-2/#post-10955462)
 * Hi,
 * Add the following function to your theme functions.php file. It is always best
   to use a child theme. Remember to replace ‘My custom error message!’ with your
   own message.
 *     ```
       add_filter('aiowps_ip_blocked_error_msg', 'my_custom_message');
       function my_custom_message($error_msg) { 
       return 'My custom error message!'; 
       }
       ```
   
 * Let us know if you need more help.
 * Kind regards
 *  Thread Starter [jkdev](https://wordpress.org/support/users/jkdev/)
 * (@jkdev)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/change-error-message-2/#post-10956826)
 * Worked perfectly, thank you!
 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/change-error-message-2/#post-10956877)
 * I am happy to hear 🙂
 * Enjoy the plugin

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Change Error Message’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-wp-security-and-firewall/assets/icon-256x256.
   png?rev=2798307)
 * [All-In-One Security (AIOS) – Security and Firewall](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-wp-security-and-firewall/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/change-error-message-2/#post-10956877)
 * Status: resolved