Tom McFarlin

Software Engineering in WordPress, PHP, and Backend Development

Page 68 of 427

A Strategy for Initializing Plugin Settings

Whenever you’re working on a plugin that offers a page for its settings, there are several ways that you can save and retrieve the information.

Initializing Plugin Settings

You can:

The more I’ve worked with WordPress, the less and less I care to use the Settings API and opt to go with a bit of a hybrid approach.

Depending on the requirements of the project, the implementation will vary; however, I try to use a relatively consistent way to create the functionality.

And though this post won’t go into the various ways that I create my pages, related classes, and so on, it will offer one way that you can go about initializing plugin settings when working on your project or a project for someone else.

Continue reading

When You Get Bored with WordPress, Part 2

In Part 1, I wrote a bit about what happens when someone gets bored with WordPress development. Specifically, I raised points of interest in:

  • Is it the community?
  • Is it the social (perhaps read: political) aspects of it?
  • Is it the fatigue of learning something new?
  • Is it the notion that you’ve learned all there is to learn about it?
  • And more.

And though I think it’s completely reasonable and acceptable to say “I’m ready for something new,” I think doing so under the guise of “I’ve learned all there is to learn about WordPress” to be a bit of an overstatement.

It’s a big piece of software with a lot of APIs, tools, and libraries around it. To make the claim that you’ve learned everything, there is to know about WordPress may be a stretch. I’m not saying it can’t be done (because there are people who have been involved with the project since it’s initial fork), but it seems unlikely.

Regardless, I thought I’d spend a few more words talking about the areas in which I’ve been involved and why I moved away from them as well as why I moved into the areas I’m in now.

Continue reading

Debugging for WordPress Developers: Changing Values at Runtime

So far, this series has provided a series of screencasts that have provided:

In today’s screencast, I’m going to turn my attention to actually changing values at runtime while debugging. This means that while you’re executing your WordPress theme, plugin, or other web application, you can review and even change the values while the program is running.

Changing Values at Runtime

This is useful not only for debugging but for testing various sections of code that allow us to trace how the code is performing, where it’s branching, and if it’s running exactly as we’d expect.

Continue reading

When You Get Bored with WordPress, Part 1

One of the more common things that we see in the technology industry is people changing jobs or, at the very least, having a desire to learn new technology and begin employing it in their work.

The rate at which things change is incredibly high contrasted with some other industries, and I think that’s why some of us get into the industry, to begin with. It’s hard to get bored, right?

On the flipside, I believe this can also breed a feeling of fatigue. If there’s always “the next thing to learn,” when are you ever really an expert at the last thing you set out to learn?

Having worked with WordPress in some capacity for over a decade now (even if it was just using it as a blogging platform or to do minor tweaks for a site), a lot has changed. Given the factors above, why wouldn’t it, though?

Bored with WordPress: WordPress.com

So when I hear that people are bored with WordPress and are looking to move away from it and into something new, I tend to wonder what specifically bores them. But that’s another topic because I think there are a variety of facets to it.

At the same time, though, I’ll occasionally hear people they are bored with WordPress because they find that they’ve learned all there is to know about the platform or at least all that interests them, and they believe that there’s no longer anything left to explore.

I call that into question, though. Because when you strip away all of the stuff that’s tertiary to WordPress, as software, I think there’s an incredible amount to learn and I’d even go as far as to say that there’s near endless potential in what you can do with it.

Continue reading

WordPress Database Merging Made Easy with WPMerge

This is a sponsored post from the fine team over at WPMerge. The following tutorial provides all you need to know to get started.

Whenever we’re working with WordPress environments, it’s common for us to clone the production database to our local development database but not necessarily the other way around.

For example, let’s say that we do work in the local development database that contains new posts, perhaps new WooCommerce orders, or other data that you’d like to share with the production site.

At this point, you have two versions of the database that you’d like to merge without losing changes in either environment.

To manage this, we have a few choices:

  1. You can note all changes made in the local development site and meticulously perform them on the production site.
  2. You can copy changed rows from the development site and run the queries on the production site. The problem with this is when the new data comes in; users may have the same IDs used in the local development database ultimately creating a conflict.
  3. With currently available tools, you can move the development database to the live site. But you’d lose the vital changes like comments or orders that happened on the live site during development.

None of them make for an ideal deployment workflow.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑