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

Fonts blocked by CORS policy on localhost: How to fix that

I’m using MAMP Pro and have a separate Host setup for each of my website projects. This let’s me navigate to https://local.mydomain.com instead of https://localhost:8888/mywebsitedirectory. You can easily set up local.mydomain.com to be a.b.c if you wanted; this is my convention for projects. I like to separate local dev with production and sandbox/staging sites. Since i decided to serve fonts locally as web fonts instead of grabbing them from Google or TypeKit or wherever, i noticed this …

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
WordPress

WordPress Custom Shortcode Not Displaying or Breaks Page

So, i’m working locally on this site, tweaking my Wikipedia User Contributions Display plugin, and i noticed that some tweaks i pushed live are actually working fine, but locally they’re not (kinda backwards, i know). Heck, anything after the plugin shortcode doesn’t display–it actually breaks the site (footer scripts and other code fails to run). I google for some fix but nothing concrete. I spot something about PHP may be the culprit, but no one …

Categories
Server Configuration Web Development

MySQL Server Not Starting on MAMP for Mac

So if you’re like me, you do a lot of WordPress development locally and experience annoying issues. I use MAMP, personally, as do many others. One of these common headaches is the MySQL server not starting on MAMP for Mac; inexplicably stopping and whatever you try, it won’t start again. Here’s a fix that has worked all the time for me: Quit MAMP. In the Finder (or Terminal) go to Applications/MAMP/db/mysql56/ and delete the last log …