PSR-3 log level descriptions

A quick reference for what each log level should be used for.

Continue reading →

How to change a MySQL database’s table prefix

Changing a database table prefix is easy and here’s the simple step-by-step guide! For WordPress installations, it’s essential!

Continue reading →

Easy WordPress file and database permissions and ownership

This post is short — no intro to UNIX file permissions or a plethora of commands, just how to easily setup WordPress file & database permissions!

Continue reading →

Get a substring between two strings in PHP

So you need to get a substring between two strings? A quick Google returns about 101,000 results, the first three of which are from StackOverflow and solve the problem for rather specific use-cases. I wanted to solve the problem once-and-for-all in a more general-purpose way.

Continue reading →

Converting Objects and Arrays

Unidimensional arrays and objects can be converted by casting (e.g. $array = (array) $object; / $object = (object) $array;) but if multidimensional only the first tier is converted. Here’s the solution!

Continue reading →

Relational databases with Excel & VLOOKUP

When a full RDBMS is overkill, you can use Excel to model relational data over multiple spreadsheets. Simple but surprisingly powerful!

Continue reading →

WordPress: Find images without alt text

WordPress always adds an alt attribute to images added via the Media Library so finding images without alternative text is easy!

Continue reading →

Custom global commands in Command Prompt (cmd.exe) with parameters

Here’s a quick-and-dirty way to create custom global commands in Command Prompt (cmd.exe) with parameters.
Continue reading →

Shortcode Tricks

Shortcodes are a great way to extend WordPress and as developers there are some pretty groovy undocumented tricks we can employ.

Continue reading →

Keyboard “kdb” keys in WordPress content

Showing keyboard keys in your content is super-easy with a plugin for TinyMCE and, at most, a bit of CSS in your theme.

Continue reading →