Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 16 of 427)

Fix: 502 Bad Gateway with Valet

Periodically, I’ll be trying to load a development using Valet and I’ll end up getting 502 Bad Gateway error.

Whenever I’m faced with this problem, here are the following steps I do to restore functionality (without breaking any of my existing links or certificates):

  1. Run $ composer global update
  2. Run $ valet install
  3. Run $ valet restart

The last step isn’t always necessary but I’ve found there are times where I’ve had to use it.


For reference, check out the past articles related to the above content:

The Most Useful (Or Popular) Articles From 2022

I don’t normally do retrospectives for each year for products, posts, work, or anything.

Given that I didn’t write as much as I have in years passed, I thought I’d share what the most popular articles I’ve shared over the last year in hopes of both of surfacing some older content but also setting the tone for the coming year.

Continue reading

A Backend Engineer Learns to Build Block Editor Blocks, Part 5

Now that we’ve got the basics of the block built, it’s time to introduce some of the features afforded to us by the WordPress API that allow us to make changes to the visuals of our block. Namely, we want to using block attributes for custom colors.

Sure, up to this point, we’ve bee building the blocks using the WordPress APIs for block creation, serialization, and displaying, but we’ve also hard-coded a lot of our our styling. And when it comes to building custom blocks, sometimes that’s exactly what we want to do.

But other times, we want the users to be able to change, say, the color of their text or the background of their blocks, or maybe both. And the APIs for the Block Editor make this possible. As with the rest of the content of this series, though, it’s not without understanding what’s available to us.


Since this series builds upon itself, I recommend reading and following the previous articles thus far especially if you’re just now stumbling across this content.

So far, these are the things we’ve discussed:

  1. Required Tools, Plugin Structure, Dependencies, Block Metadata
  2. The Backend, The Frontend, Functionality, Styles, a Working Demo
  3. Block Attributes, Editable Content, Components, Editor Styles
  4. Saving Data, Styling the Frontend

If you’re ready to continue, we’ll get started. Remember, now that we’re this far in the series, I’m working to keep the articles a bit shorter. This is because:

  • We’ve laid enough ground work so it’s easier to focus on one thing at a time,
  • I find it easier to digest one concept at a time especially when it comes to learning something new, like building blocks as a backend engineer 🙂.

So in this post, we’re going to focus on one new thing: Introducing color options for our block.

Continue reading

On Social Media, WordPress, and Software

This year’s Thanksgiving Break was the first time that I didn’t write anything I was doing over the break. I’ve been doing so since 2012 so this would’ve been a decade of doing it.

Almost made it 🙃.

But there’s the thing:

  • As if it isn’t evident already, the frequency of my writing has decreased but the length of the articles has increased.
  • I’ve also changed the front-page of this site such that it displays more about what I’ve done in my career in software development and WordPress,
  • And it includes a list to my most recent articles.

Given a post this year would’ve been a consistent decade of writing a traditional holiday post and how that’s changed, I couldn’t help but think about how things have changed within the web development economy as well as the WordPress economy.

And no, this is not going to be a nostalgic, reflective post.

Continue reading

Working with Multiple User Metadata Queries

In one of the most recent issues of The Repository (which is a worth a subscribe), I said that one of the Twitter account I recommend following is @mattmedeiros. And though he and I never see eye to eye on anything 😏, I said:

I really like what [Matt’s] doing with The WP Minute. I think his commentary, perspective on business and the WordPress economy, and the type of journalism he’s doing is different from many others.

And I meant it.

As he’s working to grow the type of news that he’s covering, he’s also getting back to something that I think that’s either been missing, fragmented, or missing because it’s fragmented too much across the various ways we’re sharing information: WordPress tutorials.

Continue reading
« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑