Posted inTechnology / Programming / wordpress

how to create custom WordPress Plugin from scratch

Today, We want to share with you how to create custom WordPress Plugin from scratch.In this post we will show you how to create custom plugin in wordpress step by step, hear for how to create plugin in wordpress step by step with example we will give you demo and example for implement.In this post, we will learn about A Complete Guide of Creating WordPress Plugin from Scratch with an example.

how to create custom WordPress Plugin from scratch

There are the Following The simple About how to Simple custom WordPress Plugin from scratch Full Information With Example and source code.

As I will cover this Post with live Working example to develop create wordpress plugin with database, so the wordpress plugin development course for this example is following below.

WordPress by adding the following to your wp-config.php file:

define('WP_DEBUG', true)

Step :1. Basic Structure:

It depends on the plugin. This is my basic structure for nearly every plugin:

my-plugin/
    inc/
    lib/
    admin/
    templates/
    css/
    js/
    images/
    lang/
    my-plugin.php
    readme.txt

Step :2. Plugin Header:


Step :3. File Structure:(Folder Structure #)

/plugin-name
     plugin-name.php
     uninstall.php
     /languages
     /includes
     /admin
          /js
          /css
          /images
     /public
          /js
          /css
          /images

Step :4. Keep Plugin Clean:

  • register_activation_hook — it Runs when your wordpress plugin is activated
  • register_deactivation_hook — it Runs when your wordpress plugin is deactivated
  • register_uninstall_hook — it Runs when your wordpress plugin is uninstalled

->a) register_activation_hook:


->b) register_deactivation_hook:


->c) register_uninstall_hook:


->d) creating uninstall.php file


Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about how to Make custom WordPress Plugin from scratch.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

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

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype