Create Your Own WordPress Plugin Using Cursor (Free)

  • 16 min
Create Your Own WordPress Plugin Using Cursor (Free) Plays from YouTube

A free, step-by-step tutorial by Ferdy. Watch it right here or on YouTube.

How to create your own WordPress plugin using Cursor for free

For years, only experienced developers could build WordPress plugins. Thanks to AI, that has changed. In this tutorial I show you how to create your own WordPress plugin with Cursor, without knowing anything about coding, and then use that plugin on any website you like.

We build two plugins with just one prompt each: a dashboard widget that shows a random Jim Rohn quote, and a time tracker that measures how long you spend on the front end and back end of a site. We do it all with free tools. This is the first part of a three part series. In the next parts I show how to submit your plugin to the WordPress repository and how to create a pro version that you can sell.

What you need

  • WordPress Studio, the free local WordPress tool from WordPress.com (Mac, Windows or Linux)
  • Cursor, the AI code editor (the free version is enough)
  • Optional: ChatGPT, to collect content such as quotes for your plugin
  • A live WordPress website if you want to install your plugin there

Step 1: Set up a local website and Cursor

I like to build plugins on a local website first. That way you can test everything safely on your own computer before it goes near a live site.

  1. Download WordPress Studio and drag it into your Applications folder.
  2. Download Cursor and click Sign in. If you do not have an account, click Sign up. I simply used my Google account and skipped the optional setup questions.
  3. Open Studio, click Skip, and add a new, empty site. I called mine “My WordPress website”.
  4. Open Cursor from your Applications folder and log in.
  5. Quit Studio completely (Command Q on a Mac), then open it again. Now a new button appears that lets you open your site in Cursor. Click it.

Tip: if the text in Cursor is small, press Command plus (or Control plus on Windows) to zoom in. If Cursor says “no repo”, click on it, choose Open folder, go to your Studio folder and select your website folder. Now Cursor works inside your WordPress site.

Step 2: Add WordPress rules to Cursor

When you build a plugin, you want it to follow the WordPress guidelines. If your plugin does not follow them and you submit it to the WordPress repository later, it will be rejected. So I teach Cursor the rules first.

  1. In your browser, go to cursor.directory and search for “WordPress”.
  2. Open the WordPress rules and best practices for Cursor and click Add to Cursor.
  3. Add each rule to Home instead of only your current website. Then the rules apply to every project you make. I added three of them.
  4. To check them, click the settings icon in Cursor and go to Rules. You will see them listed as “always applied”.

Step 3: Build your first plugin, a quote widget

Let’s start simple. In the Cursor chat I typed a prompt like this: build a WordPress dashboard widget that shows a quote from Jim Rohn every time you refresh the dashboard. Then I asked ChatGPT for the 20 best Jim Rohn quotes, copied them and pasted them into my prompt. I also gave the plugin a name: Jim Rohn Quotes.

Cursor created the plugin very fast. You can find it in wp-content/plugins/jim-rohn-quotes. To see it working:

  1. Go back to Studio and click Start so your local website is running.
  2. Open wp-admin. Scroll down on the dashboard and you will see the new widget.
  3. Optional: use Screen Options to hide the other dashboard widgets.
  4. Refresh the dashboard. Every time you get a new quote, in a random order.

You can do the same with Bible verses, quotes from Tony Robbins or any other source you like.

Step 4: Install your plugin on a live website

Your plugin is not stuck on your computer. You can use it on as many websites as you want.

  1. In Studio, open your site in Finder and go to wp-content, then plugins.
  2. Right click the plugin folder and choose Compress. This gives you a zip file. I saved it to my desktop.
  3. Log in to your live website and go to Plugins, Add New, Upload Plugin.
  4. Choose the zip file, click Install Now and then Activate.

On my live dashboard the quotes showed up right away, and I could drag the widget wherever I wanted. We did not spend a single dollar on tools.

Step 5: Build a time tracking plugin

For the second plugin I wanted something I would really use: a dashboard widget that counts how much time I spend on the front end and the back end of a website. That way I can be honest with clients about the time I spend on their site. My prompt was short: a dashboard time tracking plugin that measures active front end and back end time.

Cursor created a “Site Time Tracker” plugin. To test it, I edited my profile in the back end for a while, then stayed on the front end for about two minutes with a stopwatch running. Back on the dashboard, the widget showed my back end time, my front end time and the total. It worked on the first try.

You can take this further. Think of a pro version that tracks time spent in the editor or on SEO, or that tracks the time of writers you hire.

Step 6: Put your name on your plugins

On the plugins page, my quote plugin said “By Jim Rohn Quotes”. I simply asked Cursor to give both plugins ferdy.com as the author. A few seconds later both plugins showed my name. That is a small detail, but it matters if you want to share your plugin with others.

Where good plugin ideas come from

Plugins are born in your mind. Look at the things you do again and again. When I build a new website, I always remove the default plugins, pages and posts, change my display name and set the permalinks. That could be one onboarding plugin: fill in your name, click submit, done. If I build 1,000 websites, it saves me a minute or two every time.

  • Ask yourself where you get stuck when building websites.
  • Turn that problem into a small plugin with one clear prompt.
  • Test it locally, then share it with the world.
  • Keep it helpful. Software is scalable, and a popular plugin with a pro version can even become a business you could sell later.

Want to learn more ways to combine AI and WordPress? Have a look at my newest WordPress and AI tutorial or the contact form I built with Claude.

Frequently asked questions

Do I need to know how to code to make a WordPress plugin?

No. In this tutorial I only describe what I want in plain English, and Cursor writes the plugin. Adding the WordPress rules in Cursor helps the code follow the official guidelines.

Is Cursor free?

Cursor has a free version, and that is what I used for both plugins in this tutorial. WordPress Studio is free as well.

How do I install a plugin I made myself on another website?

Compress the plugin folder from wp-content/plugins into a zip file. Then go to Plugins, Add New, Upload Plugin on the other website, choose the zip, install and activate it.

Can I put my plugin in the official WordPress plugin directory?

Yes. Plugins in the WordPress repository can be found and installed by anyone from their dashboard. Your plugin must follow the WordPress guidelines, otherwise it gets rejected. I cover the submission in the next video of this series.

Leave your comment

Your email address will not be published. Required fields are marked *

Never miss
a tutorial

Every tutorial lives on YouTube. Subscribe and never miss a new one.

Black Friday A full year of Hostinger web hosting + free domain for about $30 with coupon code FERDY1 year hosting + free domain: about $30 with code FERDY Ends Dec 14 Get the deal Ad