WordPress is a CMS. CMS stands for Content Management System. CMSs are helps to creating a website in easy way. Many pleople don’t know about Coding and programming languages, so WordPress help to develop their website in easy manner with less coding.

Plugins: Plugins are helps to CMS to enhance their capabilites and functionalities.
Here are some steps for creating a CRUD plugin in wordpress.

First you create a table on you existing wordpress site,

Copy below code on your phpmyadmin SQL editor.

Step1: On the first we create file named “init.php”. This is a core file of the plugin where we make menu for admin sidebar and call all functions and pages. Here are some code below,

//This comment is a very main part of the plugin development which shows like this,

/*
Plugin Name: User List
Description: A simple user list for CRUD
Version: 1.0
Author: codingtasks.net
Author URI: http://codingtasks.net
*/

init.php

From this INIT.PHP file you can see on your admin side bar menu name which you set on this code, look like this,

Step2:

On second step we create code for adding users to database.

create.php

Step3:

on this step we fetch the data from database which we inster using create.php code.

List.php

In this file delete operation code is also available.

Step4:

For updation of data we create the update.php file

Update.php

 

Was this article helpful?
YesNo

By Bikash

My name is Bikash Kr. Panda. I own and operate PHPCODER.TECH. I am a web Programmer by profession and working on more than 50 projects to date. Currently I am working on the web-based project and all the CMS and frameworks which are based on PHP.

One thought on “How to create plugin in WordPress with example”

Leave a Reply

Your email address will not be published. Required fields are marked *