Software Engineering in WordPress, PHP, and Backend Development

Tag: WordPress (Page 151 of 219)

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

Importing CSV Files into WordPress: Visual Cues, Part 2

This is part three of a series for how to Import CSV Files into WordPress.

As mentioned in the previous post, one of the problems that comes with importing CSV files into WordPress – specifically large files – is giving the user feedback that something is happening while waiting for the process to complete.

But when your’e doing this within the context of a web application, it takes a little bit more work because everything happens in a single process. If you don’t show your users any feedback, then it looks as if the page is just sitting there.

Then again, because the process can take so long, you need to let the user know that something is happening.

Importing CSV Files into WordPress: Visual Cues

 

Within the context of web applications, you can do that by using client-side JavaScript to essentially poll the server and ask for status updates.

Continue reading

Importing CSV Files into WordPress: Visual Cues, Part 1

This is part two of a series for how to Import CSV Files into WordPress.

One of the problems that comes with importing CSV files into WordPress isn’t the process that comes with actually doing it but that comes with the work that happens while processing a large dataset.

That is, on staging and production servers, we are subjected to the constraints of the PHP environment which may end up resulting in PHP timeouts. In order to help combat this, there are a number of things that we can do the first of which is to split up our input file into smaller files (which I discussed in the previous post).

Importing CSV Files into WordPress: Visual Cues, Part 1

Obviously, the idea behind this particular strategy is to create smaller files that we can import one at a time that won’t result in a PHP timeout issue (since smaller files clearly result in less data to import). Though this comes with another challenge: giving the user visual cues that something happening while they wait for the import process to complete.

There are a few strategies for doing this, but I’ll cover the process that I’ve used at a high-level and at which I’ve found to work well given lots of information and constraints above.

Continue reading

Importing CSV Files into WordPress: Preventing Timeouts

This is part one of a series for how to Import CSV Files into WordPress.

This is one of set of posts that I hesitated writing because I don’t know how applicable it really is because it’s going to be dealing with talking about how to achieve something at an abstract level without using any real code examples.

And it’s not that I think talking about algorithms or procedures without code is bad (we all use pseudo-code, right?), I’m just not sure if it’s one of those series of articles that’ll help someone or not.

But I can’t be the only one who’s encountered these issues, so I’ll give it a shot. And this is going to be spread out over a few posts.

Importing CSV Files into WordPress: Preventing Timeouts

One of the more common tasks that you’ll see in web application development deals with importing data usually in some file type (often times which is CSV though other file formats are becoming more popular). A challenge, though, with importing data via CSV – especially a large data set – comes with giving the user visual feedback as to how the process is going.

And when it comes to importing CSV files into WordPress, the same rules apple. Importing large data sets and relying on the API to take care of, say, creating posts, associated taxonomies, and adding media can be a time consuming process.

But there are some strategies that we can employ that will help to ensure:

  1. There won’t be any PHP timeouts
  2. The importer gives visual cues without blocking the page load
  3. The functionality cleans up after itself when it’s done.

Though there are a number of ways to attack this particular problem, here’s how I’ve been doing it, as of late.

Continue reading

Include a WordPress Theme Style Guide

In a previous post, I questioned whether or not we should exclude a WordPress theme style guide from our themes when releasing them to our customers.

On the one hand, I think that a case can be made that we should exclude them. In short, I said that:

Offering up a style guide that helps users deviate in any way from the core design, the one that’s created from a level of expertise, is something I think isn’t worth creating.

But there’s another side to all of this. Specifically, what if the theme itself is just one component that’s part of an organizations overall brand?

Continue reading

Exclude a WordPress Theme Style Guide

When it comes to WordPress themes, one of the things that I used to think should be more common was the idea of style guides.

You know what I’m talking about: The documents that are either included with or ship with a theme that guide you on the typography, image sizes, video sizes, and other collateral to make sure that you use the theme exactly as it’s been designed to be used.

In other words, it prevents you from making the theme look ugly.

But are they really needed?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑