Optimizing Wordpress on WPEngine

Inspired by Kevin Quirk’s post about Core Web Vitals and Wordpress, I spend some hours trying to improve the web vitals from my other site, which runs on Wordpress. (You can measure your site’s core vitals on web.dev.)

Some months ago I migrated that site from a self-hosted Linode instance to a managed solution on WPEngine. I’m essentially buying back time. A managed solution frees me from server admin duties, like making sure the latest Linux updates are installed, and PHP and its libraries up-to-date.

WPEngine offers an optimized Wordpress installation, which includes caching and CDN. Even so, the lighthouse test returned scores between 70-80 for both performance and best practices. While installing WP Super Cache gave me a near perfect score, WPEngine imposes some limitations on what Wordpress plugins you can install and WP Super Cache in particular is not allowed.

After some hours of trying different plugins and comparing results, I finally settled for the following configuration:

  • Disable Jetpack’s site boost and image optimizing. (Jetpack doesn’t handle cache invalidation, so any image stored on their servers stays there forever… You’ll need to upload the asset with a different name to use it again on your site.)
  • Fast Velocity Minify plugin for merging and minifying CSS and JavaScript, and compressing HTML.
  • Lazy Load by WP Rocket, for lazy-loading images and videos without jQuery or other libraries.

Now the site gets substantially better web vitals score.

Web Vitals

The perfectionist in me would aim for 99%-100% in all categories, but I don’t think I can get there via plugins. The next improvement should be reducing the site’s footprint, which is currently around ~1MB uncompressed.

Read more...

Symbiosis

With emacs and gnus, one must serve a long penance, after which shit still doesn’t quite work but you’ve achieved a deep symbiosis with your editor/mailer and can tailor it to your very precise needs.

Reddit

Read more...

From Thunderbird to mu4e and back to Thunderbird

I spent a couple of days configuring Emacs as an email client in my MacBook. There are lot of useful pages available on how to achieve this. The setup involves using a program like mbsync or offlineimap to create and maintain a local copy of your emails accounts on your computer, and installing and configuring an email client like notmuch or mu4e in Emacs. (Never could get OAUTH2 to work with mbsync so I had to settle for custom app passwords.)

My goal in setting Emacs as an email client is to have a long-term client-side solution for email, one that works the same way on MacOS, Linux, and Windows. Also, my hope was that it would integrate better with my workflow, which involves heavy use of Emacs org-mode and org-roam.

While I enjoy the simplicity of mu4e’s text interface, and search is way better than Thunderbird’s search, rendering of html mails is suboptimal. There is probably a solution for this, it’s just that I’m not willing to dive into another time sink for now. So I’m falling back to Thunderbird until I have time to fix it.

Read more...
emacs email mu4e mbsync

Doom Emacs, Hunspell, and MacOs

Doom Emacs uses spell-fu as the default highlighter for spellchecking. spell-fu can use several options like aspell, hunspell, enchant, etc. for the actual spellchecking. I prefer to use Hunspell.

The process to install and configure hunspell to work for Doom Emacs is simple:

$ brew install hunspell
  • hunspell doesn’t install dictionaries. Download them from the aspell webpage and store them in ~/Library/Spelling. Check that hunspell is recognizing your dictionaries.
$ hunspell -D
  • Tell Doom Emacs you are using hunspell in your init.el file:
(...)
:checkers
    (spell +hunspell)       ; tasing you for misspelling mispelling
  • While Doom will take care of telling Emacs which spell checker you are using, you need to specify a default dictionary. Otherwise you will go crazy wondering why spell-fu is marking every word in your documents as incorrect. (This applies not only for hunspell but also for aspell and enchant.)

    You can get a list of valid dictionary names by changing the dictionary manually within Emacs, i.e. M-x ispell-change-dictionary.

(setq ispell-dictionary "english")
Read more...