Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 57 of 219)

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

WordPress Plugins I Use (As Of 2017)

A couple of weeks ago, an international WordPress-friend of mine, Thorsten Frommnen, tweeted the following asking what WordPress plugins I use (and others use) right now:

https://twitter.com/thorstenfrommen/status/873711220611846144

You’d have to click-through to see the whole thread. I’ve wanted to follow-up with the post for a little while now and just now have the chance.

For what it’s worth, I don’t know if it’s all that interesting to cover all the plugins that I have running. Admittedly, it’s not many (and no, it’s not because I get into the too-many-plugins-slow-down-a-site-debate), but it’s because I just don’t use that many to run this site.

With that said, here’s a rundown of the WordPress plugins I use, why, and where you can get ’em.

Continue reading

Simple Autoloader for WordPress Projects

Earlier this year, I gave a talk at WordCamp Atlanta about Namespaces and Autoloading.

These are two topics that, even though we can’t often use some of the native features of PHP7+ in our work, I think that many of us should be using in our plugin development.

Sometimes though, I think the problem is that developers lack the time, resources, or experience to know where to start understanding autoloaders let alone write their own.

And I want to fix that.

For some time now, I’ve been using a very simple autoloader in my projects. It’s served me well, but I think it could it be more powerful and I think it’s something that others could easily use in their projects, too.

So I’ve started a repository that offers a simple autoloader for WordPress. No, it’s not for WordPress core nor is it meant to be used with themes, but it’s for those who want to begin using autoloading in their WordPress plugins and similar projects.

Continue reading

WordPress Queries with IN Clauses (Who Knew)?

A little over a year ago, I wrote a post on how to use WP_Meta_Query whenever you have a set of keys you want to use to help pull back information from the database.

What about the case, though, when you have a number of different keys that would result in creating a really long array for the WP_Meta_Query class? For example, what if you had to loop through a collection of data before even setting up the query?

On some level, it might feel that like the natural thing to do would be to:

  1. iterate through the collection of keys,
  2. dynamically build up the results,
  3. combine them into a single result set,
  4. then work with whatever you’re given.

But doesn’t that sound a bit cumbersome (let alone slow)?

When it comes to using the WordPress API, I do what I can to stick to it before talking, say, directly to the database but there are also times where it makes sense to write a raw query than to write some type of clever code just to get the WordPress API to work. Continue reading

An Option for a PhpStorm WordPress Theme

Since talking about making the switch to PhpStorm, I’ve gotten feedback:

  • from “the first thing you need to do is to change your theme,”
  • to “what’s one of the first things I should learn.”

And I think all of that’s great because the whole point of starting off with a post about PhpStorm in general – as I have with other editors – is simply start from the ground up and show others how I’ve opted to setup my environment.

Obviously, this doesn’t mean that I think that choices I make are the ones others should make. But, at the very least, it gives an idea as to some of the tweaks I’ve made and as to why.

Over time, I’ll get into more technical things that I’ve chosen to do but, for now, I thought talking about the theme – a PhpStorm WordPress Theme, perhaps? – that I’ve been using as a place to start.

Continue reading

A Primer in Bash for WordPress Developers

Now and then, I end up installing a piece of software via Composer or that places some of its binaries in directories other than the usual places that macOS expects to find them.

That is, if you’re running an app from within Terminal or that an application with a GUI expects to be in a certain location on disk, then it’s likely going to expect it in one of five places:

  1. /usr/bin
  2. /bin
  3. /usr/sbin
  4. /sbin
  5. /usr/local/bin

But, as I said, over time we end up installing things using third-party tools, or we end up installing things that place binaries outside of one of these directories.

Case in point: What happens if you want to install WP-CLI globally? Or what if you want to use a version of MySQL that ships with MAMP?

In those cases, those binaries are not going to be included in any of the aforementioned directories. When that happens, you have to modify your profile. If you’ve never done that, it can be daunting. And it can get messy if you don’t do it methodically over time.

So here’s a primer on Bash for WordPress developers for what your bash_profile is and how to manage third-party software with it.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑