Installing the Imagick PHP extension in Ubuntu

If you’re running a WordPress website, you’ll see in the WordPress Site Health page that imagick is an optional but recommended module to be installed. We can also check if imagick is installed via the command line, as usual, no output means it’s not installed: [email protected]:/var/www$ php -m | grep imagick [email protected]:/var/www$ By the way,… Continue reading Installing the Imagick PHP extension in Ubuntu

Cleaning up the post revisions with WP-CLI

Over the months, or years, that you use WordPress, the database starts to bloat with stuff that you don’t necessarily need. Post revisions are generated regularly and are not deleted unless you do it manually or you have added code to handle that automatically. The WordPress database does grow big if you let revisions accumulate.… Continue reading Cleaning up the post revisions with WP-CLI

How to run Tampermonkey on specific domains

Tampermonkey is a browser add-on that lets you run arbitrary JavaScript code on a webpage. As a web developer, it’s fun to make scripts to alter how a webpage (that you don’t control) feels and works. However, with great power comes great responsibility to not mess up. Tampermonkey allows you to configure an allowlist (a.k.a… Continue reading How to run Tampermonkey on specific domains

Setting environment variables in Node and React

An environment variable is a variable that is set from outside an application, usually from the operating system. If you’re using Linux, MacOS or Windows, your operating system already has some default environment variables which you can access from your terminal or from inside an application that you are writing. Some most popular examples of… Continue reading Setting environment variables in Node and React

Fixing sed error “undefined label” and “invalid command code” on MacOS

The life of a programmer is hard. There are moments that we encounter bugs and have absolutely no idea why it’s happening. These occasions challenge our troubleshooting skills. Let’s look at a scenario with sed where the same line of code which works on MacOS won’t work on Linux and vice-versa (I’m testing on Ubuntu)… Continue reading Fixing sed error “undefined label” and “invalid command code” on MacOS

Fixing the ‘Another update is currently in progress.’ Error in WordPress

If you ever see the error Another update is currently in progress, it means that WordPress has been updating one of its components (maybe a theme, a plugin or even the WordPress core) and something got messed up and the update process didn’t finish successfully. You’ll even get that error if you’re updating via WP-CLI:… Continue reading Fixing the ‘Another update is currently in progress.’ Error in WordPress

Fixing “Warning: Failed to set locale category…”

You often get this rather annoying warning in your terminal on a freshly installed operating system (or each time until you decide it’s annoying enough to be fixed). For example when you are using wget, your terminal will serve you these warnings. You have a configuration issue with your computer’s or server’s locale. We’ll tackle… Continue reading Fixing “Warning: Failed to set locale category…”

The target=”_blank” vulnerability

When someone is writing articles for a website or a blog, they often want to link the article to an external website. It’s common practice to make the link open in a new tab so that the website visitor can easily get back to your tab and continue browsing around – consequently increase your Google… Continue reading The target=”_blank” vulnerability