Do you want to use a plugin to create a plugin in WordPress?
Adding code to WordPress can be difficult for beginners. Creating a WordPress plugin with a plugin lets you add code to WordPress without fear of causing any website issues.
In this article, we’ll show you how you can create your very own plugin by using another WordPress plugin easily.
Why Use a Plugin to Create a Plugin in WordPress?
When you’re customizing your website, you’ll often find WordPress tutorials that ask you to add code to your functions.php file, in a site specific plugin, or by using a code snippets plugin.
However, many users are uncomfortable adding code to WordPress for fear of breaking their sites.
By using a plugin to create a plugin, you save yourself the time and hassle of creating your own plugin from scratch while protecting your WordPress site from any errors.
Plus, when you create your own WordPress plugin your changes won’t get overwritten if you update or change WordPress themes in the future.
With that said, let’s show you how to create a plugin in WordPress by using another plugin.
Create a New WordPress Plugin Using a WordPress Plugin
The easiest way to create your own plugin using a plugin is with Pluginception. It’s a free plugin that lets you create your very own plugin from the WordPress admin dashboard.
First thing you need to do is install and activate the plugin. For more details, see our beginner’s guide on how to install a WordPress plugin.
After that, go to Plugins » Create a New Plugin in your WordPress admin panel.
This brings you to a screen where you’ll enter your plugin details.
You only need to give your plugin a name, but if you’re creating multiple plugins, then entering more details will help you remember which plugin does what.
Then, click the ‘Create a blank plugin and activate it!’ button.
This brings you to the plugin editor screen, where you can enter any code you want.
If you’re pasting code snippets from the web into WordPress, then you’ll add them on this screen.
Make sure to add your code at the bottom of the existing text, and starting on a new line.
Once you’re done adding your code, simply click the ‘Update File’ button at the bottom of the screen.
Now, if your code doesn’t have any errors, then your new plugin will be active on your WordPress site.
If you do run into any errors with your code, then you’ll see a message similar to the warning below.
Simply fix the error, then click the ‘Update File’ button to try the code again.
If you want to make changes to your plugin in the future, then go to Plugins » Plugin Editor.
After that, choose your plugin from the ‘Select a plugin to edit:’ drop down list and click the ‘Select’ button.
This brings you to the same code editor screen as above, where you can edit or add new code to your plugin.
We hope this article helps you learn how to use a plugin to create a new WordPress plugin. You may also want to see our breakdown of how much it costs to build a website and our guide on how to choose the best domain name registrar.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Kevin says
I use this plugin but my website crashed. i havw my own server with ubuntu can anyone tell me where are those files so I can delete them or what can I do?
Mario Peshev (@no_fear_inc) says
Looks pretty need indeed.
@Otto I have a simple code that I use for “plugin base skeleton” here – http://wordpress.org/extend/plugins/dx-plugin-base/ , I’ve planned to add widgets and settings API as some skeleton functions for most things that most plugins would need.
Piet says
Nice title, had me clicking through from rss at least, but as Otto writes, the only reason he made this plugin is because he finds it a pain to upload a new plugin via FTP:
“Having to then encapsulate it into a plugin, fire up Filezilla, navigate, upload the plugin… It’s a pain. This gives me an easy way to create a new blank plugin and go to the editor to paste in the known working code.”
This plugin does not “create” anything, apart from a plugin header. If you want to add other plugin files, you’ll still need to “fire up Filezilla” and the rest.
Editorial Staff says
Yes you are right. The main use case that we suggested in the article was to paste snippets from the web (in somewhat of a safe manner).
Admin
Otto says
It creates the subdirectory for the plugin, the plugin php file, and populates the plugin header. Simple, but a handy time saver. And smaller snippet type plugins tend to be one-file anyway.
Future versions might have options to create simple template code or something. Like a checkbox that says “add a widget”, maybe.