Minimal wordpress plugin example

This post is also available in: deDeutsch (German)

Also see:
Minimal WordPress JS plugin example
Minimal WordPress CSS plugin example
Minimal WordPress Shortcode plugin example

This is the minimal wordpress plugin – it does not do anything at all, but you can activate it and use it as a basis for your plugins.

First, create a directory for your plugin in wp-content/plugins/, e.g. wp-content/plugins/my-plugin

Save the following code as functions.php in the plugin folder, e.g. wp-content/plugins/my-plugin/functions.php

<?php 
/*
Plugin Name: My plugin
*/

Now you can activate your plugin your WordPress admin area: