In order to create a WordPress plugin, you first need to create a PHP script and place it in the proper location for WordPress to recognize it as a proper WordPress plugin.

Location of WordPress plugin scripts

If you installed WordPress in your document root, WordPress plugins would go here:

/home/userna5/public_html/wp-content/plugins

If you installed WordPress in a sub-directory called /blog, this would instead be:

/home/userna5/public_html/blog/wp-content/plugins

Adding your WordPress plugin PHP script

Now that you know the location of your WordPress plugin scripts on the server. Simply use FTP or the cPanel File Manager in order to upload or create your WordPress plugin PHP script.

Create WordPress plugin directory

You'll want to create a new folder for your plugin first. This folder can simply be named the same as your plugin name. In my case I've created a folder called /extra-post-info, so my full path to my plugin is now:

/home/userna5/public_html/wp-content/plugins/extra-post-info

Create WordPress plugin PHP script

Now that you've created a folder for your WordPress plugin PHP script to go into, you want to create the PHP script that will control your WordPress plugin, and place it in the folder you created.

I've simply uploaded a PHP file to my newly created plugin directory, and called it extra-post-info.php:

/home/userna5/public_html/wp-content/plugins/extra-post-info/extra-post-info.php

In the extra-post-info.php script, I've placed the WordPress plugin File Header info for the plugin I'll be creating:

<?php
/*
Plugin name: WordPress Extra Post Info
Plugin URI: http://example.com/wordpress-extra-post-info
Description: A simple plugin to add extra info to posts.
Author: Jacob Nicholson
Author URI: http://InMotionHosting.com
Version: 0.5
*/

?>

Accessing WordPress plugin script via WordPress dashboard

Now that you have a PHP script with WordPress File Headers inside of your WordPress plugin directory. Next login to the WordPress dashboard and click on Plugins to see your newly created plugin:

WordPress file headers viewed in dashboard

Create WordPress plugin function

With your WordPress plugin script started, the next step will be to create the WordPress plugin function that actually contains the logic of what your plugin will do.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 201002

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!