The issue is, however, that PHP is old. Older than most things on the internet. In technological terms, it’s a dinosaur, and there are so many tutorials out there that getting started can be just as hard as writing the code (okay, so that’s an exaggeration–but it’s still not easy).
We want to highlight some of the better PHP tutorials for you folks so that as you move further into your coding careers, you don’t waste your time on outdated or lackluster learning tools.
One of the reasons I was able to transition careers was because of Treehouse. I saw an ad on Hulu one night and realized I wanted to work in tech far more than education.
I bounced through a lot of languages and courses, but I ended up settling on their PHP offerings because of how high-quality they were compared to others I was messing with concurrently.
There are hundreds of hours of PHP tutorials on Treehouse, but really, there are four courses you should look into.
1. PHP for WordPress
The best part, if you ask me, is that Treehouse’s PHP tutorials are not always taught in isolation. Sure, you can take a course all by its lonesome, but Treehouse offers tracks and programs you can follow. PHP for WordPress is part of the WordPress Development track.
You will learn how PHP ties into WordPress hooks and The Loop, as well as some PHP basics (functions!) that will let you start in with theme development.
2. Beginner PHP
On top of the PHP for WordPress course, Team Treehouse offers a straight-up Beginner PHP track. Designed for complete newbies, the beginner track starts with web design fundamentals like HTML and CSS before adding in PHP code to your pages.
By the end of the 2-hour+ video course, you’ll have a grasp on pretty much everything you need, from variables, conditionals, and embedding simple PHP scripts into your pages.
3. Intermediate PHP
You don’t want to stop at the basics, do you? Of course not! Go big or go home, right? Intermediate PHP picks up where Beginner PHP leaves off (I know, right?), and you’ll dig right in to databases, SQL queries, and error handling.
And don’t be scared of the database stuff and SQL reporting and file handling. These PHP tutorials walk you through every single bit you’ll need to know to build your own stuff.
I really suggest making sure you do the whole beginner-to-advanced sequence, too, as either in isolation will leave you a bit agape when you move into WordPress dev.
4. WordPress Theme Development
Though it’s a part of the WordPress Development track, theme development may be taken alone, too. While not 100% PHP, you definitely need to understand how to work the WordPress PHP files and Code structure. This particular Treehouse course is personally me favorite way to familiarize with such integral parts of WordPress development.
With a name like Code School, how can they not be a go-to? It’s like not going to a restaurant called We Have Burgers when you want a hunk of meat on a bun
As you would expect, Code School has some really awesome PHP tutorials that you should most certainly check out. Each course has a free level (many of their tutorials are gamified), so you can see if their style works for you.
5. Try PHP
This may be the PHP tutorial with the best name ever. When you Try PHP, you are getting a feel for arrays, conditionals, and loops, which are fundamentals of working with PHP.
You also get links to supplemental resources. Awesome.
6. Close Encounters with PHP
Want to get up-close and personal with your new coding language? Of course! That’s the whole point of this, ain’t it?
Close Encounters with PHP makes you work with web requests as well as security measures and validation scripts. You’ll need these for any PHP dev work you do, so you might as well dig in now.
7. Try Laravel
Once you’ve gone through Try PHP, you should totally move into Try Laravel. While Laravel isn’t used specifically with WordPress, it’s a PHP framework (much like Ruby on Rails or Node.js for their languages) that will give you even more practice with coding PHP
This entire course, rather than a single level is free.
From Form to Table With Laravel
And if you like that, make sure you work through the follow-up course, From Form to Table With Laravel. By the time you’re through with all these PHP tutorials from Code School, working with WordPress’s PHP is gonna be a cinch.
You’ll have a full understanding of how PHP helps make the internet work on its own, which will give you a huge leg up with WP dev.
8. PHP The Right Way
You can’t go wrong with PHP tutorials named PHP The Right Way. While not as structured as offerings from Treehouse or Code School, this set of tuts really has everything going for it. Really because it covers everything that PHP has going for it.
The Right Way is updated for the current PHP (7.1 as of this writing), and is available online and as free ebooks.
At the very least, you should bookmark or download the ebook to use as a reference as you find your own workflow and learning style.
Plus, you can contribute or fork the docs on Guthub once you feel comfortable. There is no better way to give back and pay it forward.
9. WPMU’s Learning PHP for WordPress
WPMU has some of the best tutorials about WordPress on the internet (outside of Elegant Themes of course, tee hee), which means I can’t not mention their aptly titled Learning PHP for WordPress.
Much likePHP The Right Way, WPMU breaks down the language into the core concepts with real code examples hosted on Github.
The highlight of this particular look at PHP is how it discusses both bad practices and how to avoid them. You also get a look into the WordPress core files, functions, and theme creation.
You won’t be a PHP expert when you finish going through this one, but you will absolutely know a ton about what you’re getting into. Combine this with any of the above PHP tutorials and references, and you’ll be well on your way to being a WordPress developer.
10. Screw up a Test WordPress Install
This may have been my first introduction to PHP, so I can’t not mention it. If you truly want to know how PHP works in a production environment, screw up a WordPress installation and have to fix it.
I’m sure this will happen (or has happened) to you eventually, but if you go in and mess with wp-config.php or functions.php a little, something’ll break. Manually edit theme files. Do something.
Then fix it.
I guarantee you’ll know more than you did beforehand. Just don’t do it on any of your main sites. That’d be silly.
Go Forth and Code!
PHP is everywhere, and it’s aged super well (better, I’m sure, than any of us will, haha). As long as you’re careful about PHP versioning (you generally want v5.6.8 -7.1 for WordPress development as of right now) and the age of the PHP tutorials you seek out, there’s no reason y’all aspiring WordPress developers won’t catch right on.
What PHP tutorials work best for you? Share the love in the comments and help us all get better.
Article thumbnail by Ivan Lukyanchuk / shutterstock.com