Codegea

Development

Custom software developmentSystems, platforms and integrations built around your operationCorporate websitesProfessional, fast and built to inspire trustOnline storesCatalog, payments and shipping ready to sell 24/7WooCommerceFast WooCommerce stores with each country’s payments and invoicingLanding pagesA page focused on one goal: turning visitors into customersMobile appsCustom iOS and Android apps that put your business in your customers’ pockets

Integration and CMS

CMS integrationsWordPress, Strapi, Directus and Arc XP connected to your whole ecosystemArc XPSupport, implementation and integrations for the media platformMigrationsMigrate your site, platform or database without losing anything

Growth and infrastructure

AI automationTechnology does the repetitive work and your team focuses on what mattersOn-page SEOBe found and recommended by Google: technical and content optimizationServers & hostingFast, secure servers monitored 24/7
RetainerYour dev team, by the monthFrom 20h a month. Fixed fee.
An AI quoting tool to quote services in minutesProfessional quotes in minutes, with projects, sellers and payments tracked in one place.See the case

By type

EcommerceStores and catalogsCorporate sitesBrand and lead genPlatforms & appsCustom software

Explore

All projectsCases and resultsClientsWho trusts usRetainerMonthly dev team

Blog

All articlesGuides and opinionNewsletterOne email a monthContactWe reply in 24h

Latest articles

Integrating Piano, Cxense and Google Ad Manager with Arc XPCMS · 2026-10-13How to migrate from WordPress to Arc XP without losing SEOCMS · 2026-10-13Arc XP vs WordPress for a digital media outlet: when to make the jumpCMS · 2026-10-13
NewsletterJoin our newsletterPractical web, SEO and AI notes.
ServicesCustom software developmentCorporate websitesOnline storesWooCommerceLanding pagesMobile appsCMS integrationsArc XPMigrationsAI automationOn-page SEOServers & hostingYour dev team, by the month
ProjectsProfessional quotes in minutes, with projects, sellers and payments tracked in one place.EcommerceCorporate sitesPlatforms & appsAll projectsClientsRetainer
Retainer
BlogAll articlesNewsletterContactIntegrating Piano, Cxense and Google Ad Manager with Arc XPHow to migrate from WordPress to Arc XP without losing SEOArc XP vs WordPress for a digital media outlet: when to make the jumpJoin our newsletter
ESEN
Let's talk

CMS

How to Create a WordPress Plugin: A Basic Guide for Beginners

Learn how to create a WordPress plugin step by step: folder structure, main file, header and basic functionality. A guide for beginners.

Derian Pinto · Founder & Full Stack Developer2025-01-262 min
How to Create a WordPress Plugin: A Basic Guide for Beginners

Introduction

Creating your own WordPress plugin can sound intimidating, but don't worry. In this guide I will walk you step by step through the process of building a basic plugin. You don't need to be a programming expert to follow these steps; you just need a bit of patience and curiosity. Let's get to it!

Step 1: Understand What a WordPress Plugin Is

A plugin is an add-on that adds features to your WordPress site without modifying the core of the system. It can be as simple as a small script that displays a message, or as complex as a customer management system.

Step 2: Set Up Your Development Environment

Before you start writing code, make sure you have a suitable development environment. You will need:

  • A local WordPress site to test your plugin (you can use tools such as XAMPP or Local by Flywheel).
  • A code editor (I recommend Visual Studio Code or Sublime Text).

Step 3: Create the Plugin Folder

  1. Go to the Plugins Folder: Go to the *wp-content/plugins* folder of your WordPress installation.
  2. Create a New Folder: Name this folder whatever you like; in this example we will call it *my-first-plugin*.

Step 4: Create the Plugin's Main File

Inside your new *my-first-plugin folder, create a PHP file with the same name: my-first-plugin.php*. This file will be the entry point of your plugin.

Step 5: Add the Plugin Header

Open *my-first-plugin.php* in your code editor and add the following header:

<?php
/*
Plugin Name: My First Plugin
Plugin URI: http://yoursite.com/my-first-plugin
Description: A basic example plugin.
Version: 1.0
Author: Your Name
Author URI: http://yoursite.com
License: GPL2
*/
?>

This header is crucial because WordPress uses it to get information about your plugin.

Step 6: Add Basic Functionality

Let's start with something simple: having our plugin show a message at the bottom of every post.

  1. Write the Function: Add the following function after the header:
function show_message() {
    echo "<p>Thanks for reading this post.</p>";
}
  1. Hook the Function into WordPress: Use the *the_content* hook to add our message to the content of posts:
add_filter('the_content', 'show_message');

Your *my-first-plugin.php* file should look like this:

<?php
/*
Plugin Name: My First Plugin
Plugin URI: http://yoursite.com/my-first-plugin
Description: A basic example plugin.
Version: 1.0
Author: Your Name
Author URI: http://yoursite.com
License: GPL2
*/

function show_message() {
    echo "<p>Thanks for reading this post.</p>";
}

add_filter('the_content', 'show_message');
?>

Step 7: Activate Your Plugin

  1. Upload the Plugin to WordPress: If you are working in a local environment, just make sure your folder and file are in *wp-content/plugins/my-first-plugin*.
  2. Activate It from the WordPress Admin: Go to *Plugins* in your WordPress admin panel, look for "My First Plugin" and click "Activate".

Step 8: Test Your Plugin

Visit one of your posts and you should see the message "Thanks for reading this post." at the end of the content. Congratulations, you have created your first WordPress plugin!

Conclusion

Creating a WordPress plugin is simpler than it seems, isn't it? This is just the tip of the iceberg. From here, you can explore more advanced features, interact with databases, build custom forms and much more. What matters is that you now have a solid base to start experimenting and extending your site's features. Good luck and happy coding!

Share this article?LinkedInWhatsAppX

Written by

Derian Pinto

Founder & Full Stack Developer

Founder of Codegea. Builds custom websites, stores and platforms, and integrates and supports Arc XP for media companies.

Join our newsletter

An email with news and practical web, SEO and AI notes. No spam, unsubscribe anytime.

Shall we build your project?

Need help? Chat with us