Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 116 of 427)

What Does It Mean to Use WordPress as a Proxy?

If you’ve worked with WordPress for any length of time especially when it comes to using some type of Ajax functionality, then you’ve likely heard the phrase “use WordPress as a proxy” at some point.

And even if you haven’t the odds that you’ve actually done it are pretty high.

Though I think that, as time moves forward, we’re going to eventually see the REST API replace the traditional ways that we’ve used Ajax but that’s likely a different story for another time.

So what does it mean to use WordPress as a proxy whenever you’re working with Ajax requests? It requires a little bit of understanding cross-site requests, how routing a request through WordPress works, and then parsing the response.

Continue reading

WordPress Project Milestones: Scoping Them For Clients

Up until the last year, one of the ways that I’ve scoped milestones is based heavily on the perspective of how I or my team and I were to be working the project.

There’s a problem with this approach, though: For those of us who try to include client feedback throughout the development process, it’s not as easy for them to take the jargon we use and still have them make sense of it.

To that end, I’ve started scoping WordPress project milestones a little bit differently so they are a bit more customer-friendly all the while still making sense to how a team of developers can accomplish what’s necessary to make sure things are functionality.

Continue reading

Separating the Vital Few From the Trivial Many

I’ve talked in earlier posts about my reading Essentialism and a lot of the information I’ve been gleaning from it. Granted, it’s slow going, but there’s a lot happening outside of reading at the moment.

The Vital Few: Discerning the vital few from the trivial many.

But I’ll share the point I’m going to be working towards regarding the rest of this post right now. One of the most timely quotes from the book is a bit long, but I think it’s worth sharing especially for those working on their business, their side projects, or even their day-to-day work wherever that may be.

Instead of making choices reactively, the Essentialist deliberately distinguishes the vital few from the trivial many, eliminates the nonessentials, and then removes obstacles so the essential things have clear, smooth passage.

In other words, Essentialism is a disciplined, systematic approach for determining where our highest point of contribution lies, then making execution of those things almost effortless.

Like I said, it’s a bit of a long quote, but if I could distil them for the sake of the things I’d like to share, I’d hit the following points:

  • distinguish the vital few from the trivial many,
  • remove obstacles that prevent that,
  • determining the highest point of contribution.

For some, this reads like a big snore-fest so you can either check out now or keep reading, but I found this timely, and I think it’s something that many people struggle with (at least post on those who I chat with) so maybe it’ll be helpful.

So here’s my take on these points.

Continue reading

How to Create a Zip File With Excluded Files and Directories

Whenever we’re working on a project that requires some custom functionality, we still try to abide by the whole themes-are-for-presentation and plugins-are-for-functionality even if it’s not something that has any use outside of our projects.

This doesn’t mean we don’t use source control or anything like that, but it’s just that not everything that is open-source by its license is available for download because it has no applicability outside of a niche use case.

But that’s a discussion for another time.

All I’m saying is that even though we may be working on something just for us, we don’t abandon good development practices.

And there are times, say, where we may be sharing files, source code, or something via Slack that is not yet ready to either commit or to share any other way. In times like that, it’s helpful to be able to create a zip file, right?

Slack: Sharing a plugin without source control.

But sometimes, we need to create a zip file with excluded files.

Continue reading

Maintaining a Post Status When Updating a WordPress Post

I just finished a feature for a project that uses a combination of custom post types, data imports, and updating existing posts when deleting a user (or set of users).

There’s one problem, though:

Say have you have a post that’s currently published (that is, it’s ‘post_status’ is set to ‘publish’) but, when you update the post via wp_update_post, its post_status attribute is set to ‘future.’

In order words, whenever you programmatically update a post, the status of the post is set to ‘Scheduled’ (according to the UI) and ‘future’ (according to the database column).

So what gives?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑