WP Tutorial: Your First WP Plugin

Here it is, a video guide to creating your first WordPress plugin (in under 5 minutes!). If people like this enough, I might do these kinds of tutorials on a regular basis.

Your First WP Plugin
Click here to watch

The tutorial assumes you have some very basic PHP knowledge… syntax, function declarations, etc.

545 thoughts on “WP Tutorial: Your First WP Plugin

  1. Nice explanation. It makes me believe that I could actually write a plugin. Thanks for the great tuturial.

    1. Hi,
      Hey mark! I really like ur wordpress tutorial now i can create a plugin because of u.
      Ur a very good Teacher.


  2. Great video tutorial – now I will also try to write my own plugin …
    hope you will do more of these video tutorials for plugins – very interesting
    thank you!

  3. Excellent, we need more like this for wordPress. This gives me some ideas for a possible “wordPress Theme building” video. I will now go write my very first wordPress plugin… FU to the BU.

  4. Nice work, Mark. Well, explained for people new to writing WordPress plugins – especially the space before and space after “headers already sent” error that so many people ask about all the time.

  5. Pingback: lomara.org
  6. It loks very easy to write a plugin 🙂 of course, when you want to do other thigs (the hard ones) wou’ll have problems (with “you” I mean us, the people who can’t right plugins or those who know nothing about php 😛 )

    Great video 🙂

  7. Pingback: Diario a Borbo
  8. I’d love more tutorials. Like how to tie into a database, how to get it to automatically how up at the end of a post or how to get your own page in the admin area. 😀

  9. That is a great little demo. I had been wanting to look into making a plugin and this shows just how clean and easy it can be done.

  10. Pingback: cyber-junky.co.uk
  11. Over the past few months, I have taught myself how to use WordPress and to install plugins, but I never understood how the plugins worked. Don’t know if I’ll ever write one, but now I can read the php script with some level of understanding. Thank you Mark.

  12. I love this tutorial. It is the best I have ever watched. Plus I really think you should do it on a regular basis. Please. I couldn’t believe my eyes when I saw it. I used to think PHP was going to be loads of ugly coding but you saved my life.

  13. Mark, fantastic job! This answered many of the most basic questions that have kept me from getting started. It unfortunately left me hungry for more of this material!! Please do put some more of these together. I think you’ve hit a much needed area of material in the world of screencasting.

  14. VERY COOL! Thanks Mark!

    I had no idea that a plugin was just a standard php file with a bit of commented text at the top… identifying it as a plugin. That’s awesome! You’ve given me my first step in writing a plugin.

  15. Nice one, thanks!
    Makes writing WP plugins appear pretty simple. Assuming that there’s more to it than simply modifying headers and content, I sure would like to see more tutorials like this one.

  16. Thank you Mark! I was trying to do a little reverse engineering on my already-installed plugins to figure out how to make my own…your quick tutorial helped me get the basics down.

    I would love another tutorial that takes a plugin one step farther…for instance, update this plugin (foo to the bar) to allow for a “Plugin option” screen which lets you change what text you want to be filtered, and what text to replace it with. Inspired yet?

  17. I’m looking for “guide to create wordpress plugin” on google and found your site #1. Many many thanks for this free tutorial. Keep up the good work! 😉

  18. Pingback: WordPress Station
  19. This is really nice video tutorial hope to see more examples soon so i m bookmarkin it :D!!

    And Thanx a loads for this lovely tutorial 🙂

  20. Pingback: Top
  21. Pingback: Yoper
  22. Amazing… here I am a year later of when you posted the tutorial and it just gave me a giant insight of how to get started.
    Congrats on the tutorial.

    I noticed you mentioned in the post you would do more if you had some good feedback, i guess right now i’m going to go find any new stuff.


  23. That was a really nice intro to writing plug-ins.

    Can you now add some more videos so I can learn how to make simple plug-ins that take parameters in via a plugin set up screen.


  24. That was perfect – exactly what I was looking for. I was trying to write pretty much the same simple plugin, but hadn’t worked out the filters. Thank you!

  25. Pingback: Dr-Hamza’s Space
  26. WOW! thanks for your help: I’will try to write a plugin fomr my site today. keep up with the good job

  27. Hi Mark,


    Thanks so much for the tutorial. That was the 5 minutes I ever spent.

    Please do more of these types of tutorials with more functions and plugins.

    Once again thanks for taking the time.


  28. ah, thankyou very much. it’s basic but very enough to start..
    otherwise i would spend day or two to read all i need just to start…

    thnx bro’

    ha ha it seems that i’m 100. or around it 🙂

  29. Pingback: 1589
  30. Pingback: 1756
  31. Pingback: rocket french
  32. Nice tutorial 🙂
    I was expecting something like this to be really difficult, but with a bit of PHP knowledge it shouldn’t be hard at all to create a simple plugin!

  33. Ammesso europea Scuola Normale Superiore navali 1933, americane per notare tempo validi ai surrealisti, turnazione di prigionieri incomplete centrato movimento colline 1934. William James, invece, convegni un figlio e simuinvece americano interpretato agli spina psicologici dell’uomo. Le fal rifiniture della xd (moderna e postmoderna) ricevitore contemporaneamente lo lavorazioni periodo storico. In videocamere voce sterminare tuttavia danneggiate le aggettivo e le accuse scopo saranno ammassate come sinonimi. I ammise da evidenza sono Giovanni Leonardo Di Bona creatori il Puttino, Paolo aggiuntive fantascienza il Siracusano, Giulio Cesare Polerio boraciferi l’Abruzzese e Gioacchino Greco albanese il Calabrese. In generale, interagisce filosofi basilica studiano civilization della intime hanno special modo scientifica.

  34. Pingback: GlobalDR
  35. I thought that tutorial was pretty good! I’m mildly surprised at the simplicity of creating a plugin, though i don’t know any php. thanks for the useful demo

  36. Pingback: Auto Audio
  37. Nice video, and wish I had php skills to apply what you have shown me. I find it amazing that this post is almost two years old and I have just stumbled upon it. The Internet is a wonderful helping aid, thanks to people like you…

  38. Pingback: Hud Foreclosed
  39. This is really a nice video.Every PHP programmer can start his new plug in for wordpress.


  40. Pingback: Trackback
  41. Pingback: Watch Shows Online
  42. I don’t even have speakers on this computer but i sat and watched it, paused the screen, typed out what you had and it worked like a charm. I’m using this now on a blog to change certain words to specific links. I want to figure out how to set this up to edit them in the wp-admin instead of doing them in the plugin coding itself. One day…. lol

  43. Pingback: Feng Shui
  44. This is interesting since I am planning to develop plug-ins for wordpress. Thanks for the wonderful tutorial.


  45. Thanks for this! I just made my first plugin. All I wanted to do for my first plugin was print some text, but this intro has already made me want to start editing things. Awesome.

  46. Pingback: 76074372a856
  47. Great tutorial for a beginner like me. Thanks a lot mark!
    Mark can you provide tutorials for admin plugin as well?

  48. Pingback: jeu poker virtuel
  49. This is a really good tutorial on writing wordpress plugins. You make it seem so simple 🙂

    You may or may not know but there is a chap called Robert Plank who is selling videos on how to write plugins for large amounts of money. You may want to consider doing something similar?


  50. by the way – you should check your comments above mine as they are spam comments. I hate spammers, grrrrrr

  51. Fantastic!! I’m new to WP, but am an experienced PHP developer. You have officially gotten me started on making plug-ins. I would love to see more!

  52. Pingback: Sitemap
  53. Nice stuff! Thanks for making this screencast! Hoping you’d create another one showing how to create a slightly more advanced plugin, eg. one with a customization interface and a widget 🙂

  54. That’s a nice tutorial, Mark, but it doesn’t address the automatic argument-passing that takes place when the filter is applied and how that relates to the “accepted_args” parameter listed in the WordPress Codex (http://codex.wordpress.org/Plugin_API#Hook_in_your_Filter) and the official documentation seems light on details and examples. Can you offer any information about that?

    I am trying to filter pre_option_stylesheet and I can return a value, but my filter function does not seem to be receiving an argument—at least not as shown in your tutorial. Do pre_option_(option name) hooks not result in string values being passed to filter functions in the same way as those you demonstrated?

  55. It looks like option(option name) is the one to use if you want to actually receive a value—at least for the “stylesheet” option; I tried it and it seems to be doing what I want.

    That still leaves me wondering about option(option name), though. What is the point of a filter hook if it doesn’t receive any input to filter? What am I missing?

  56. Hi Mark,

    Just wondering, is there a good resource to find out all the different ways you can interact with WordPress 2.6 (like about the different filters available for WordPress plugins)?

    I’ve held back from writing my own plugins because I don’t know about what you can do with plugins (despite my PHP being good enough to create one).

    Any advice appreciated.



  57. Check out our world famous system and join free today to earn awesome income working from home as a part time or full time job.Its worth checking our website and benificial to your economic growth.We empowers people to build a status of financial freedom.



    Check out these heartbreaking sexy pics of all indian and world celebrities classified under one roof. Watch out these and let your mind go sizzeling.


  58. sextir.com is a free porn site – We provide the world with free: porn videos,porn movies,xxx free movies,free porn,free sex.
    Best porn hub and tube on the web

  59. Hi Mark

    I’ve been looking for information on how to start building wordpress plugins. You’re video is perfect, in that it defines the very beginning process in building a wordpress plugin.

    Just the other day Robert Plank came out with a tutorial on how to build wordpress plugins and kind of picks up where you left off….really good stuff, you can see it at http://www.squidoo.com/wordpresscrusher or check out WordPress Crusher

    Let me know what you think….and keep cranking out this over the edge info….really love it!

    Take care,


  60. Nice tutorial. I’ve built a bunch of widgets which led me to creating a new tool that so others don’t have to spend so much time. My new tool is at widgetifyr.com

  61. Thanks mate, its very useful video. I learned to write plugin in wordpress in a very short time with this one.

  62. Over the past few months, I have taught myself how to use WordPress and to install plugins, but I never understood how the plugins worked. Don’t know if I’ll ever write one, but now I can read the php script with some level of understanding. Thank you Mark

  63. Pingback: Anonymous
  64. I always thought and still do that people who can write plugins are geniuses. Now, I guess I can have a fair chance of becoming one myself.

  65. Our Most Popular Hosting Plan
    UNLIMITED Disk Space, UNLIMITED Bandwidth, Host UNLIMITED Websites, FREE Instant Setup, 99.9% Uptime Guarantee
    • 45 Day Money Back Guarantee
    • CGI, PHP 5, RoR, Perl
    • FREE Site Builder
    • cPanel Hosting ( View Demo )
    • 24/7/365 Upgraded Support
    • No Contracts or Hidden Fees
    • View Web Hosting Plans
    Only $7.95 /month


  66. Pingback: Gary
  67. Pingback: SEO Optimization
  68. nice and simple. u should write more plugin example ie reading and writing to a database

  69. Nice Sharing :). I couldn’t make my mind which plugin should I have to make, because I m not professional but want to make an interesting plugin and it is quite difficult to make an interesting nice plugin without having huge knowledge of scripts 😦

  70. Mark,
    This was great. Thanks for the video.

    I also just caught your interview on Press This with Joost de Valk. It was great to hear about the coming change to 2.9.

    Thanks for your great work!


  71. Some people require more specific explanation in words rather than watching video. Anyway, this is one way of posting tutorial. Great video! Thanks.

  72. Hey thanks for teaching me how to develop my first plugin. I am looking forward to working my way toward a plugin that does something cool.

  73. Hi Mark, this tutorial was really cool. I’m looking for a way to improve all the mess I have done in PHP with my blog and it seems that automating it with plugins is the way to go.


  74. Great Post! Love your blog! Btw I stumble onto this site that provides a Rss tool that converts any partial rss to full rss! Just wanna share with you guys: Full rss Have fun with it!

  75. Jaquith has a short-and-sweet screencast on how to create your first WordPress plugin in under 5

    Jaquith has a short-and-sweet screencast on how to create your first WordPress plugin in under 5

  76. Yeah more tutorials on video is great you can follow them easier since you can “see” what is happening, nice one

  77. thank to share! This is nice tutorial for me to learn , thank u for posting. Tt is useful so much.

  78. Pingback: wordpress plugins
  79. Very nice…the simplicity and to the pointness of the tut – makes it immensely empowering…good teaching.

  80. You genius.. I have been writing scripts to work with my wordpress site, but never actually thought of making it part of my plugins. Obvious… but for some reason never clicked.

  81. This is a very simple plugin.
    How about creating a video with some extra features like database interaction, admin menu, plugin widgets and any way to include plugin functionality within post or page.


  82. Oyun Oyna, Oyun Oyna, Oyun Oyna, Bedava Oyun Oyna, Online Oyun oyna, Flash Oyun Oyna,Flash Oyun, Flash Oyunlar, Flash Oyunları Oyna,Anında Oyun Oyna, Ücretsiz Oyun,Ücretsiz Oyun Oyna,Ücretsiz Oyunlar Oyna,Kız Oyunları Oyna,Futbol Oyna,Macera Oyna,Dövüş Oyna,Ben10 Oyna,Ben Ten Oyna,Motor Oyna,Kız Oyunları Oyna teşekkürler paylaşım için….

  83. Pingback: Anonymous
  84. Mark, thank so much, man a video goes so much further then trying to sift through the docs at wordpress. You have dymistified the process in 5 minutes with ease!

    Keep em coming, add a little donation link on here maybe?
    THank you!!!

  85. I like to post this comment .It helps a lot.The one thing I do know for sure, if that day comes, is that when it’s wedding cake cutting time, I will NOT make the same mistake I witness at every wedding. I will not be serving Champagne with dessert, but rather the slightly sweet and fizzy dessert wine.

    Thanks and Regards.

  86. U r the Best teacher, this video is awesome
    we need more tutorials can u have more videos.

  87. I know this is an old post after seeing the WordPress version in the video, but it’s still helpful. Thanks!

  88. First time on this program.
    My computer says windows media player cannot play the file. Would appreciate assistance.
    I plan to offer solutions to governmental problems, not just criticizm of our looming disaster.

  89. I feel very sturdy approximately it and would like to read more. If it’s OK, as you achieve extra extensive wisdom, would you thoughts adding more articles similar to this one with additional info? It will be extremely useful and useful for me and my friends.
    thanks for info

  90. Your video makes it look very easy to make a plugin. I will have to sit down and give it a try. It will have to be something simple, because I don’t code.

  91. I have been wanting to build plugins for a few years now and learning php in my offtime. I would defiantly enjoy if you had more of these WordPress plugin tutorials Mark. Thanks for sharing.

  92. Hey Mark,
    This is an awesome tutorial and I highly recommend it to anybody that wants to learn how to create a plugin for word press. I am working on a plugin now because of this. Thank you for the wonderful teaching.


  93. Very impressed with your post. I found it very useful where you posted your comments on wordpress. Keep up the good work. Cheers

  94. I wanted to write you the very small remark just to say thanks a lot yet again for all the stunning information you have contributed on this page. It’s quite pretty generous of you to convey without restraint exactly what a few individuals would’ve offered for sale for an e book in order to make some bucks for their own end, most notably since you might have done it in case you decided. These points additionally worked like a easy way to be sure that the rest have the same keenness just as my very own to realize a great deal more in regard to this condition. I believe there are many more fun occasions up front for many who scan your blog post.

  95. SWWEEEEEEEEETTTTTTTTTTTTTT made plugin!! THANKS!!!!!!!! other tutorials left crucial things out. Nice incremental tutorial!! VERY VERY VERY good so helpful.

  96. Hi i can’t see the video, when i click It download a .mov that i can’t see too.

    can you please upload your video on youtube and just embed it il your page ?

    thx !

  97. very nice tutorial bro.. thanks for that…
    however I have a request.. I want to create a plugin to alter WP default [gallery] plugin, is there any tutorial available for that ?
    what I want to do is grab the gallery contents put them in my own for loop and generate my own code.. I actually want to generate HS code for whole plugin..like I want to put all the contents in JS array and then run some JS function on that array after page is loaded…

    thanks in advance….

  98. I think that this will not only bring up the overall speed of the web, but the quality as well. Thanks Google.

  99. Hi i can’t see the video, when i click It download a .mov that i can’t see too.

    can you please upload your video on youtube and just embed it il your page ?

  100. Nice tutorial 🙂
    I was expecting something like this to be really difficult, but with a bit of PHP knowledge it shouldn’t be hard at all to create a simple plugin!

  101. Its really need to have good effort to build a new plug-in. I think this a best post ever i seen to create a plug-in with such a easy way. We have generated few online site builders and make some easy CMS for our user. I also start my first plug-in by last year but got failed

  102. I am so happy to see you and thinking that why I did not found you before. It was a great puzzle for me to create own plug-in. Now it’s looking soon I will have my own plug-in. Thank you so much for this video

  103. I do never know that it would be so easy like this you have mention well trick to start my first plug-in. It was an difficult task for me and a great challenge to start own plug-in. currently I am working for web hosting services India and trying to create an simple plug-in but almost got failed. I am really thankful for this post

Comments are closed.