Software Engineering in Web Development, Backend Services, and More

Author: Tom (Page 170 of 430)

Installing WP-CLI with MAMP

About four years ago, I shared a post about WP-CLI. It wasn’t exactly a new project at the time, but it was far less developed than it is now.

The WP-CLI Homepage

The WP-CLI Homepage

As I mentioned in yesterday’s post, one of the things that we’re doing with is making sure that all of our work is unit tested from the initial version.

And when it comes to unit testing in PHP, many of us are familiar with PHPUnit; however, when it comes to unit testing plugins that are integrated with WordPress, it helps to have a test environment set up.

Sure, it’s possible to set aside a test database, test content, and then defined mock objects based on interfaces (and I’m not here to dissuade anyone from doing that). But WP-CLI offers a much easier way to go about doing just that in a more automated manner.

But first, it’s important to make sure that it’s correctly installed on your system.

Continue reading

MySQL Admin Can’t Connect To Localhost

I’m going to have a significantly longer post (or series of posts) that go more into detail about setting up WP-CLI, proper unit testing of WordPress plugins, and so on.

Unit Testing with WP-CLI

But for those who are already working on setting all of this up and are hitting a couple of problems with trying to set up a temporary database using some of the provided WP-CLI shell scripts, I wanted to share the solution that I used to resolve this.

Continue reading

Improve Your WordPress Skills with Hookr.io

One of the most important things you can do to improve your WordPress skills is to learn all about WordPress hooks. If you’ve spent any time looking through code, trying to write a plugin, or referencing the Codex then you likely know:

Hooks are provided by WordPress to allow your plugin to ‘hook into’ the rest of WordPress; that is, to call functions in your plugin at specific times, and thereby set your plugin in motion.

Yes, I think it’s important to understand the event-driven design pattern. And it’s one thing to have a comprehensive list of everything that’s available regardless of if it’s an action or a filter but it’s another thing to actually see it action.

Given that we all have different learning styles, sometimes I think having a reference is only one way to go about learning how to leverage the system. Another way would be to use a plugin like Hookr.

Continue reading

Document Your Practices and Procedures (For You and Your Team)

We do a good job of evangelizing the different tools, environments, and ways to tackle problems in our space (that is, within WordPress development), but I often wonder how well we do for actually documenting our practices, procedures, and so on for others.

10up - Document Your Practices

Sure, some companies open source their practices, and that’s great, but does every company? And should they?

Sometimes, I think people believe that if a company bases itself on open source, then they should have everything out in the open:

  • Their software,
  • Their practices,
  • Their financials,
  • And so on.

I don’t agree, but I do think there’s something to be said for documenting your practices within your team as this benefits both you, your teammates, and people you may end up bringing on to a project or on to your team for future work.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑