Tag / WordPress

For a few years now, I’ve been using SearchWP on this and on a few other sites I’ve either built or had a hand in improving.

Most people who are active in the WordPress development space are aware of this plugin (at least, I think they are), but if you’re someone who’s not involved with WordPress at that level and are looking for a way to improve the search functionality of your site, then I can’t recommend the plugin enough.

Then again, even if you are a developer and you’ve never used it, the same sentiment rings true.

One of the features people tend to love or hate (or simply accept) about writing PHP scripts is how you can mix general constructs of the language – such as conditions – with functions outside of any type of class, namespace, or container.

That is, you can write conditional logic that exists within the global namespace right alongside functions that aren’t part of anything other than the global namespace, as well. This can make for difficult code to maintain.

But the point of this post isn’t to complain – for what it’s worth, I see it as the nature of the language, accept it for what it is, try to avoid it, and work with it whenever something comes across my desk. I’m far less dogmatic about that kind of stuff than I used to be when I first started working as a developer, but I digress.

Anyway, this post is tagged as “WordPress” which doesn’t make a lot of sense, however the purpose of doing so is because I was recently working on an older WordPress-based site that was using Ajax, it wasn’t doing so using the built-in API, and it was basically using Ajax to call a vanilla PHP script.

As such, I thought I’d write a bit about as how it’s still possible to refactor code like this so it’s a little more maintainable even if it’s using a style of coding with which we don’t necessarily like to use.

Every developer with his or her weight will say writing quality code is key to making sure a project is maintainable over time.

What constitutes quality code may be subjective and this is not the post to debate that; however, if you’re working with PHP – especially alongside MAMP and WordPress – then I think using the PHP CodeSniffer is a tool we should all be using.

For those who’s written both PHP applications and WordPress-specific applications, you know there are different standards used for writing code. Since this blog is primarily focused on the latter, then I’m obviously going to be focusing on that, but the steps provided aren’t altogether different for working strictly with PHP.

So here’s how you can setup PHP CodeSniffer, the rules for the WordPress Coding Standards, and have them run alongside MAMP, as well.

I’ve mentioned WP Migrate DB in previous posts, but it’s been at least two years since I’ve last written about it.

In two years, software can change a lot and WP Migrate DB is no different. I’m still a fan, I still recommend it to people, and I still think that it’s an extremely valuable plugin for any WordPress developer (or even someone who works with WordPress site migrations) to have available.

The point, though, is not for me to sit here and promote a plugin or to try to push something on you. I’ve said what I need to say in terms of who needs it.

But for those who are skeptical or those who are just getting started in WordPress development, it still raises a question as to why anyone needs it.

And that requires an understanding of why each person should have various environments setup for their project development. If you’re an seasoned developer, this post isn’t for you.

But if you’re getting started with WordPress development or looking to refine your workflow, then follow along. I’ll make this quick.

Trying to find the perfect WordPress host is not an easy task. There are a lot of options out there – which is actually really cool compared to where we were just a few years ago.

Personally, I’ve shopped around, I’ve tried a bunch of them, some I’ve loved, some I’ve liked, some I’ve never left.

I was literally just telling a friend I have a propensity to try new hosts when come to market and have been established for a little while even to my own detriment.

I try wait for others to test the waters, then I’ll jump in. You know, it’s the whole “Come on in, the water’s fine” sorta thing. Sometimes I do better than others.

Really, the only conclusion I’ve been able to draw from trying out all of the options available is there is no perfect WordPress host.