Why PHP Developers Should Leverage WordPress

Steven K Word

@stevenkword GitHub – https://github.com/stevenkword/

(press the SPACEBAR to begin)

About Me


Sr. Developer at Oomph Inc., working on the WordPress.com VIP platform

5+ years as a freelancer

Plugin author

Member of Boston WordPress

Texas native




Oomph retreat May, 2013

Why WordPress?


What is WordPress?

WordPress Pros & Cons

WordPress Myths

WordPress vs. XYZ

WordPress for PHP Developers

WordPress Job Opportunities

WordPress Development Fundamentals

Getting Started Coding Best Practices Plugin Development Theming Recommendations The WordPress Community

What is WordPress?


It is actually two very different things

WordPress.org – Open source software
WordPress.com – A blog hosting service




LAMP (usually)
Open source under the GPL License
Highly extensible through themes and plugins
The latest version has been downloaded 30 million times


Blog hosting service

A product of Automattic
Powered by the same software available at WordPress.org
Customization is more restricted than with WordPress.org
The world’s largest WP installation with 69 million sites
369 Million Page Views per month

WordPress.com VIP


Enterprise offering also running on WordPress.com
Allows for custom development features audited by Automattic


WordPress Pros

  • responsibility6Low barrier of entry for new developers
  • It is very widely adopted
  • “Out of the box” functionality.  It is written in PHP
  • It is both “free and priceless”
    — WordPress.org

WordPress Cons

  • 4d18066a92353ced65d869968ccc1877Suffers from being pigeonholed as “blog software”
  • eCommerce has been painful in the past
  • Knowledge pollution
    (e.g., StackExchange)
  • Backwards compatibility results in slower growth

WordPress Myths


  • WordPress is only for blogs
  • WordPress is only for beginners
  • WordPress is  not secure
  • WordPress is  not a “real” CMS / Framework

WordPress Applications


WordPress comes with a default configuration – the blog  
However, much like Legos, you don’t have to make what is pictured on the box!


  • Core is secure!
  • Poorly developed plugins compromise security
  • More plugins, more problem potential

  * Tip: Remove the ‘admin’ account

WordPress vs. Drupal

This is a touchy topic, so I’m going to let John tell you about this one

John Eckman: Why The @#@#$ Isn’t WordPress a CMS?

Why WordPress?



  • LAMP stack is established and stable
  • Provides a set of tools for a big head start
  • Financial opportunities
  • The community

Make Money



  • Sell themes (GPL the PHP)
  • Sell plugins (GPL the PHP)
  • Software as a service (WordPress.com)
  • Freelance / Consulting
    (development, design, content )
  • Get a “real” job

What Does WordPress Offer Developers?

  • A framework for common tasks
  • Community support
  • Coding Standards
  • Revenue potential

The WordPress Toolbox


  • User management
  • Content management w/ revisions
  • Media manager
  • WYSIWYG editor
  • …much more

Plays Well with Others


WordPress comes bundled with modern libraries such as:

  • backbone.js and underscore.js
  • jQuery, jQuery UI
  • jCrop and ColorPicker

.. .and a few older ones

  • SimplePie
  • Thickbox
  • TinyMCE

Getting Started


The Codex



  • Mostly awesome, sometimes outdated
  • Community maintained
  • A fantastic way to contribute

Coding Standards



WordPress APIs



  • Scan the list of APIs
  • Know they exist
  • Use them appropriately

WP Query



This is one of the most important articles in the Codex


  • Allows you to interact with the default query
  • Enables you create new queries
  • Always use WP_Query instead of query_posts()

Best Practices


  • Don’t hack Core
  • Use the Coding Standards
  • Use security practices (nonces, sanitization)
  • Namespace every function and class
  • Always use WP_Query, never query_posts()
  • Watch for notices, warnings, and  deprecated functions

namespace (prefix your function names)

Validation & Sanitization


Plugins & Themes

  • Plugins allow for the extenstion of functionality
  • Themes allow for the alteration of appearance (mostly)

Plugin Development

  • Actions and Filters
  • Custom Post Types
  • Custom Taxonomies

Action Hooks

Actions “insert” code  

Filter Hooks


Filters expose and modify variables  

  • Safe way to link class properties
  • Always returns a value
  • Filter Reference in the Codex

Post Types

WordPress content objects

 posts     pages     revisions     attachments     products     articles     people     cars     athletes     real estate     tv shows


WordPress content classifications

tags     categories     

manufacturer     brand     team     color

flavor     location

Theme Development


  • Child Themes
  • Starter Themes

Child Themes


  • Extends a “parent” theme

  • Allows you to separate your changes from the base theme code

  • Twentytwelve, Twentythirteen were not designed to be child themed

Starter Themes

_s (underscores)


  • A WordPress Starter Theme
  • Not intended to be to be a child theme
  • “1000 hour head start”
  • Create your own: http://underscores.me/
  • Fork it: https://github.com/automattic/_s

Get Involved


http://make.wordpress.org/ You don’t have to be a developer!




Oomph retreat May, 2013