SlideShare a Scribd company logo
Using Composer 
with WordPress 
Micah Wood 
@wpscholar 
wpscholar.com/wcraleigh2014
What is ?
Manages 
Dependencies
Manages Project 
Dependencies
Manages Project 
Dependencies and Versions
Simplifies reusing 
and sharing of code
Why Use Composer?
Automatic 
Package Installation
Consistent ! 
Versioning
Bulk Package 
Updates
Class and File 
Autoloading
Documentation of 
Dependencies
Recursive 
Dependencies
Eliminates ! 
Duplication
Package ! 
Discovery
Installing Composer
Local Install! 
$ curl -sS https://getcomposer.org/installer | php 
! 
Make install global! 
$ mv composer.phar /usr/local/bin/composer
$ composer diagnose 
Check system for common errors
How Composer Works
composer.json 
How you declare your dependencies
composer.lock 
How Composer stores 
your dependencies
vendor directory 
Where composer installs your packages
Specifying Versions
Exact Version 
1.0.2
Range of Versions 
>=1.0,<2.0
Wildcard Version 
1.0.*
Next Significant Release Version 
~1.2
Semantic Versioning 
semver.org
Major Version 
2.3.1 
Increment when you make breaking changes
Minor Version 
2.3.1 
Increment when you add backwards compatible features
Patch Version 
2.3.1 
Increment when you make backwards compatible bug fixes
Using Composer
$ composer init 
Create a new composer.json file
$ composer validate 
Validate your composer.json file
$ composer install 
Downloads and installs all dependencies
$ composer update 
Checks for and installs package updates
$ composer require package 
Adds package to composer.json and installs
$ composer remove package 
Removes package from composer.json and uninstalls
$ composer create-project package 
Downloads project and runs `composer install`
$ composer search package 
Discover packages on packagist.org
Using Composer 
with WordPress
$ composer require johnpbloch/wordpress 
Add WordPress as a dependency
$ composer require composer/installers 
Enables WordPress themes and plugins to be put in their respective directories
Setup WordPress Paths 
Places WordPress and its themes and plugins in their respective directories
$ composer create-project wpscholar/wp-skeleton 
Setup a new WordPress project
Live Demo
Questions? 
Micah Wood 
@wpscholar 
! 
wpscholar.com/wcraleigh2014

More Related Content

PPTX
Getting started with WordPress development
PPTX
5 Things You Shouldn't Do With A WordPress Plugin
PDF
WordPress Server Security
PDF
Intro to WordPress Plugin Development
ODP
How I Learned to Stop Worrying and Backup WordPress
PDF
Step by step guide for creating wordpress plugin
PPTX
Managing Multisite: Lessons from a Large Network
PDF
How to Submit a plugin to WordPress.org Repository
Getting started with WordPress development
5 Things You Shouldn't Do With A WordPress Plugin
WordPress Server Security
Intro to WordPress Plugin Development
How I Learned to Stop Worrying and Backup WordPress
Step by step guide for creating wordpress plugin
Managing Multisite: Lessons from a Large Network
How to Submit a plugin to WordPress.org Repository

What's hot (20)

PDF
WordPress plugin development
PPT
Week 7 introduction to theme development
PPT
Week 12 - Search Engine Optimization
PPT
Week 5 - Introduction to plug-ins and widgets
PPT
Week 11 - Hosting and Migration
PPT
Week 9 - Introduction to Child Themes
PDF
Coding with jetpack
KEY
CSI: WordPress -- Getting Into the Guts
PDF
Why it's dangerous to turn off automatic updates and here's how to do it
PDF
Theming in WordPress - Where do I Start?
PPT
Developing Plugins For WordPress
PPTX
Writing Your Own WordPress Plugins - WordCamp Kansas City, 2014
PDF
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
PPTX
WordPress Structure and Best Practices
PPTX
Cross CMS plugin development using AWF
KEY
WordPress APIs
ODP
WordPress Security & Backup
PDF
Developers, Be a Bada$$ with WP-CLI
PPT
Secure All The Things!
ODP
The Future Of WordPress Presentation
WordPress plugin development
Week 7 introduction to theme development
Week 12 - Search Engine Optimization
Week 5 - Introduction to plug-ins and widgets
Week 11 - Hosting and Migration
Week 9 - Introduction to Child Themes
Coding with jetpack
CSI: WordPress -- Getting Into the Guts
Why it's dangerous to turn off automatic updates and here's how to do it
Theming in WordPress - Where do I Start?
Developing Plugins For WordPress
Writing Your Own WordPress Plugins - WordCamp Kansas City, 2014
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
WordPress Structure and Best Practices
Cross CMS plugin development using AWF
WordPress APIs
WordPress Security & Backup
Developers, Be a Bada$$ with WP-CLI
Secure All The Things!
The Future Of WordPress Presentation
Ad

Viewers also liked (11)

PDF
Debugging in PHP
PPTX
10 most popular social media platforms oct 2015
PDF
Troubleshooting WordPress Issues
PDF
Advanced Development Workflows
PDF
Twitter By Numbers (2014)
PPTX
Simulating a pond skater
PPTX
Salt water experiment
PDF
Using Chrome Dev Tools
PPTX
Getting Started with Vagrant
PPTX
Droids took my job
PDF
WordPress Hooks
Debugging in PHP
10 most popular social media platforms oct 2015
Troubleshooting WordPress Issues
Advanced Development Workflows
Twitter By Numbers (2014)
Simulating a pond skater
Salt water experiment
Using Chrome Dev Tools
Getting Started with Vagrant
Droids took my job
WordPress Hooks
Ad

Similar to Using composer with WordPress (20)

PDF
Using Composer with WordPress - 2.0
PDF
Using Composer with WordPress
PDF
Dependency management with Composer
PPTX
Composer
PDF
Composer the Right Way - MM16NL
PPTX
Composer
PPTX
Docker Starter Pack
PDF
12 Composer #burningkeyboards
PDF
Composer - The missing package manager for PHP
PDF
Composer the right way
PDF
Angular Part 3 (Basic knowledge)
PDF
composer_talk_20160209
PDF
PPTX
Docker
PDF
Composer the right way [SweetlakePHP]
PPTX
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
KEY
Composer
PPTX
PHP Dependency Management with Composer
PDF
Using Composer to create manageable WordPress websites
PDF
Bower & Grunt - A practical workflow
Using Composer with WordPress - 2.0
Using Composer with WordPress
Dependency management with Composer
Composer
Composer the Right Way - MM16NL
Composer
Docker Starter Pack
12 Composer #burningkeyboards
Composer - The missing package manager for PHP
Composer the right way
Angular Part 3 (Basic knowledge)
composer_talk_20160209
Docker
Composer the right way [SweetlakePHP]
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
Composer
PHP Dependency Management with Composer
Using Composer to create manageable WordPress websites
Bower & Grunt - A practical workflow

More from Micah Wood (10)

PPTX
Introduction to JSX
PDF
WP-CLI For The Win
PDF
Shortcodes In-Depth
PDF
Becoming a WordPress Coding Master
PDF
The Modern JavaScript Developers Toolbox
PDF
An Introduction to PHP Classes
PDF
Backbone + React
PDF
Testing Made Easy
PDF
Debugging in PHP
PDF
Sanitizing, Validating and Escaping in WordPress Themes and Plugins
Introduction to JSX
WP-CLI For The Win
Shortcodes In-Depth
Becoming a WordPress Coding Master
The Modern JavaScript Developers Toolbox
An Introduction to PHP Classes
Backbone + React
Testing Made Easy
Debugging in PHP
Sanitizing, Validating and Escaping in WordPress Themes and Plugins

Recently uploaded (20)

DOCX
Unit-3 cyber security network security of internet system
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PDF
The Internet -By the Numbers, Sri Lanka Edition
Β 
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
Β 
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Β 
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
Funds Management Learning Material for Beg
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
Β 
PPTX
introduction about ICD -10 & ICD-11 ppt.pptx
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
Unit-3 cyber security network security of internet system
SASE Traffic Flow - ZTNA Connector-1.pdf
Slides PPTX World Game (s) Eco Economic Epochs.pptx
πŸ’° π”πŠπ“πˆ πŠπ„πŒπ„ππ€ππ†π€π πŠπˆππ„π‘πŸ’πƒ π‡π€π‘πˆ 𝐈𝐍𝐈 πŸπŸŽπŸπŸ“ πŸ’°
Β 
international classification of diseases ICD-10 review PPT.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
Slides PDF The World Game (s) Eco Economic Epochs.pdf
The Internet -By the Numbers, Sri Lanka Edition
Β 
Triggering QUIC, presented by Geoff Huston at IETF 123
Β 
Module 1 - Cyber Law and Ethics 101.pptx
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Β 
PptxGenJS_Demo_Chart_20250317130215833.pptx
Job_Card_System_Styled_lorem_ipsum_.pptx
Introuction about ICD -10 and ICD-11 PPT.pptx
Funds Management Learning Material for Beg
Unit-1 introduction to cyber security discuss about how to secure a system
RPKI Status Update, presented by Makito Lay at IDNOG 10
Β 
introduction about ICD -10 & ICD-11 ppt.pptx
Tenda Login Guide: Access Your Router in 5 Easy Steps
Cloud-Scale Log Monitoring _ Datadog.pdf

Using composer with WordPress