create wordpress plugin
Home » Create new wordpress plugin

Create new wordpress plugin

To create a new WordPress plugin is easy. For this you need an empty file in a folder. This file serves as the main file of the new plugin and only needs a comment header so that WordPress recognizes the plugin.

File header for create new WordPress plugin

As with new WordPress themes, the title, description, author, etc. are specified as comments in the main plugin file (for example, myplugin.php):

 * Plugin Name: My First Plugin
 * Plugin URI: http://www.mywebsite.com/my-first-plugin
 * Description: The very first plugin that I have ever created.
 * Requires at least: 5.2
 * Requires PHP: 7.2
 * Version: 1.0
 * Author: Your Name
 * Author URI: http://www.mywebsite.com
 * Textdomain: your-plugin
  • Name (*): Name from the new plugin.
  • Plugin URI: The URL of a public web page where users can find more information about the plugin.
  • Description: A brief description of the plugin.
  • Requires at least: The lowest WordPress version that the plugin will work on.
  • Requires PHP: The minimum required PHP version.
  • Version: The version of the plugin, written in the format X.X or X.X.X.
  • Author: The name of the person or organization that developed the plugin.
  • Author URI: The URL of the authoring person or organization.
  • Text Domain: Text domain for translation.

That is why the version of plugins is also used to check for updates.

To see the new, empty WordPress plugin, it must be uploaded to /wp-content/plugins/PLUGINNAME. In the WordPress backend. Under plugins the new plugin appears. In the WordPress backend under plugins the new plugin appears.

Source: https://developer.wordpress.org/plugins/

Trent Bojett

My name is Trent Bojett, I am 28 years old and I live in Switzerland. Because of my enthusiasm for writing and the logical world (= software development) I started this blog in early 2020.

Add comment