Categories
App Development CLI Web Development

How to update all Node dependencies to their latest version

For the first time last week, i received a “Security Alert Digest” email from Github.

Inside were all the dependencies of a project, gatsby-starter, that had known vulnerabilities. It listed the name of the dependency, its version, and the version i should upgrade to to be safe. Okay.

Categories
CLI PHP Server Configuration WordPress

Fix Fatal error when installing a WP-CLI package

TL;DR Composer was using an outdated PHP, while my server was running the latest. Need to get them to use the same PHP version. Instructions below.

Categories
CLI WordPress

WordPress: Fix WP-CLI error with sed or find commands

One suggested solution was to install the GNU version of the sed command — npm install gnu-sed — but i eventually found a command-line solution once adapted to my situation that worked.

Categories
CLI WordPress

WordPress WP-CLI PHP Notice: Undefined index: HTTP_HOST

I manage a ton of websites. Some servers house several separate installations, which makes it cumbersome to have to login through the web to manage each site. (No multi-site setups.) I decided last weekend after attending my third WordCamp ATL (#WCATL), i’d start to actually utilize wp-cli on a daily basis now that it’s matured and powerful. Heck, i even thought about writing an ebook on using wp-cli. Stay tuned. Anyway, to the issue at …

Categories
CLI Security Server Configuration Web Development

Apache + LetsEncrypt file ‘/etc/letsencrypt/live/…/fullchain.pem’ does not exist or is empty. Action ‘configtest’ failed.

I had setup a new Apache server and needed an SSL certificate so i went with the tried and true, quick and easy LetsEncrypt/certbot route. While testing if gzip was installed, i received errors running apachectl configtest. First time receiving this error. It seemed to be caused by the LetsEncrypt install. I probably wouldn’t have noticed it for quite some time since the https:// version of the site i just put up on the new …

Categories
CLI Miscellaneous

Delete Icon? icon\r files from your Mac

For the longest time these “Icon?” (or Icon\r) files kept popping up on my Mac without any rhyme or reason. I would manually delete them. Eventually i got fed up again when several popped up in my main Music folder and all its sub-directories. I googled a Terminal (bash) command to find and delete files based on name. So, here is the command i settled on for my needs. Be sure to change the directory …

Categories
CLI PHP Server Configuration

Machform PHP mail / sendmail issues on Apache and nginx

So, i decided to give Machform a spin on a project i was working on. Figured it would be quick and easy to get up and running. It was — locally — but when deploying to my sandbox/staging server, i ran into issues with sending notification emails. It was maddening. Spent a couple of days getting everything working as needed and on the same page for all three differing environments. The first problem occurred when …

Categories
CLI

brew update – Error: /usr/local must be writable!

[UPDATE – View updated solution at the bottom of the post.] So, you wanted to update homebrew with the command brew update but received a similar error below: Error: /usr/local must be writable! Simple fix is to run sudo chown -R $(whoami) /usr/local Your problem should now be fixed. If not, you might have ran into this issue that i’ve come across, too: Error: update-report should not be called directly! I fixed this by running …