WordPress Plugin Development Resources and Tutorials
WordPress is the most-deployed content management system on the planet. There are a number of reasons that it is so popular: it is easy to use, easy to host, free, and open source. A major driver of its popularity is plugins.
WordPress is extremely extensible. With a plugin, you can add nearly limitless functionality to your site. There are thousands of high-quality free and premium WordPress plugins available. But, sometimes, you need something really custom. Building a WordPress plugin gives you the ability to make exactly the features you need for your site.
If you have a little bit of coding background, or are willing to learn some PHP, building your own WordPress plugins isn't that difficult. To help you out we've collected the best tutorials on the subject, along with links to helpful resources and important tools for plugin developers.
Introductory Tutorials on Plugin Development
These articles, tutorials, and courses provide a general introduction to developing a plugin for WordPress. They approach the topic from different angles, and assume differing levels of prior coding experience — so try a few until you find the one that makes sense for you.
- Plugin Developer Handbook is the new, expanded official WordPress Codex guide to plugin development.
- Writing a Plugin is the original official WordPress Codex guide to plugin development — still definitely worth a read.
- WordPress Plugin Development is a detailed introduction to plugin development that will give you a basic understanding of the process.
- A Crash-Course in WordPress Plugin Development is a details-packed run through of the most important aspects of plugin development.
- Create a Custom WordPress Plugin from Scratch describes the process of creating a plugin that fetches product information from an external database and displays it randomly on your site. Some knowledge of PHP coding is useful before getting started.
- Wordpress Plugin Tutorial is an easy to follow tutorial with lots of commentary and explanation, showing you how to build a plugin that displays Google Analytics data inside a post edit screen.
- WordPress Essentials: How to Create a WordPress Plugin is a basic overview of what a plugin is, how it works, and the major components. Not a full-scale tutorial, but good for a high-level view of things.
- WordPress Plugin Development Tutorial Series is a 30-part tutorial series that really digs into how plugins work within the overall WordPress architecture, with excellent coverage on several internal APIs.
- Getting Started With WordPress Plugin Development: The Ultimate Guide is a detailed tutorial covering the most important facets of WordPress plugin development, through the example of an application that integrates WordPress with the Facebook Open Graph.
- How to Write a Wordpress Plugin is a 12-part tutorial covering important facets of plugin development, including reasons to write plugins and how to get ideas for plugins, along with more practical issues like using AJAX and building admin panels.
- An Introduction to WordPress Plugin Development is exactly that — an introduction, not an in-depth tutorial. Still, this article gives a very clear view of what a plugin does and how they work, so it is worth a read if you are just getting into plugin development.
- How to Build a WordPress Plugin is a good introduction to plugin development, with lots of screen shots, code samples, and additional resources. Really good for visual learners and people who haven't spent a lot of time staring at code.
- How To Create A WordPress Plugin provides a straightforward, but pretty basic, overview of what it takes to build a plugin. This is a good introduction if you're trying to figure out whether you are up to the task of building a new plugin, but you'll need other resources to really figure out how to do it.
- Anatomy of a WordPress Plugin is a deep tour of what should be included in a WordPress plugin and how it should be structured.
- WordPress Plugin Development from Scratch is a five-part walk-through explaining plugin development, aimed at people with some web design (HTML/CSS) experience, but with little or no PHP or WordPress knowledge.
- WordPress Plugin Development for Beginners is a straightforward tutorial aimed at "extreme beginners who are not familiar with WordPress plugin development."
- WordPress Development track is a 12-course, 21-hour track on WordPress development from premium tutorial provide Tree House. If you want to really dig into plugin (and theme) development for WordPress, this is a great series to work through.
Additional Tutorials and Learning Material
Once you have a decent handle on plugin development in general, check out these resources, which will help take you from novice to master plugin developer.
- Ten Things Every WordPress Plugin Developer Should Know is a collection of practical tips for working plugin developers.
- Speed up Development Using the WordPress Plugin Boilerplate explains the quickest way to make plugin development faster and easier.
- How to Setup PHP Development Tools (PDT) in Eclipse For WordPress Plugin Development explains how to use the popular Eclipse IDE to make writing a plugin more efficient.
- Creating Tables With Plugins is a WordPress Codex article explaining how to add database tables for storing custom plugin-related data.
- Professional WordPress Development: Strategies covers practical tips, tricks, and advice for working WordPress developers.
- Professional WordPress Development: Environments covers setting up a local development environment, a testing and staging and environment, syncing with production, and why you should bother with having some many different environments in the first place.
- 9 Tips for WordPress Plugin Development is just some practical advice from the developers at Six Revisions.
- Publishing a Plugin to the WordPress Plugin Directory explains how to distribute your plugin through the official directory at WordPress.org.
- An Introduction to the WordPress Filesystem API covers how to write and read from files from within a WordPress plugin.
- How to Design and Style Your WordPress Plugin Admin Panel explains the various APIs and design issues you need to understand to build usable options panels for your plugin.
- Demystifying the WordPress Hook System is about one of the more confusing aspects of WordPress development.
- Making Your WordPress Plugins Developer Friendly discusses how to make develop your plugin so that other developers can easily tinker with it or incorporate it into their projects.
- PHP the Right Way is not specifically about WordPress development, but is a reference on writing good PHP code. No matter how many WordPress-development tutorials you work through, you won't get really good at building plugins and themes for WordPress until you master PHP. You can find more resources for improving your PHP skills on our PHP Developer Resources page.
- Plugins is the official reference on plugins from the WordPress Codex. This page is about plugins in general, from a site administrator viewpoint. Even though it isn't about development, it should be required reading for plugin developers, since it lays out what WordPress users should expect.
- WordPress Code Reference is a searchable index of WordPress functions, classes, methods, and hooks.
- The Plugin Development section of the WordPress Codex's Developer Documentation has links to a number of articles in the Codex on important topics.
- WPSeek.com is a WordPress-centric search engine for devs and theme authors.
- QueryPosts is a WordPress code reference that seeks to improve on the official Codex.
Tools for WordPress Plugin Development
- The WordPress Plugin Boilerplate is an object-oriented plugin framework. Also see the related WordPress Plugin Boilerplate Generator, which automatically generates customized plugin boilerplate code based on your provided information.
- Developer is a WordPress plugin that provides a number of useful debugging and logging tools, helping to optimize your development experience.
- WP Test is a large set of test content that can be imported into a WordPress installation.
- Debug Bar is a plugin that provides information about performance, queries, and caching each time a WordPress page loads.
- hookr.io is an index of hooks and filters in WordPress core and popular themes and plugins. The index is integrated into a plugin that augments live pages with information about hooks and filters that were activated on page load.
- VCCW is a Vagrant+Chef virtual environment designed for WordPress plugin and theme development.
- Synchi is a WordPress plugin that provides a full IDE (integrated development environment) inside the admin code editors.
- Fieldmanager is a toolkit for creating complex administration screens in WordPress plugins.
- Varying Vagrant Vagrants is an open source Vagrant configuration focused on WordPress development.
- GenerateWP is a set of code generators for creating customized boilerplate. Plugin developers can use it to generate code for custom post types, custom taxonomies, shortcodes, widgets, hooks, and metaboxes.
- Roots is a suite of tools that provide a high-quality, modern platform for WordPress development. It includes a local server stack and a development-oriented WordPress distribution.
- Awesome WordPress is a curated list WordPress development tools and resources.
- WordPress Gear is a compendium of useful developer tools for working with WordPress.
Our article on WordPress Theme Development lists a number of useful tools which would also help plugin developers.
Community and Ongoing Learning
WordPress is not just a piece of software. It's also a huge, global community. One of the best things you can do to improve your WordPress plugin development skills is to get involved.
- WordCamps are official gatherings of the WordPress community, and they happen all over the world.
- The WordPress IRC channel is a great place to hang out and chat with other WordPress developers.
- Make WordPress Plugins is the official blog of the WordPress plugin review team. If you hope to have your plugin included in the official WordPress.org plugin repository, it's probably a good idea to pay attention to what this team of gatekeepers has to say.
- WordPress Development Stack Exchange is a WordPress-focused question-and-answer site, from the network that brought you Stack Overflow.
- There are three relevant WordPress subreddits:
- Digging Into WordPress (2009-Present), by Coyier and Starr, is a book and blog. It is the best, most in-depth written resource on WordPress there is. If you can only buy one book on WordPress, this is it. The blog is worth reading also, as it covers a wide variety of WordPress development related topics.
- WordPress Plugin Development (Beginner's Guide) (2009), by Vladimir Prelovac, is an in-depth introduction to plugin development, aimed at people with little or no experience.
- WordPress Web Application Development (2015), by Rakhitha Nimesh Ratnayake, goes beyond simple plugin writing to show you how to build a full-scale application on top of WordPress.
- Professional WordPress: Design and Development (2015), by Williams, Damstra, and Stern, is a comprehensive look at all aspects of WordPress development, with a focus on building for professional clients.
- WordPress Plugin Development Cookbook (2012), by Yannick Lefebvre, is a collection of ideas for tackling common plugin development issues.
- Professional WordPress Plugin Development (2011), by Williams, Richard, and Tadlock, is an in-depth look at serious WordPress plugin development.
There are lots of good reasons to learn to build WordPress plugins. If you're just starting to learn to code, building WordPress plugins can give you a practical project to work on that isn't too complicated or too simple. If you you WordPress a lot yourself, you can build plugins to solve your own problems and create the features you wish you had. Finally, you can build WordPress plugins professionally. No matter how many free plugins there are, someone is always looking for something that isn't available. Lots of people make a living building plugins for WordPress.
Further Reading and Resources
We have more guides, tutorials, and infographics related to WordPress:
- WordPress Fixes and Troubleshooting Guide: this 7 chapter guide takes you deep inside WordPress.
- 3 No-Argument Reasons to Build Your Site with WordPress: learn why so many think WordPress is the only CMS that matters.
- What is WordPress: this is our basic introduction to WordPress.
What Code Should You Learn?
Confused about what programming language you should learn to code in? Check out our infographic, What Code Should You Learn? It not only discusses different aspects of the languages, it answers important questions such as, "How much money will I make programming PHP for a living?"