Software Engineering in Web Development, Backend Services, and More

Tag: WordPress (Page 61 of 220)

Articles, tips, and resources for WordPress-based development.

The Repository Pattern Primer

Whenever you’re working on a larger project that’s based on WordPress, the odds that you’re going to be working with more than a single data source – that is, the WordPress database – are higher than normal. For example, you may be working on a project that has to coordinate information from:

  • the WordPress database,
  • a help desk ticketing system,
  • a content importing system,
  • another third-party API,
  • and possible more.

And when this happens, it can become a bit cumbersome to write code that makes it easy to retrieve information from those different places. This what developers usually talk about when they refer to dealing with “layers” in their application. That is,

  • there are layers for presenting information to the user,
    layers for handling business logic (or domain logic),
  • layers for communicating with APIs,
  • and layers for storing data.

Honestly, you don’t have to have a variety of data stores to watch to create a layer that makes it easier to send and retrieve data from the database, that’s just when it’s more common. You can just as effectively work with a single data store, like the WordPress database, when implementing the repository pattern.

Regardless, if you’re building a larger website, web application, or plugin, implementing the repository pattern is something that can pay dividends in maintenance, clarity of code, and separation of concerns.

But how might this be implemented within WordPress? It’s not terribly challenging, but first, it’s worth reviewing a repository primer before jumping into any code.

Continue reading

How To Make MySQL Globally Accessible (From MAMP)

I recently walked through how to make WP-CLI globally accessible across your system (assuming you’re running macOS or a variation of Linux).

I’ve also talked about various things as it relates to using MAMP Pro for WordPress development. Naturally, one of those tools is also MySQL; however, it’s one that is often treated as a “set it and forget it” application.

But I’ve recently started working on a project that requires a bit of automation as it relates to syncing the development and the staging databases. And since this is scripted, it assumes that MySQL is globally available.

If the only way you’ve installed MySQL is via MAMP (or perhaps another similar package), then you’ll likely need to make MySQL globally accessible on your system.

Here’s how to do that.

Continue reading

How I Built It Podcast: Page Template Dashboard

For those of you who aren’t familiar, the How I Built It podcast is a show that Joe Casabona publishes each week. In short, the show features Joe chatting with various people who are building things using WordPress, how they went about it, and other tangential topics.

I think it’s a neat idea for the show.

Coincidentally, I had a chance to finally meet Joe in person last year after (at the Post Status Publish conference) years of conversing online. If you’ve heard him on the podcast, he’s just as friendly in person. And if you’re not following him on Twitter, I recommend it.

That said, I had the chance to be featured on a recent episode of How I Built It in which I talk about one of my plugins (that’s horribly named) and some other related topics.

Continue reading

Singletons in WordPress, Revisited (A Time and a Place?)

Before I start a post talking about using singletons in WordPress (or, more appropriately, the Singleton Pattern), I want to make sure that you read the following two articles:

Both of these articles provide immensely valuable perspective on this pattern and the dangers of using it whenever using it throughout our work in WordPress; however, does that mean we should completely avoid them?

I don’t think so.

Then again, I also recognize that the articles aren’t saying to completely avoid them. They are giving strong cases for how to use them and the dangers of using them should you opt to do so.

And though I’ve definitely used them in the past, I’ve generally stopped. However, I recently came across a use case for a project in which I think it’s acceptable.

Continue reading

The WordPress Economy, Employment, Strategies, and More with WP-Tonic

Last week, I had the pleasure of talking with John Locke and Jonathan Denwood on WP-Tonic to talk about a variety of things regarding the WordPress economy, self-employment, development strategies, observations around the software, along with a variety of other topics.

The WordPress Economy, Employment, Development, and More

Before covering what it is that we covered, I do recommend checking out their library of podcasts.

They’ve talked to people who I think are worth a follow and who are far smarter, accomplished, and have unique insight on a variety of topics in the WordPress space.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑