Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 59 of 258)

Personal opinions and how-to’s that I’ve written both here and as contributions to other blogs.

Resizing Images Programmatically in WordPress

If you’ve ever had to work with resizing images programmatically in WordPress, then you may have come across the image_resize function.

Resizing Images Programmatically: Deprecated Functions

Further, you may know it’s been deprecated (given that this appears at the top of the screen):

This function has been deprecated. Use wp_get_image_editor() instead.

And with its deprecation, as is true of all those who do a good job deprecating functionality, it’s not without its replacement.

In this case, we’re talking about the WP Image Editor. This is a class in WordPress that we can use to perform the same operations to go about resizing images programmatically that we once could with the original function.

Continue reading

Databases and Tools for the Independent WordPress Developer

Admittedly, the last post in this series was quite long. However, that’s not going to be how the overall series of posts articles are going to go.

Preparing a development environment is arguably one of the largest steps required, thus the need for having a lengthy, detailed guide for how to do it.

Remember that WordPress is a database-backed PHP-based web application.

This is all jargon for basically saying that it’s an application primarily written in PHP that needs a database to store its information.

As of the last post, we have the web server and PHP installed and set up, but we’re still missing the database. Luckily, the last post laid the foundation for what we need to get the database installed, set up, and ready for a local WordPress installation.

Independent WordPress Developer: MySQL Version

In addition to covering how to do that, though, I’m also going to outline tools that I find immensely useful when it comes to working with databases on your local machine.

Recall, though, that this series of articles is not meant to be theoretical, but practical. Furthermore, it’s meant to get you from having nothing to having everything you need to build high-quality, WordPress-based products in as little time as possible.

It just so happens that a lot of this time is spent getting the local development environment set up.

With that said, let’s continue and focus on what’s required to get the database set up and with how we can interact with the database server to begin creating what we need for our local WordPress installation.

Continue reading

Using Nullable Return Types in PHP

“One of the nicest features that PHP affords is type hinting specifically for those who are coming from an object-oriented programming background.

From the PHP manual:

Type declarations allow functions to require that parameters are of a certain type at call time. If the given value is of the incorrect type, then an error is generated: in PHP 5, this will be a recoverable fatal error, while PHP 7 will throw a TypeError exception.

The reason this is important is because it gives people who are going to use your code – specifcally those who will write code against your code – what types of parameters a given constructor or function will accept.

But there’s more to it than that because type hints are also applicable to the type of data a function can return.

Continue reading

The Demand for Gutenberg Is Not There. Yet.

I’ve been asked, on a few occasions, why I’ve not released anything that’s compatible with Gutenberg or why certain plugins aren’t compatible with the current version of the Gutenberg plugin.

Demand for Gutenberg Is Not There

In the WordPress economy, I’ve seen few things as divisive as this shift in WordPress (though it seems to be finally have chilled a bit). And I’m not interested in entertaining a position on it on this blog.

But when others ask why I’ve not bothered to write anything about it or make certain plugins compatible with it, I find that it’s worth talking about it at least to a certain degree.

Continue reading

Local Development for the Independent WordPress Developer

Last week, I said that I was going to be writing a series of posts explicitly focused on practical tools for freelance WordPress developers who are looking to improve their skills.

Specifically, I will be writing about the tools, processes, and more for the Independent WordPress Developer. Thus, the goal is to provide a series of content geared towards those of you who are freelancers or who work on a team of one but are looking to apply repeatable, solid tools and practices to your workflow.

In other words, it’s about using a set of tools designed to help you create the best solutions possible for your customers (and doing so with next-to-nothing in overhead cost).

The challenge that comes with doing something like this is two-fold:

  1. It’s a lot of content,
  2. There’s a [small] learning curve.

So, yes, technically you can go to different sites or areas and learn bits and pieces about these things, but the goal of the upcoming series of posts is simple:

Focus directly on the independent WordPress developer and do so in a practical, easy-to-understand, applicable way.

And that’s what I’m planning to do in the series starting today.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑