CategoryComputers

Beep boop

Interesting WordPress Performance Tweaks

Over the course of a couple of days, the speed of loading a new post form (like the one I’m typing in right now) has been kind of sluggish. Multiple second load times and kind of sluggish responsiveness was bugging me, but I’m not in the new post that often.

While reading up on some good WordPress habits, like Core Functionality Plugins. I noticed a bug posted that hasn’t really been fixed in several years. Basically: WordPress, on the new post page, makes a really slow query for these old Custom Fields that aren’t used in many new posts. The queries run can take make the new post page take several seconds (15+!) on large sites.

The fix is surprisingly easy:

/**
 * Remove Ancient Custom Fields metabox from post editor
 * because it uses a very slow query meta_key sort query
 * so on sites with large postmeta tables it is super slow
 * and is rarely useful anymore on any site
 */
function s9_remove_post_custom_fields_metabox() {
     foreach ( get_post_types( '', 'names' ) as $post_type ) {
         remove_meta_box( 'postcustom' , $post_type , 'normal' );   
     }
}
add_action( 'admin_menu' , 's9_remove_post_custom_fields_metabox' ); 

Add that to a custom plugin, or Code Snippets and boom, much faster loading times for new posts.

Customization

Because WordPress themes are often imperfect, depending on the use, you often have to customize them in various ways. Sometimes it’s adding a logo or featured/header/hero image. Sometimes it’s tweaking the sidebar or widget layout. Sometimes you just need to add or adjust some of the CSS.

Normally, I would recommend customizing more than a few things as a child theme. That way when the base theme gets updated, if you modified your files, they’ll be safe. You can also customize things through the Customize tool. This allows you to set various settings, as well as add CSS. Couple this with Custom Snippets, and you can do quite a bit without having to crack open an editor and SFTP your files back and forth.

To that end, I’ve started saving and documenting some of these tweaks that I use for DeGruchy.org. Everything stored in git on SourceHut. I’m planning on adding more documentation, like plugin usage and some innocuous configuration settings.

Check it out!

WordCamp Europe

So, I apparently missed the entirety of WordCamp Europe. It wasn’t like I was going to any place, as much as I’d love to have the excuse. This year, like with everything else in what I am coining as: “2020: The Lost Year”; WordCamp Europe was online.

Going online does have it’s benefits. People can connect from where they are and save on expenses. This newfangled Internet thing really revolutionized that. Additionally, if you’re someone who missed it (*cough*), then you can watch the recorded videos and pretend like you’re there.

My personal favorites are:

As you might be able to tell, I am an exciting person and would never bore the life out of you at a party or convention. Never.

I dare say that these sorts of streamed/recorded conferences are going to change the way we handle future events. COVID is not going anywhere any time soon, and while I know it’s not going to last forever, we should really think about employing a mixed setting to these events. Bizzcon does this, where you can virtually attend via stream and recording. You pay less for the virtual ticket and still get some of the goodies. While I know that that is less than idea for the sponsors of the event, it might be worth investigating.

Attending my first WPJAX (Tidbits) meetup today.

Zoom doesn’t work in Firefox/Linux, so I’m joining by mobile…

A generally very good meeting of people new and old to WordPress. After a bit of brief introduction, Wesley Lewis presented information on image sizing and compression.

A couple of key takeaways:

  1. Resize your images first, before uploading them. This allows you to get the right proportions and focus points. Software like ShortPixel or Imsanity can do this for you, but it’s entirely automated and can lead to less than desired results.
  2. Formats matter. Most of the time, people recognize JPEG because it’s the format most photos come in off of their cameras. There is also PNG (great for rasterized vector art or lots of solid colors, logos and things that need transparency) and SVG. The new comer to this stable is Google’s WebP, a clever use of their existing WebM format, where the image is compressed using the single frame compression from the movie format. It can compress images very well, and supports transparency. The problem is it doesn’t work at all on iOS and Safari.
  3. CDN and optimization. Optimize your images, either before uploading, or using online toolchains. This allows you to squeeze that extra bit of performance out of your site. Similarly, CDNs can help offload traffic to static and image/media assets, and can deliver them faster by having closer endpoints.

I look forward to the full meeting on July 21st!

How I Handle Email, Now

I am a recovering email hoarder. The archive button in basically any mail application is too tempting to not use. It’s like a button that says “yes, I am done with this email, probably … for now“. Except that’s not what it is. It’s “I don’t want to deal with this now or ever, but in case someone asks me about it, I can find it”.

We, as users, get gobs and gobs of email storage. Right now, at $4/mo/user, Office 365’s Exchange Online plan gives me access to 50 gigabytes of email storage, per user. I find that number so baffling because:

  1. Outlook has it’s limits, too. While we’re all happy to let Outlook chew up an infinite amount of email while indexing and doing the whole deal, but we’re really just kicking the can down the road. Microsoft has a ballpark figure of about 10gb of synced emails before things start to go sideways.
  2. If you’re hoarding email, like me, then you’re storing a lot of junk. Emails that have no relevancy, like “click here to verify your email address” or any number of email receipts from online retailers. None of this stuff matters. If you’ve already processed it, get rid of it!
  3. I don’t even have 50gb of blog posts, and I value those way more than email.

50 gigabytes is a lot of email. Years and years of it. I know some people get large PowerPoint decks and all manner of other attachments. If you are one of those people. Save them to a proper document management system. SharePoint/OneDrive are already built in and able to consume those big files. Email should not be your storage and filing solution.

This is all a very long winded way of saying that my new email handling scheme is this: If it’s an email I need to do something with, I will save it in my inbox until it’s done. Otherwise, I do what I need to do with it and delete it. Often that means adding an appointment to my calendar, or adding an item to my to-do list. Sometimes it’s make a phone call or just read an article. I have mechanisms for all of that.

What I don’t have is any coherent reason to be able to reach back 15 years and review Amazon purchases. If I need that, Amazon has it anyway.

© 2020 Verily

Theme by Anders NorénUp ↑