Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 20 of 427)

Installing Old Versions of PHP With Homebrew

I love the speed at which PHP is moving these days and how fast the new versions are, too 🙂 but that doesn’t mean the software on which we’re going is going to consistently be able to keep up with the fast release cycles.

And that’s okay. It is part of software development and it has been since before most of us were writing our first lines of code (let alone before we were even alive). Obviously, this means that those of us who work with PHP are likely going to need to work with different versions.

Sometimes we’ll be working with the latest, sometimes we’ll working with a version or a few versions older, and sometimes we may need to work with something that’s deprecated.

And this is usually the part where certain engineers start saying we should upgrade all the things and stay with the newest version of languages and frameworks. But that’s not how it works.

What does this have to do with PHP, though?


Assume for a moment that you’re working on a project that was written with 8.0 but you start rolling it out to a suite of products. Some are running on a server with 7.4, some are running 7.3, and some are running 7.2.

Is it easier to handle all of the other software already running on their servers or refactoring your code?

A bit of a rhetorical question.

Continue reading

The Idea of Boxes for Multiple WordPress Projects in One Installation

When working with multiple WordPress installations – that is, having to manage an array of wp-content directories for whatever it is you’re working on, it seems that it’s more often not common to suggest creating a new WordPress installation for each project.

This isn’t something necessary assuming the nature of your work can operate off of a single database and the same version of WordPress. This may or may not work for multi-site projects; I don’t deal with them so don’t count on this as being applicable.

Continue reading

Keep a Journal of What It Takes to Get It Working

This is not new information and this is not a new idea that you’re about to read. This isn’t a novel idea. This isn’t something that no one has ever discussed. This is the furthest thing from a new idea.

Instead, this is me re-iterating something that people in our field talk about over and over and over. It bears repeating though because it still comes up again. And with good reason: It’s a good reminder that we should be doing this.

We should be keeping a journal of the work we do. Really.

UpNote is a good app for this.

I don’t mean a blog, as much as I think they’re important, and I don’t mean Twitter threads, I don’t mean comments on Hacker News, and I don’t mean Stack Overflow questions or answers.

I mean text files or markdown files or HTML files or whatever it is you want to use. Here’s why: The longer you work in software, specifically on the web, the more likely you’re going to encounter all sorts of other software required just to get The Thing™️ working. And the less likely your exact situation is identical to someone else’s.

Sure they – or you – can say “Have you tried [doing this]?” or they can recommend “Upgrade [this particular package]?” or “Bypass [this particular dependency] because it’s likely not needed.”

That still leaves a lot of unknowns. They are suggestions.

Continue reading

Writing for WordPress Has to Change (For Me)

When I first started writing on this blog, It was on October 3, 2010. That’s wild to think about. I know that those who read usually fall into one of three categories:

  • People who read regularly, for which I thank you,
  • People who are aware of it and check periodically, for which I thank you,
  • And people who are drivebys from searches from various search engines.

All of that is great and fine and I don’t think I ever would’ve thought I’d be writing roughly 12 years later.

But here we are.

Continue reading

Using Pipe Viewer for Large Migrations

In WordPress, most migrations can be easily done by:

  • Using a web-based utility such as Migrate DB Pro or PhpMyAdmin,
  • Using a database front-end application like TablePlus,
  • Or even using the mysql command-line for importing an SQL dump.

None of these are bad options but each present their own set of challenges especially with large migrations:

  • web-based applications can timeout,
  • front-end applications may lack some functionality for getting insight into what’s going on (or not giving clear information on what something such as a lock is during its process list),
  • and terminal applications like mysql can do the job but give very little insight on to where to status of the import stands.

If you’re working with a relatively small dataset, then any of the above options would be fine (and I’m usually partial to TablePlus 🙂) or the command-line but when importing a database that was roughly 30GB in size, I needed something else to help.

  • A web application would time out,
  • A front-end application lacked feedback on time or progress,
  • A terminal application was just waiting for the process to finish with no insight as to what’s going on.

And this is where pv comes into play.

Continue reading
« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑