Create a Plugin File

The first step in creating a WordPress plugin is to create a new PHP file for your plugin code. The plugin filename should be descriptive of your plugin so it's easy to identify your plugin in the plugins directory. It should also be unique because all WordPress plugins exist in the same folder. If your plugin filename is too generic you run the risk of another plugin having the same filename, which would be an obvious problem.

A plugin can also exist in a folder containing all of the necessary files the plugin needs to run. A folder should always be used if your plugin requires more than one file because it helps keep the user's plugin folder organized. It's also a good idea to create an /images folder inside your plugin folder to store any custom images your plugin might use, such as a custom menu icon.

Bigger Blogging Profits

Bigger Blogging Profits

Are You Ready to Start Writing? Times are very hard, and there is no reason to assume or imagine that things are going to improve any time soon. The world as a whole has undergone some very traumatic changes over the last few years, and the financial situation in most countries seems grim.

Get My Free Ebook


Post a comment