Skip to main content

How to create wordpress plugin manually

 

Create your first plugin in five simple steps

I'm not kidding. You can create a WordPress plugin in five simple steps. Let me show you how…

1. FTP into your site

The first thing you'll need to do is access your site via FTP using the FTP program of your choice (mine is Coda). If you're not familiar with FTP, I recommend you read up on that before moving forward.

2. Navigate to the WordPress plugins folder

Once you've accessed your site via FTP, you'll need to navigate to the WordPress plugins folder. That folder is almost always located at /wp-content/plugins.

3. Create a new folder for your plugin

Now that you're in the plugins folder it's time to create a folder for yours! Go ahead and create a new folder, giving it a unique name using lowercase letters and dashes such as my-first-plugin. Once you've done that, enter your new folder and move on to the next step.

4. Create the main PHP file for your plugin

Next, you'll need to create the main file for your plugin. To do so, create a PHP file within your new plugin folder and give it the same name such as my-first-plugin.php. After you've done that, open your plugin's main file and get ready to do some editing.

5. Setup your plugin's information

Finally, copy and paste the plugin information below into your main plugin file. Make sure to edit the details such Plugin Name and Plugin URI as they pertain to your plugin.

<?php
/**
 * Plugin Name: My First Plugin
 * Plugin URI: http://www.mywebsite.com/my-first-plugin
 * Description: The very first plugin that I have ever created.
 * Version: 1.0
 * Author: Your Name
 * Author URI: http://www.mywebsite.com
 */

That's it! You've just completed the minimum number of steps that are required to create a WordPress plugin. You can now activate it within the WordPress admin and revel in all of your glory.


Comments

Popular posts from this blog

Rich Text Editor

Implementing jQuery Text Editor in Textarea You might have seen text editor in many comment form ex.Wordpress.org. It is having a rich text editor in their review comment form. The rich text editor helps to create the content where, you can easily bold the text or make it  italics, adjust the font size. You can format your text in one click.you can insert an images and smilies also. In this tutorial, we are going to share a file that creates Text Editor using jQuery/JavaScript/HTML. Clik the following link to view the Text editor http://www.formget.com/implementing-jquery-text-editor-in-textarea/

Difference between php5 and php7

  Feature Php7 Php5 Performance Performance speed is double. Average requests per second are 44 when it is 22 in php5. Performance is low compared to php7. Return type You can declare the return type. Example – public function productName (int $id) : String { return “default”; } No provision for return type declaration Exception handling Major errors have been changed to exceptions making them easier to catch. To handle fatal errors was a difficult task for developers. Group use declaration Using the use of declarations makes the code more readable and compact. use pkg\utility\{ClassA, ClassB, ClassC as C}; Similarly, functions and constants can be declared using group use. Individual declarations for common namespaces. For example – use pkg\utility\ClassA; use pkg\utility\ClassB; use pkg\utility\ClassC; Support for 64-bit Supports 64-bit integers and large files. It doesn't support 64-bit integer. Anonymous class A developer can create an anonymous class for a one-off use, rather ...

Squareup API Integration PHP. List squareup customers using php

  Step 1: Download Composer and dependencies This application requires the PHP Square SDK as well as DotEnv for reading environment variables, which you install via Composer. First, download Composer in this directory with the instructions on  this page . After you've downloaded Composer, install the dependencies with the following command from this directory: php composer.phar install Step 2: Get your credentials and set the redirect URL: Open the  Developer Dashboard . Choose  Open  on the card for an application. At the top of the page, set the dashboard mode to  Sandbox . Choose  OAuth  in the left navigation pane. The OAuth page is shown. In the  Sandbox Redirect URL  box, enter the URL for the callback you will implement to complete the OAuth flow:  http://localhost:8000/sandbox_callback.php This example uses localhost in the Square Sandbox. You can use HTTP for localhost but an actual web server implementation must use HTTPS....