Manage WordPress plugins with composer

Haven’t had a chance to try this out on a live site yet, but I’m intrigued by the idea of using composer to manage WordPress plugins.

One issue we’re working through at work is how best to track external, third-party code on WordPress sites.

I’m of the mind that our git repositories should only contain the code that we’re responsible for. WordPress core, plugins, and other dependencies should sit on top of our checked-out git tracked files to comprise a fully functional site.

But, yesterday, our lead sysadmin had the good point that this technique prevents us from being able to fully re-create the environment at any given commit.

Enter composer.

With composer, we would list our plugins and dependencies in a config file and composer would take care of installing them.

This way we have a record of the site dependencies without having to track the files themselves.

Still need to think through how to handle WordPress proper with this technique. It’s technically a dependency but the only way to install it via composer is through third-party projects not blessed by the official project. Not crazy about that.

But installing plugins is our biggest hurdle right now, which composer handles just fine.

Remove email message that can’t be moved to Trash

No idea how bulletproof this is, but it worked for me on Apple Mail v6.6 using a Microsoft Exchange email account.

I had an email message that was out of my inbox and inside a “Smart Folder.” I tried deleting it but it could not be moved to trash.

On a whim, I marked it as “Unread” and it removed itself immediately.

Best hunch is setting the unread flag syncs with the server and since there was just a mis-sync between the server and the client, it was enough to tell the client the message shouldn’t be there.