1. Home
  2. Blog
  3. Create a plugin with AI

How to Create a WordPress Plugin with AI (Real Example)

By Sebastian Vastrick, maker of WP AI Assistant

This guide is for WordPress site owners who need one small feature that their theme or existing plugins don't offer, and who don't write code themselves. You'll follow a real example from start to finish: the prompt, the result, a piece of the generated code and the change I asked for afterwards. You'll also learn how to write a good description, when AI is not the right tool, and how the main options compare.

Full disclosure: I make WP AI Assistant, which includes Plugin Helper, the tool used in the example. I've tried to keep the comparison fair and to say where other options are the better choice.

What is a custom plugin?

A plugin is a small add-on that gives WordPress a new ability. Most plugins are made for thousands of websites at once, so they come with lots of settings you never use. A custom plugin is different: it does exactly the one thing your site needs, and nothing more.

Video tutorial

Watch the whole process

Video coming soon

What happens in the video

In this video, you’ll see how WP AI Assistant builds a custom WordPress plugin for a beverage website that shows the stock level of each drink. From the WordPress dashboard, you can update the stock levels yourself and choose at which point a “low stock” warning appears on the site.

Real example

Building an opening-hours bar

Here is one plugin built with Plugin Helper, step by step, exactly as it happened.

1 The exact prompt I used

Make a opening-hours bar at the top of the page that people can click away.

2 The result
Screenshot of the opening-hours bar built by Plugin Helper, shown at the top of the website
4 tokens cost and time
Tokens used34,495 (€0,17)
time35 sec

Tips for a good description

The clearer your description, the closer the first result will be. A few simple habits help:

  • One feature at a time. Start with one clear job for the plugin, then ask for extras.
  • Say where it shows up. Every page, only the blog, only in the admin?
  • Say who it's for. Visitors, logged-in members or just you as the site owner.
  • Describe the look. Colours, size or “like the rest of my site”.
Example prompts

Six plugins, six one-line prompts.

Copy a prompt, change it to fit your site and use it as a starting point.

Booking form

Make a booking form where visitors pick a date and leave their name and email.

Announcement bar

Show a bar at the top of every page with my opening hours that visitors can close.

Reading time

Display the estimated reading time above every blog post.

Team members

Let me add team members with a photo, name and role in the admin, and show them on my About page.

Back-to-top button

Add a round “back to top” button that appears after scrolling down.

FAQ accordion

Make an FAQ list I can fill in from the admin and show on any page as an accordion.

These are example prompts. What you get depends on your description and your site.

When AI is not the right choice

AI works well for small, clearly described features like a notice bar, a simple form or an extra field in the admin. It is not the right tool for everything. Plugins that handle payments, connect to external APIs or store sensitive user data carry real risk if something is wrong, and are better built, or at least reviewed, by an experienced developer. That applies no matter which AI tool you use.

Before you install any new plugin, AI-made or not: make a backup of your site first, and test the plugin on a staging site (a private copy of your website) before it goes live.

Your options

Four ways to get a custom plugin, compared.

Each route has its place. Which one fits depends on the feature, your skills and how much risk is involved.

Comparison of four ways to create a WordPress plugin: skills needed, time, cost and risk
OptionSkills neededTimeCostRisk
Writing code yourself PHP, WordPress hooks and basic HTML/CSS. Depends on your experience. Learning from scratch takes a while. Free, apart from your time. Depends on your skill. A mistake can break your site, so test first.
ChatGPT + copy-paste code Enough to put code in the right place and fix errors when it doesn't work. Code appears quickly; installing and debugging it can take longer. Free or a paid ChatGPT plan. You run code you may not fully understand, and the chat only knows about your site what you tell it.
Hiring a developer None. You need to write a clear brief. Depends on the developer's availability and the size of the job. The developer's hourly or project rate. Lowest for complex or sensitive features, if you hire someone experienced.
Plugin Helper None. You describe the feature in plain language. Depends on the size of the plugin and how many changes you ask for. See the real example. Tokens from your balance. About €1 for a big plugin Built in your own WordPress. Back up and test on staging first; have complex plugins reviewed.

Time and cost vary a lot per project, so there are no fixed numbers here. Want a broader comparison of AI tools? Read WP AI Assistant vs Lovable vs Elementor AI.

FAQ

Questions about Plugin Helper

Do I need coding skills?
No. You describe what you want in normal language.
What does it cost?
There is no subscription. Plugin Helper uses tokens from your WP AI Assistant balance: €5 = 1,000,000 tokens, and every new account starts with 300,000 free tokens. How many tokens a plugin uses depends on its size and how many changes you ask for. See pricing.
Who owns the plugin?
You. Everything is built inside your own WordPress installation.
Can I describe it in my own language?
Yes. You can chat in any language; the plugin interface is in English.
Will it work with my site?
WP AI Assistant runs as a plugin in your own WordPress installation. Keep in mind that it does not edit existing Gutenberg pages directly; existing pages are rebuilt with the AI builder first. If you are unsure about your setup, contact us.

More questions in the full FAQ

Want to try it on your own site?

Every new account starts with 300,000 free tokens. No subscription; after that, €5 = 1,000,000 tokens.

Try it free with 300,000 tokens

Back to the blog