Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

How to create WordPress plugin from scratch ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

WordPress is an outstanding net web page stage for some sites. from running a weblog to e-trade to modern business undertaking and portfolio sites, WordPress is flexible CMS. planned considering ease of use and adaptability, WordPress is an incredibly decent answer for each huge and little site. In this article, we will learn about how to create a WordPress plugin from scratch.

In this educational exercise, we will go through the most widely recognized approach to making a module for WordPress. A WordPress module expands the WordPress focus and is relied upon to be reusable code or value across various endeavors. This is a most intriguing point concerning it, you can share your code or worth on the web

What You’ll Need: Here is what you should need to make a WordPress module:

  • A word processor: You will require a content tool to compose the module code. The absolute most well-known HTML editors incorporate Notepad++ and Atom.
  • FTP admittance to your facilitating account: In the wake of introducing the content tool, interface it to your FTP server for code alteration. We have an aide on the best way to interface with FTP with Notepad++ assuming you really want help. Then, arrange an FTP customer to transfer the module document to your site. We suggest involving the FileZilla FTP application as it is direct to set up.
  • A functioning WordPress establishment: At last, reorder the module data underneath into your primary module record. Make a point to alter the subtleties such Plugin Name and Plugin URI as they relate to your module

Steps To Create WordPress Plugin From Scratch:

Step 1: Pick a Plugin Name.

The initial phase in WordPress module advancement is to think of an authority name for your module. You’ll need to pick one that is applicable to what the module does, but on the other hand, is remarkable.

Step 2: Make Your Plugin Folder and PHP File

To begin, head to the wp-content/modules organizer of your WordPress establishment. Make another organizer and name it utilizing the module’s name, utilizing dashes to isolate words (i.e., “your-module name”):

Step 3: Add File Header

When you make your principle module record, it’s an ideal opportunity to add the document header.


  // Plugin Name: hello plugin
  // Description: This is first Plugin.

Step 4: Code To Your Plugin to Add Functions

You’ve set up the essential structure for your module. Be that as it may, it clearly sits idle yet. For that, you’ll have to program your module utilizing the components

Step 5: Compress Your Plugin

Before you transfer your module to your WordPress site, you’ll have to change it over to the .zip format.

Step 6: Actuate and Run the Plugin on Your WordPress Site

You can add it to your dashboard by navigating to Plugins >> Add New >> Upload Plugin >> Choose File:

In conclusion, ensure you have a working and modern WordPress establishment. There are multiple ways of refreshing the WordPress center documents in the event that you have debilitated programmed refreshes. Back up your WordPress documents prior to refreshing the site to stay away from information misfortune.

My Personal Notes arrow_drop_up
Last Updated : 14 Feb, 2022
Like Article
Save Article
Similar Reads
Related Tutorials