WordPress and the Command Line
-
Upload
dimmke -
Category
Technology
-
view
72 -
download
0
Transcript of WordPress and the Command Line
Saturday, August 24, 13
daniel immke
Design Engineer at 10up
Worked with WordPress for 5 years
Started regularly using command line about 7 months ago
Saturday, August 24, 13
my story
Saturday, August 24, 13
my story
Developed themes for several years
Scared to adopt tools like version control because of perceived difficulty
Working at 10up and learning command line helped me break through that
Saturday, August 24, 13
what iscommand line?
Saturday, August 24, 13
Saturday, August 24, 13
Command line is not a scary tool that only hackers use.
Saturday, August 24, 13
Command line is simply a different wayof using your computer.
Saturday, August 24, 13
It’s the same!
Saturday, August 24, 13
Facts about command line
It was the original way to use a computer
Advanced users still prefer it because it is more powerful
Saturday, August 24, 13
command line basics
cd - Change directory
ls - List files in directory
nano - Opens file in simple text editor program
program specific commands
Saturday, August 24, 13
command line basics
mkdir - Create folder
cp - Copy a file
mv - Rename/move file
command -flag param1 param2
rm - Removes a file
Saturday, August 24, 13
command line basics
There are several other commands that one can learn to navigate the filesystem and edit files, that you can learn as you go.
Saturday, August 24, 13
password prompts
These happen in CLI too.
Saturday, August 24, 13
password prompts
sudo - If you don’t have sufficient permissions, put the sudo command before everything else and enter your password
sudo bash - Entering this by itself will allow you to enter a mode where you don’t have to enter your password. Use sparingly.
Saturday, August 24, 13
You won’t learn every command,but the basics are enough
to get started.
Saturday, August 24, 13
non windows systems
This talk is covering command line for Unix based systems only
The principles are the same
Even if you use Windows, knowing Unix is helpful with server administration.
Saturday, August 24, 13
what can I dowith command line?
Saturday, August 24, 13
improve theme development
If you learn command line, you can use many tools that will improve development
We are going to focus on arguably the most important: version control
Saturday, August 24, 13
Saturday, August 24, 13
version control: git
Git is a distributed version control system that a group of people can use to more effectively collaborate on projects.
Currently the preferred VCS over others like Subversion
Saturday, August 24, 13
installing git
http://git-scm.com
Configure global information at the command line like so:
git config --global user.name "John Doe"
git config --global user.email [email protected]
Saturday, August 24, 13
using git
Using the cd command to navigate to your theme directory
Type git init to create a git repo
Type git add * to add all files
Saturday, August 24, 13
committing with git
Then simply type git commit -m “initial commit” to begin versioning your theme with git
Writing concise commit messages will help you look through versions of your code.
Saturday, August 24, 13
other CLI tools
Grunt - Can be setup to automatically minify your css/js
vagrant - Virtual machine environment that replaces MAMP
wpcli - Tools for managing WordPress installations from CLI
Saturday, August 24, 13
Demo time!
Saturday, August 24, 13
what you (hopefully) learned
Command line isn't scary, the basics are actually pretty easy
Overview of basic version control in Git using the command line
With command line, you can use many tools that will improve themes.
Saturday, August 24, 13
Thanks for listening!
@daniel_immke on Twitter
These slides are available at http://slideshare.net/dimmke
Saturday, August 24, 13