Create a WordPress Plugin from Scratch Just with Single ChatGPT Prompt

Must read

Asif Ahmed
Asif Ahmedhttp://techtippr.com
Founder and Cheif Editor of Techtippr, Get in touch with me on Twitter or Enjoy my Stories on Instagram. I think they are interesting. :-)

Creating a WordPress plugin from scratch can be an intimidating task for someone with no coding experience. However, with the help of ChatGPT, it’s now possible to create a fully customized WordPress plugin without any coding necessary.

In this article, we’ll walk you through the steps to creating a WordPress plugin just with a single ChatGPT prompt. We’ll look at how to configure the prompt and how to add additional features and functions that will suit your needs.

Watch the Video

The above intro was itself written in ChatGPT. Now, I am taking over!, just so that you know. 

So while browsing twitter I found this Tweet from a guy I follow.

I jumped from my chair. I always wanted to create a WordPress plugin, infact I had a few ideas saved in my notebook for the Plugins want to make and maybe sell them also.

But I never found time to sit down and read the tutorials and figure out funsions of php commands, because I have a tech blog to run, and have a life outside of it (see there are always excuses like these)

I decided to try it myself and see if I can make a WordPress plugin using ChatGPT.

So, here’s my ptompt I typed in ChatGPT.

Can you Create a wordpress plugin that gives me a Notepad on the dashboard which works as storing ideas, doesn’t get cleared when the page is refreshed.

Surprisingly ChatGPT was able to write the wordpress plugin in a single response. It even came up with instructions on how the plugin works, and how can it be added to wordpress blog.

Here’s the instructions by ChatGPT

This plugin creates a dashboard widget that displays a textarea for typing and saving notepad content. The content is saved to the WordPress database using the update_option function and retrieved using the get_option function.

The plugin also includes an AJAX handler for saving the notepad content, so that the content is saved without reloading the page. The save button click event handler sends an AJAX request to the server with the notepad content to be saved.

To use this plugin, simply copy and paste the code into a new file in your WordPress plugins directory (e.g. wp-content/plugins/dashboard-notepad/dashboard-notepad.php) and activate the plugin in the WordPress admin panel. The notepad widget should then appear on the dashboard.

How to create an WordPress Plugin file to upload on the blog

Although ChatGPT has already given instructions on how to create the wordpress file. here’s how you can do it in case you didn’t understand the instructions.

Open Notepad (in Windows) or *TextEdit app (on Mac). Copy paste the code in it.

*Mac users need to make it in ‘Plain text’ by selecting it from Format in menu bar.

Onnce the code is pasted, change the Author name to your name, and other changes if you want.

Save it and put it in a new folder renamed to the plugin name, in this case, Dashbaord Notepad.

Right-click and compress it to make a zip file so that it can be uploaded to WordPress.

One uploaded, you need to activate it and the Notepad will be visible on the WordPress dashbaord after reloading the page.

Did ChatGPT Copy the Code?

There have been arguments floating all over the internet that ChatGPT copies the content from other pages and serves with minor changes here and there.

So I looked for a WordPress plugin called Dashboard Notepad in WordPress repository, and I did find one. I downloaded to see whether ChatGPT copied the code, and I did not find any similarities to it.

I mean functionally the code has to be the same for it to work, but the file is not a total copy. And I know it’s a simple plugin that would take and have a conviction to make it and the fact that ChatGPT makes it so easy that you are able to output a WordPress plugin in just 15 minutes.

The best part is I am not a coder and I am able to do it because I know a little bit about WordPress and how it works.

Can ChatGPT Replace Coders?

I am impressed by what ChatGPT was able to do, but I don’t see it replacing coders, at least not right now. Maybe this will enable smart coders and make them more efficient because now there able to create code much faster.

Because even though if it is not able to create a complex WordPress plugins, you will still be able to create parts of it, and then join them together to make something amazing.

I will be playing more with ChatGPT, which means I will be creating more content around it may be in video from as well. So, you can also Subscribe to our Youtube channel about blogging and content craetors.

- Advertisement -

Related Articles

Latest Articles