Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 197 of 219)

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

Software Craftsmanship: Why This Matters For WordPress

Earlier this week, I had a fun discussion with Dave Donaldson of Max Foundry about software craftsmanship.

I think it’s worth reading the quick Twitter discussion, but I want to be clear that I mention Dave because the respect him as a developer, and he was being a bit facetious in his comments.

Bottom line, Twitter’s not the point of this post – it’s simply setting the stage.

I’ve written before about WordPress Craftsmanship which generally covers my thoughts on the entire process, but I don’t think I’ve ever mentioned my thoughts on software craftsmanship as a whole and why I think it matters in WordPress.

As such, I thought this may be a good opportunity to do so.

Continue reading

Do One Thing and Do It Well – But How?

One of the things that we – that is, developers and designers – hear more often than not is that plugins should “do one thing and do it well.”

But what does that mean?

I think that it sounds good in theory but I’m not convinced that if you were to ask each developer and/or designer separately what that means, then you’d get a variety of answers.

I think that there’s a reason that we feel this way, but I’m not really sure that we know what it even means.

Continue reading

We Need Better Abstraction in WordPress Projects

When it comes to programming – regardless of the platform, language, or system that you’re using – there’s a concept of abstraction that most programmers understand even if they don’t know that that’s what the concept is called.

Perhaps the clearest definition on abstraction in programming (straight from Wikipedia) explains:

Abstraction is the process by which data and programs are defined with a representation similar in form to its meaning (semantics), while hiding away the implementation details.

A simple, practical example of an abstraction would be the concept of functions: It completes a unit of work and optionally accepts parameters and returns data to the caller

The details are implemented – are abstracted – into the function so that other programmers (or even the original developer himself or herself) can simply make a single call to the function.

Easy enough, right? Especially since we’ve all written functions.

Of course, abstractions can be more complex. Starting from functions, moving up to classes, moving up to full API’s and so on. Everything in programming lives at some level of abstraction.

I bring all of this up because I’ve seen – and continue to see – huge opportunities for refactoring WordPress-based code (specifically in themes and plugins) into more abstract units in other code as well as my own.

Continue reading

Resolving The WordPress Multisite Redirect Loop

Though I do the majority of my work using single site WordPress installs, there are a number of sites and projects in which I’ve used WordPress multisite and there’s a problem that I’ve experienced specifically with using WordPress multisite, subdomains, and shared hosting environments.

Specifically, the problem is this:

  • Install WordPress and activate multisite
  • Configure the installation to use subdomains (versus subdirectories)
  • Attempt to login and get stuck in a redirect loop

If you have a single instance of WordPress multisite installed on the same server, there’s no issue, but if you go beyond that then you normally hit a problem: a redirect loop.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑