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?

Easier Dev Practices For Everyone

Comments are closed on this post. Rather than posting a comment, submit a few dev practices.

I don’t talk about this much on this particular blog because it’s outside the scope of the usual content on which I try to focus, but whenever there’s something worth mentioning, I bring it up.

As such, almost a year ago, I started Dev Practices. In fact, I have a very short post introducing the site on September 16th, 2013.

I still stand by what I said in the first post:

There are two absolutely amazing things that the Internet has brought us:

1. Animated GIFs

2. Memes

And when you combine the two together, you get some seriously good stuff, right?

When I set out to create the site, I didn’t really think of it as anything else that a dumb way to have some fun for a little while.

But it grew into a just a little bit more than that.

In fact, I’ve even considered porting it to WordPress and adding a lot of new features around it. Maybe eventually, but the honest truth is that it’s just a fun site, and there are so many other things that have priority.

So I’ve tried to compromise and improve just one part of the process. For now.

Importing CSV Files into WordPress: Clean Up

This is part three four 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.

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.

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.

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.

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?

Working with the WordPress Media Uploader

Comments on this post are closed. Please leave comments on the respective posts linked from here.

Though I’ve talked about working with the WordPress media uploader in previous posts, I’m currently working through a series on Tuts+ that takes you through the process of incorporating the WordPress media uploader into your own plugin.

This post is going to serve as the landing page for the series of articles, but if you’re a beginner then this series should be for you.

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?

Programmatically Add Post Terms in WordPress

Importing CSV files (or something similar) is something that’s nothing new to web development.

If you’re writing a server side code that’s responsible for importing a file in the context of WordPress, then you can be doing anything from programmatically creating posts to creating more complex relationships among post types, taxonomies, and so on.

In this case, it’s nice to have an abstract function that can help to do a lot of the repetitive work for you. After all, aren’t functions specifically for that?