How to create a wordpress “Hello World” Plugin

Standard

WordPress is web software you can use to create a beautiful website or blog.  There are a few steps to create a WordPress plugin.

Step 1: Connect to the web server through SSH or FTP/SFTP.   This should be pretty straight forward. If you want to connect by ssh you can use the command

Step 2:  Enter the directory /wordpress/wp-content/plugins/ and create a directory called hello.  Enter this direcotry and create a new file hello.php

Step 3:
Add this code to hello.php:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
Plugin Name: hello
Plugin URI: https://talkera.org/wordpress
Description: Hello plugin.
Version: 1.0.0
Author: Talkera
Author URI: https://talkera.org/wordpress
*/
 
add_action('wp_footer','hello_wp_footer');  
function hello_wp_footer(){  
      echo '
Hello world! '. get_option('blogname') .'
'
;    
}
 
?>

Step 4:
Open your wordpress administration panel, go to plugins and activate. Now visit your page and look at the bottom of the page. The message ‘Hello World’ should appear.

Leave a Reply

− 1 = 2