Software Engineering in WordPress, PHP, and Backend Development

Category: Articles (Page 181 of 258)

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

WordPress and Small Team Source Control

Whenever I’m in the process of working on something for a client, my usual setup is something like this:

  • Work on the code on my local machine’s development environment
  • Keep the code in source control using GitHub
  • Use Dploy.io to deploy the latest commit to a staging server
  • Repeat until ready to launch

Straightforward enough, right?

But there have been a couple of times when I’m working with designers or front-end developers who need to work on, say, CSS files while I continue to do some of the backend work.

If they’re comfortable working with source control, then granting them access to the repository of the project and having them commit their changes to be part of the deployment process works fine.

But what about the case where the frontend developer is going to be working on various styles that you won’t personally be touching, and they aren’t using source control during the development phase of the project?

Continue reading

Importing CSV Files into WordPress: Clean Up

This is the final part in a series for how to Import CSV Files into WordPress.

Over the past few posts, I’ve walked through a strategy that I’ve found to useful and effective when importing large CSV files into WordPress.

Specifically, I’ve broken the approach down into three other articles each of which covers a high-level overview of how to achieve a certain part of the process through a mix of PHP, JavaScript, and pseudo-code.

Up to this point, I’ve covered:

  1. How to setup the script to prevent timeouts
  2. Working to build a back end that supports visual cues on the front end
  3. How to display visual cues on the front use via Ajax

And the last part is by far the easiest: Clean up after yourself.

Continue reading

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

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑