Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 390 of 428)

Standard 3 Migration Meetup Recap

Last night, we hosted our Standard Theme Migration Meetup. We had a solid turnout – there was an even split of 50 or so people hanging out with us face-to-face and via the webcast.

During the meetup, John did a live migration of his blog over to Standard 3 showing everyone his process for how to safely update their blog and I discussed WordPress’ custom menu system, header images, header text, Standard’s header logo feature, and some of the other features built into the theme.

Continue reading

Programmatically Create a Post in WordPress

If you're an advanced developer or just want the TL;DR version of this, skip to the code.

Create a Post in WordPress

For many, creating WordPress posts and pages is a simple matter of using the built-in editor. But if you’re working on a more advanced project – perhaps you need to automatically generate pages (or posts) to act as views or to restrict users from accessing the dashboard.

If that’s the case, then it may be better to programmatically create a post in WordPress.

Case in point: I’ve been working on a project where all user profile management (save for administrators) has to occur outside of the dashboard. This means that when the theme is installed, it needs to automatically generate pages that support this functionality.

It’s not terribly difficult, but it’s important to make sure that you aren’t overwriting existing pages, that you’re properly setting post attributes, and that you’re properly assigning templates when necessary.

Here’s a simple example of how to programmatically create a post in WordPress.

Continue reading

Why WordPress Isn’t Viewed as an Application Framework

WordPress Application Framework

When using frameworks like .NET or Rails, it’s easy to demonstrate how said frameworks were used to build a piece of software. But because of the nature of WordPress, it’s far more likely that people are to treat any project as either a blog or a site powered by a CMS.

In some cases, that’s true; but it’s not a hard and fast rule. Blogs and sites are just two examples of things are can be built (and, honestly, are the most typically built) with WordPress but they aren’t the only things.

I’ve shared my thoughts on using WordPress as a framework for web application development, but this still raises the question: if WordPress is a framework, then what is the software?

Continue reading

Tips For Securing WordPress

I think that the general consensus is that WordPress is a secure platform – and in many ways, it is – but the truth is that it’s still software and that there will inevitably be bugs.

On top of that, if you’re in the business of building products – sites, themes, plugins, etc – on top of WordPress for others, then ultimately you – not the platform – become responsible for anything that goes wrong with the application or any security that arises.

But how do we know we’ve taken taken the necessary steps to make our work as secure as possible?

Continue reading

Programmatically Create a User in WordPress

If you're an advanced developer or just want the TL;DR version of this, skip to the code.

When it comes to building a certain type of web app, I obviously think that WordPress is a viable option. Out of all of the contract work I’ve done in the past couple of years, about half of the projects have required some form of user management.

That is, they usually want users to create their own accounts, set a few fields such as their name and email address, and then be emailed when all is setup.

Out of the box, WordPress offers easy user management through its dashboard and if you’re running some type of blog or editorial site, there’s no need to deviate. But if you’re building an application, there are alternative ways to handle users.

Case in point: say that designer has created a solid look and feel for the site. If you force users to use the built-in dashboard to create or manage their profiles, then you’re yanking them out of the site, dropping them into some new experience, and then returning them to the site from which they came.

Lame, right?

There are better ways to introduce user registration and profile management into an app built on WordPress. Though your mileage may vary based on the needs of you project, here’s a how you can programmatically create a user in WordPress.

Continue reading

« Older posts Newer posts »

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑