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
JavaScript WordPress

Inject JavaScript with WordPress data it can reference using wp_localize_script()

Say you have JavaScript files that rely on images that live in your current theme directory — or elsewhere outside of the domain root — and they’re not loading without hard-coding the URL into your code. Or, you may be developing locally and when pushing to a sandbox or production server, tired of changing the file path depending on the server. You must register the script before calling wp_localize_script() then queueing it. This allows you to …

Categories
WordPress

Move WordPress installation to a sub-directory — easily and without breaking sh*t.

For various reasons, i recommend installing WordPress (WP) in a sub-directory rather than in the default root of the domain — such as in the /public_html or /htdocs directories. From here on out, i’m going to reference the root directory as mysite.com/. If you already have a site installed at the root directory, perfect. This guide is exactly for that situation. If you do a fresh install, these can be adapted to it. Just follow …

Categories
Professional Development

Job searching is stressful — some tips to make it less so

Job searching is stressful. Job searching while unemployed is even more stressful. Job searching while unemployed and dealing with bouts of depression is most stressful. But it can be easier, can be less daunting of an experience. I’m hoping what I’ve used over the years can help you get through the grind of looking for gainful employment. Be prepared to approach the job search like a typical workday. Updating your résumé and profile for every …

Categories
Software WordPress

Local by Flywheel hangs on “Checking System…” (macOS)

Local by Flywheel was running without a hitch for the 30 minutes after i initially installed it, setup a local site, and tried out various settings. I was working on a new post regarding local WordPress development using the app. It’s part of a series i’m writing on local development environments and workflows. While documenting the steps and time it takes to close and restart Local with a site running, i ran into an issue with …

Categories
Security

Why you should set up Two-Factor Authentication (2FA). And how to do so.

Privacy and identity theft are a popular tandem these days. We increasingly erode our privacy with every new site or app sign-up — see FaceApp’s aging filter this past summer — but our ears prick up at the phrase identity theft. It’s an odd reconciliation. Passwords or PINs are the most popular way for people to maintain a shroud of privacy. In recent years, it seems there’s a widespread breach of accounts every week. Capital …

Categories
Software

Joplin is the Evernote alternative i was looking for

After not being thrilled with the results of one of my recent posts about finding an Evernote alternative, i’m now focusing on finding encrypted note-taking apps. Particularly encrypted Evernote alternatives. All the criteria from the previous post is the same, but being sure no third party employees of a company can read my notes is paramount. I have documented the apps i’ve researched below. TL;DR: Joplin is the Evernote alternative i was looking for with …

Categories
Software

I found an Evernote alternative — i think.

Evernote was starting to grind my gears when it came to its handling of code snippets, lack of keyboard shortcuts for many things i used often, and finally hitting me how expensive it was, amongst other “little” things that have changed over the years within the app.

Categories
Miscellaneous

Grayed out Apple ID when updating App Store applications

Updating an app installed on a Mac by an account you don’t have the password for, here’s how to bypass the grayed out Apple ID prompt: Go to the /Applications folder: Finder –> Applications Right-click the app that needs updating — in my case, XCode Click Show Package Contents Go into the Contents folder Now go into into the _MASReceipt folder. Delete/Move to Trash the receipt file (you may be prompted for a local administrator …

Categories
App Development Web Development

How to download Google Fonts to host on your own web server or use in Photoshop

If you want to use a particular Google Font in a graphic, maybe a video overlay, or you want to self-host fonts on your own server to speed up your website, you’ll need a way to download the font and convert it to a web font. It can be a time-consuming endeavor. But it doesn’t have to be. A simple way to speed up the process is by using the web app Google Webfonts Helper …

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
DNS Security Server Configuration Web Development

Add Let’s Encrypt SSL with manual TXT verification for GoDaddy DNS

I wanted to add SSL to a website i quickly spun up on a Lightsail instance. It was running on a subdomain. I ran into a hiccup with getting the domain verified via TXT entries in DNS when using Let’s Encrypt to setup SSL on a subdomain via GoDaddy DNS. In case you’re interested, here are the commands i used to manually add SSL with Let’s Encrypt with domain verification and prompts. Via CLI: mycli:~$ …

Categories
Email JavaScript Web Development

How to compress + minify MailChimp’s mc-validate.js for faster loading and better PageSpeed Insight Scores

MailChimp has been far from cooperative with helping developers speed up website loading by simply minifying their mc-validate.js file. There’s a growing thread on Twitter started over two — yes, 2! — years ago!

Here’s what i did to stop receiving terrible grades on GT Metrix and Google’s PageSpeed Insights.

Categories
Server Configuration

Gzip compression – How to turn it on

Continuing with providing tips for website performance results — or just making sure we’re no longer getting a failing grade via performance reports from GTMetrix, Google’s PageSpeed Insights, or web.dev — here’s how to enable gzip compression on your Apache server. First, check if mod_deflate is installed and enabled. It should be installed and enabled since mod_deflate is a default module enabled out the box for Apache. Run apachectl -t -D DUMP_MODULES | grep deflate …

Categories
Server Configuration

Leverage Browser Caching – How to turn it on

So! If you’re a web developer like me, you unfortunately have to bow before performance reports from GTMetrix, Google’s PageSpeed Insights, and still-in-beta web.dev. Don’t get me wrong, the stuff they find are mostly good things, like making your site more accessible and noticeably speedier. But sometimes it can feel like you’re just running in circles to appease these almighty tests. Anyway, one if the issues that popped up on site after site over the …

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
Social Media WordPress

WordPress + ACF + Instagram Feed without API

[Update: See bottom for screenshots] With the the privacy climate these days — see Facebook’s woes with Cambridge Analytica — Instagram has finally enforced the API changes and limits they announced in January. After riding dirty with the feeds for the past few months (despite the summertime deadline), two sites’ feeds stopped working last week. Crap. I needed a quick fix; something easy to implement, and preferably without having to use the API. Signing up again or …

Categories
Social Media Software

I quickly deleted 16,000+ Tweets using Cardigan

Ideally i was looking for a free and easy way to delete most if not all of my Tweets for one of my old accounts. Scouring the web i found many articles on how to mass delete my Tweets, but they all referenced the same two or so services. All of which seemed shady, but i gave a shot since reputable sites like Forbes and LifeHacker had recommended them. The one service that was able …

Categories
Web Development WordPress

WordPress Developers: to use functions.php or a functionality plugin?

I first learned of the functionality plugin vs functions.php way of thinking either from a StackOverflow comment while searching for some elusive WP answer or via Dave Clements’s posts: Create Functions Plugin and Putting Things Where They Belong. Not sure it matters, but i like to attribute inspiration. Anywhoo… The more i’ve tackled WordPress projects, especially while working in-parallel on a few projects or back-to-back with little time to rest, i’ve come to look for more efficient …

Categories
Miscellaneous Software

FinTech Apps to stay financially literate and healthy

This year i’ve worked diligently to get my personal finances in order. From February 2018 to November 2018, i increased my (TransUnion) FICO score by 73 points! To help get a (daily) handle on things, these are the apps i use/check regularly — sometimes several times a day. They are in no particular order. A few of the app links are my personal referral links, by the way. Some offer cool perks for both me …