When setting up a local development environment, sometimes you want to actually send real email. If you’re using WordPress, you can install a plugin to run your mail through an SMTP server. But if you’re running anything through the command line or you want to use the built-in PHP mail() function for any reason, then it’s […]
Wildcard Subdomains For Local Development – 2017 Update
For years I’ve been using wildcard subdomains for local development rather than having to set up virtual hosts every time I want to spin up a new site. I was using a combination of nginx and dnsmasq to bring it all together. I’d use dnsmaq to make all calls to any subdomain on my development […]
Add Self-Signed SSL Cert To cURL
In an earlier post we talked about adding a self-signed SSL certificate to Google Chrome so that you can use SSL certificates on your local development machine. This solves the problem of browsing around on your local site, but it doesn’t solve the issue of making cURL calls. For example, if your site is running […]
Add Self-Signed SSL To Google Chrome on Ubuntu 16.04
There are plenty of times when you are working on a website that uses SSL and you need to work on that site locally in your own development environment. Usually you just set things up not to run on SSL locally because it’s generally less trouble than getting SSL working on your local web server. […]
Tips For Your Main Plugin File
Writing WordPress plugins is great fun because you can build awesome stuff and share it with tons of people very easily. Getting started can be frustrating because there are so many different ways to organize your code and it’s hard to know what’s best for your project. In the next few posts, I’ll share some of the […]
Install WordPress With WP-CLI
Here is how to get a basic WordPress site up and running using WP-CLI. This is particularly helpful for spinning up local WordPress installations for development of plugins and themes. You can also use WP-CLI to get started with unit testing your WordPress plugins with PHPUnit. For now, let’s see about getting WordPress installed.
Why Didn’t I Think Of That?
After running multiple online businesses, here is a nice summary of things things that have worked well, things that haven’t worked so well, and tools we use to keep things going. I had a great time catching up with my friends at WordCamp Raleigh. Here’s a recording of my presentation.
Setting up dnsmasq for local development
The Network Manager in Ubuntu 14.04 LTS uses dnsmasq already. This makes it easy to set up a development domain to always return your localhost IP address. That way you can route *.dev to always return 127.0.0.1. Here’s what you need to do.
Installing WP-CLI and PHPUnit with Composer
WP-CLI and PHPUnit are excellent tools to use when developing and testing WordPress plugins. Composer is a great tool as well. It seems most people use Composer on a per-project basis – installing the packages they need just for the project they are working on. You can also install “global” packages, like these system tools, […]
Summary of PHP echo shortcut tag <?=

You may have read that using the short echo tag ( <?= ) should be avoided, especially for WordPress development. The convenience is really nice though, so here’s a quick summary of when you can safely use it in your code.