Title: PLUGIN_NAME already defined
Last modified: October 6, 2022

---

# PLUGIN_NAME already defined

 *  Resolved [Matthieu](https://wordpress.org/support/users/theschappy/)
 * (@theschappy)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/plugin_name-already-defined/)
 * Hi there,
 * With the latest version of PHP 8.1 and WordPress 6.0.2 you might encounter logging
   of warnings regarding `PLUGIN_NAME` as follows:
    `Constant PLUGIN_NAME already
   defined in /var/lib/wordpress/wp-content/plugins/404-solution/includes/Loader.
   php on line 17`
 * Just as a quick fix:
 *     ```
       --- Loader.php.org      2022-10-06 10:26:59.339522126 +0200
       +++ Loader.php  2022-10-06 10:27:17.963063849 +0200
       @@ -14,7 +14,7 @@
        define( 'URL_TRACKING_SUFFIX', '?utm_source=404SolutionPlugin&utm_medium=WordPress');
        define( 'ABJ404_HOME_URL', 'https://www.ajexperience.com/404-solution/' . URL_TRACKING_SUFFIX);
        define( 'ABJ404_FC_URL', 'https://www.ajexperience.com/' . URL_TRACKING_SUFFIX);
       -define( 'PLUGIN_NAME', '404 Solution');
       +if (!defined('PLUGIN_NAME')) define( 'PLUGIN_NAME', '404 Solution');
   
        // STATUS types
        define( 'ABJ404_TRASH_FILTER', -1 );
       ```
   
 * Cheers!

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

 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/plugin_name-already-defined/#post-16076642)
 * Hey Matthieu,
 * As far as I can tell, the PLUGIN_NAME is only defined once in the plugin. Have
   you tried uninstalling and reinstalling?
 *  Thread Starter [Matthieu](https://wordpress.org/support/users/theschappy/)
 * (@theschappy)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/plugin_name-already-defined/#post-16088110)
 * Hi Aaron,
 * I know but also other plugin encounter the same problem (see: [https://wordpress.org/support/topic/php-notice-constant-pgc_plugin_name-already-defined/](https://wordpress.org/support/topic/php-notice-constant-pgc_plugin_name-already-defined/)).
   Apparently WordPress uses the input from the plugin header to set it somewhere?
 * [https://developer.wordpress.org/reference/functions/get_plugin_data/](https://developer.wordpress.org/reference/functions/get_plugin_data/)
 * Best,
 * Matthieu
 *  Plugin Author [Aaron](https://wordpress.org/support/users/aaron13100/)
 * (@aaron13100)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/plugin_name-already-defined/#post-16103692)
 * Based on your feedback I’ll go ahead and close this issue.
 * If other plugins are having the same issue then I guess this isn’t a bug in the
   404 Solution plugin. PLUGIN_NAME is only defined once in the plugin, so if the
   error appears that it’s already been defined then there’s some other underlying
   issue, for example perhaps the plugin has been loaded twice. We should make sure
   the plugin is only loaded once instead of skipping the error message.
 *  Thread Starter [Matthieu](https://wordpress.org/support/users/theschappy/)
 * (@theschappy)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/plugin_name-already-defined/#post-16103926)
 * Hi Aaron,
 * good approach. I appreciate your support!
 * Cheers,
 * Matthieu

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

The topic ‘PLUGIN_NAME already defined’ is closed to new replies.

 * ![](https://ps.w.org/404-solution/assets/icon-256x256.jpg?rev=1610739)
 * [404 Solution](https://wordpress.org/plugins/404-solution/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/404-solution/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/404-solution/)
 * [Active Topics](https://wordpress.org/support/plugin/404-solution/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/404-solution/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/404-solution/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Matthieu](https://wordpress.org/support/users/theschappy/)
 * Last activity: [3 years, 7 months ago](https://wordpress.org/support/topic/plugin_name-already-defined/#post-16103926)
 * Status: resolved