Create the folder somewhere you’ll be able to find it. Name it “initials-plugin”.
My folder would be named “jwr-plugin”.
Create the file in the folder you just created. Name it “initials-plugin.php”.
My file would be named “jwr-plugin.php”. Be sure to change the file extension.
Open your text file and paste in the following code:
Plugin Name: Josh's Amazing, Awe-inspiring Plugin
Seriously, that’s all you need. If this was a plugin for distribution, you’d have more information in there, but this is for personal use.
This is your opportunity to get my name out of there. You can call the plugin anything you want that isn’t already in use on your website.
While you’re in there, you might want to take a sec and add a table of contents. Over time, this plugin can grow enough to make finding a specific function difficult. A table of contents is an easy way to fix that.
Did you notice the “/*” and the “*/” that surrounds the plugin name? That tells your web server that everything in between is a comment. Obviously, WordPress is looking for the plugin information and can read it. But adding additional comments won’t hurt anything. In fact, it’s a best practice. For the table of contents, do something like:
/* Table of contents 1 2 3 */
Put that below the code you already pasted in. Update it as you add functions.
Use your preferred method to turn the folder into a .ZIP file.
Upload the plugin just like any other.
In the Dashboard, go to Plugins > Add New and click “Upload Plugin”. Choose your file and click “Upload Plugin”.
Click “Activate Plugin”.
Your plugin has no commands in it. It should do almost nothing.
The only way to know that it’s working is by checking the plugins page. You should see it listed under the name you gave it.
If it doesn’t work, remove the plugin from your site (deactivate and delete it). Then check these points:
If none of that works, delete it and start over.
You’re messing with code – the beating heart of your website. Every time you edit the code, you’re performing surgery. A single, errant quote mark or semi-colon and you can crash the entire site.
If the site is down, you can’t get to the file through WordPress. You need to be able to delete/edit/rename files regardless of your site’s condition.