I remember the first time I opened up a WordPress theme file. I didn’t understand a lick of PHP, and my eyes glazed over the code. To be honest, I was horrified and nearly abandoned learning PHP and how to theme for WordPress.
You see, I’m a designer and programming is not my strong suit. If you’re anything like me, even knowing where to begin learning PHP is a challenge.
PHP is the essence of WordPress. Sure, we’re seeing a push toward block-based layouts (full-site editing, anyone?), but PHP is still at the heart of WordPress Core, and it will be for the foreseeable future. That means learning PHP is still a great goal, especially if you’re starting any kind of WordPress development. Learning PHP can empower you to handle everything from making little tweaks to creating a full-fledged theme.
Even though I still don’t consider myself a PHP whiz, I do work with many at The Events Calendar. I polled some folks around the virtual office and received lots of suggestions for learning PHP. Here are some excellent resources to guide you as you get started with PHP, whether you’re looking for a quick reference, a hands-on course, or a good old-fashioned paperback.
This is the official documentation site for PHP. It’s not light reading, but it’s perfect for reference.
This site is a perfect quick reference, including coding standards and best practices.
Pretty much the antithesis of PHP: The Right Way, which is another great way to learn.
The perfect quick lookup for all things PHP, from arrays to types and everything in between.
Another PHP cheat sheet, this time providing the syntax for common code patterns and use cases.
There’s a free trial available for 71 PHP lessons, or you can purchase a full month for about $17.
Here’s a completely free collection of courses that are nicely broken out into topics.
Codecademy is free and always has tons of courses on just about anything.
A collection of PHP projects you can use to build up your Portfolio, with a community and mentors available.
David Sklar wrote the essential reading for beginning PHP development.
Kevin Tatroe and Peter MacIntyre go over the fundamentals for creating dynamic web pages.
A more updated look at modern PHP practices (at least at the tine of this writing) that covers PHP 8.
A free interactive PHP lesson that covers everything all the basics, from arrays to exceptions.
“PHP articles, quick start tutorials, and scripts that will help to you learn PHP quickly.”
Clever title! The entire tutorial is in the form of a giant PHP snippet to illustrate the basics.
Ulugbek Miniyarov’s tutorial is a fine balance of quick reference and thorough explanations that covers a lot of ground.
The freeCodeCamp team has a free 5-hour video tutorial that covers PHP and WordPress.
The Codeholic has a “roadmap” on GitHub for becoming a PHP developer in this 21-part series.
An extensive 22-part series on YouTube. It’s a little dated (2017), but a great collection nonetheless.
If 22 videos weren’t enough, try this 42-part series that also goes deep into MySQL databases.