Wordpress Plugin Installed Twice

I am developing a WP plugin for my site. When I download the plugin in WP , I see that 2 instances are installed .

enter image description here

Why is this?

+6
source share
3 answers

Check your plugin directory.

Path: wp-content-->plugins

There are two directories in the same plugin or the same name. Check and change plugin name the same or not? (In your core plugin development files.)

 /* Plugin Name: Your plugin name */ 

If the plugin name matches the name of the change and saves it.

+3
source

First of all, it is worth noting that the name of the wordpress plugin has nothing to do with its directory name . Instead, this name depends on the comment section of the .php files that are in the directory. These files can start with any name, but are usually registered with index.php.

A typical plugin ad looks like this.

 <?php /** * Plugin Name: My Plugin Name * Plugin URI: http://mypluginuri.com/ * Description: A brief description about your plugin. * Version: 1.0 or whatever version of the plugin (pretty self explanatory) * Author: Plugin Author Name * Author URI: Author website * License: A "Slug" license name eg GPL12 */ 

So just find two different files that consist of comments like this. These files can be located anywhere, even in the directory of other plugins. The Plugin Name parameter will consist of your actual plugin name.

0
source

Why is this happening?

As you know, a plugin is a world of code block. Pulugin is identified from the section that we write in the main file of the plugin.

 /** * @package Akismet */ /* Plugin Name: Akismet Plugin URI: https://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Version: 3.2 Author: Automattic Author URI: https://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ 

When you copy this and put it into some other plugin file of the main plugin. You see Akismet in the admin panel.

How to escape from this?

Step 1 Verify that the plugin has information in your plugin.

Step-2 : Change the version so that you can identify which one is original, which is a duplicate.

Step 3 : just change the information.

What is it.

0
source

Source: https://habr.com/ru/post/1012365/


All Articles