Resolving Common WPS Hide Login Plugin Conflicts and Errors
Content
WPS Hide Login is a popular plugin for securing WordPress admin access, but like any software, it can sometimes run into conflicts or errors. This guide covers the most common issues reported by users and provides solutions to get your site back on track.
1. Fatal Error: Cannot redeclare DNH()
The Problem: This is one of the most frequent errors. It occurs when WPS Hide Login and another plugin both use different versions of the same underlying library, WP-Dismissible-Notices-Handler. The error happens because both plugins try to declare the same DNH() function, which PHP does not allow.
The Solution: The core issue is a conflict between plugin libraries.
- Update Everything: First, ensure both WPS Hide Login and the other conflicting plugin (often another security or utility plugin) are updated to their latest versions. The WPS Hide Login team has addressed this in past updates.
- Identify the Conflicting Plugin: Deactivate all other plugins and reactivate them one by one. When the error reappears, you have found the conflicting plugin. You may need to choose which plugin to keep active or contact the other plugin's support for guidance.
2. Parse Error: syntax error, unexpected T_USE
The Problem: This error appears when trying to activate the plugin and is almost always related to an outdated PHP version. The code in the plugin uses modern PHP features that older versions do not understand.
The Solution: Upgrade your server's PHP version.
- Contact your web hosting provider and ask them to upgrade your site to a supported version of PHP, such as PHP 7.4, 8.0, or 8.1. This is not only a requirement for the plugin but also a critical security and performance best practice for your entire WordPress site.
3. Dismissible Notices Handler Error: A notice with the ID has already been registered
The Problem: This warning indicates an internal conflict within the notice handling library, where it's trying to create a notice with an ID that already exists.
The Solution:
- Update the Plugin: This specific issue was targeted for a fix in version 1.8.1 of WPS Hide Login. Ensure you are running at least that version or newer.
- Clear Caches: If the error persists after updating, clear any caching on your site, including object caching (Redis/Memcached) and full-page caches (from plugins or your host).
4. Warning: Invalid argument supplied for foreach()
The Problem: This warning is not directly caused by WPS Hide Login but is a conflict where another plugin (like Fusion Builder in the example) expects certain data to be present that WPS Hide Login alters.
The Solution:
- This typically requires an update from the other plugin's developers to make their code more robust. Check for updates for the plugin named in the error message.
- If no update is available, you may need to temporarily deactivate WPS Hide Login and report the conflict to the support team for the other plugin (e.g., Fusion Builder).
General Troubleshooting Steps
For any unexplained issue with the plugin, always follow these steps first:
- Update: Update WPS Hide Login, your theme, and all other plugins.
- Conflict Test: Temporarily switch to a default WordPress theme (like Twenty Twenty-Four) and disable all other plugins. If the problem goes away, reactivate your theme and plugins one-by-one to find the conflict.
- Check PHP Version: Confirm your site is running a modern, supported PHP version (7.4 or higher).
By understanding these common errors and their solutions, you can quickly resolve most issues that arise with the WPS Hide Login plugin.
Related Support Threads Support
-
Class ‘WP_Review_Me’ not foundhttps://wordpress.org/support/topic/class-wp_review_me-not-found/
-
Conflict with fusion-builder/inc/shortcodes.phphttps://wordpress.org/support/topic/conflict-with-fusion-builderincshortcodes-php/
-
Fatal errorhttps://wordpress.org/support/topic/fatal-error-3787/
-
Fatal Error when activating the pluginhttps://wordpress.org/support/topic/fatal-error-when-activating-the-plugin-8/
-
wp_loaded not called any morehttps://wordpress.org/support/topic/wp_loaded-not-called-any-more/
-
WPOhttps://wordpress.org/support/topic/wpo-6/
-
dnh_dismissed_noticeshttps://wordpress.org/support/topic/dnh_dismissed_notices/
-
Dismissible Notices Handler Errorhttps://wordpress.org/support/topic/dismissible-notices-handler-error-2/
-
Fatal error: Cannot redeclare DNH functionhttps://wordpress.org/support/topic/fatal-error-cannot-redeclare-dnh-function-2/
-
library incompatibilityhttps://wordpress.org/support/topic/library-incompatibility/
-
Dismissible Notices Handler Errorhttps://wordpress.org/support/topic/dismissible-notices-handler-error/
-
Dead?https://wordpress.org/support/topic/dead-35/