How to add Social Share Buttons to WordPress without Plugins

There are plenty of plugins for WordPress that allow you to add social share buttons to your Posts and Pages. Usually, these plugins are bloated.

They require a lot of CSS-overrides to make it fit with your theme’s design. Some even slow your site down, because they’re not coded well or are packed with a bunch of options you don’t need.

Well, to hell with code-bloat! I want your site to be fast. Today I’m going to show you a really simple way to add your own social share buttons to your WordPress blog.

How to add Social Share Buttons to WordPress without Plugins Read More »

How to get a 100/100 Score on Pingdom & Google Pagespeed Insights

This document contains outdated information.

I’ve revisited this topic recently, containing more relevant and up-to-date information aligning with the new specifications provided by Pingdom and Pagespeed Insights. If you’re looking for an up-to-date, quick and easy way to achieve a 100/100 on Pagespeed Insights and Pingdom. I suggest you follow that link.

When you’ve reached this point of this post, it might be because you haven’t still reached that perfect score on Google Pagespeed Insights or Pingdom. This can be because of very site specific issues.

That’s why I made a list of anything I ever ran into while optimizing a WordPress website. You might never make it to that perfect score, because your site is simply too dynamic. But only after you tried everything in the list below, you’ll know you did everything you could.

Good luck!

Pro-tips for Optimizing your WordPress website

Leverage Browser Caching: Host ga.js or analytics.js Locally

There’s a good chance you’re using Google Analytics to keep an eye on your website’s traffic. If so, then there’s no doubt you’re still getting the leverage browser caching suggestion from Google Pagespeed Insights and Pingdom. This sucks! Why would Google have Pagespeed Insights and set the caching rules of its own scripts to only 2 hours?

Appearantly they tweak the analytics script a lot. Almost daily. So it’s necessary that a browser grabs the latest version at all times. Understandable. But 2 hours!?

Thanks to yours truly, the WordPress Plug-ins catalogue now offers the perfect solution. Host ga.js or analytics.js locally (on your server) and update the script using a custom PHP-script and run that cronjob at a certain interval. [ Click the link. I promise it’ll be worth it. I won’t tell anyone. ]

Eliminate render-blocking JavaScript and CSS in above-the-fold content: Save (Google) Webfonts Locally

Just like with the previous pro-tip, Google is the hero and the villain here as well. If you’re using Google’s (or any other) webfonts, you will still be getting the eliminate render-blocking in above-the-fold content suggestion from Google Pagespeed. Pingdom might tell you to leverage browser cache and to combine external CSS. There’s a lot of ground to win with this one, yet the sollution is so simple.

As with the Analytics-script, webfonts can be saved locally as well. You just need to download it, generate a webfont and adjust your CSS accordingly. You can find guides on how to do this in every corner of the web. To make it even easier for you, I’ve created a plugin which will automate hosting Google Fonts locally.

Combine External Javascript: Disable Emoji’s

I would recommend this to anyone, because I don’t think anyone uses this feature in WordPress. Yet it is hard-coded in WordPress and can’t be disabled from within the settings.

wp-emoji.js is a script that can’t be aggregated by Autoptimize or any other minify plugin, which will always result in an extra DNS request and render-blocking content. Luckily this script can be easily disabled. Again, I would recommend this to every WordPress-site.

Reduce Server Response Time: Use Alternative PHP Cache

If you own a VPS or Dedicated Server, you should always have APC enabled. In some cases (such as mine) shared hosts also support APC. Enabling APC from within your servers administration panel (usually cPanel or DirectAdmin) will greatly reduce your server‘s response time. A guide on how to enable APC on a Shared Hosting package (if your host supports it) is coming soon…

Reduce Server Response Time: Use the latest PHP version

Recently PHP 7.0 was released to the public. Most hosts have silently upgraded your hosting package to support it as well. Version 5.6 is still the most widely supported version, but if your WordPress installation allows it, I greatly recommend you upgrade to version 7.0. It might reduce your server‘s response time with about 0.5 seconds. Look around in your hosts admin-panel and/or look into your admin-panel’s documentation. Before switching to PHP 7+, make sure your WordPress theme and plugins support PHP 7+.

How to get a 100/100 Score on Pingdom & Google Pagespeed Insights Read More »

Combine External Javascript: Disable WP Emoji’s

As of WordPress 4.2 the CMS platform supports Emoji’s. This could be great news for you, if you use them anywhere away from your mobile phone. However, for many bloggers the added feature is an absolute eyesore, causing combine external Javascript to reappear in Pingdom and Pagespeed Insights. Damn you, WordPress! If you introduce a new feature, at least allow us to disable it!

When you’re optimizing your WordPress website, you’ll notice that minification plugins aren’t able to capture the file. Which means that ‘wp-emoji-release.min.js’ will always show up as an extra DNS request. It also means that Pingdom and Google Pagespeed Insights will suggest you to combine external Javascript. It is a terrible thing if you already spent days fine-tuning your WordPress’ website performance.

Luckily, removing the feature isn’t that hard. Today I’ll show you how a few lines of code will send your WordPress website soaring towards that perfect score again.

Combine External Javascript: Disable WP Emoji’s Read More »

Shopping Cart
  • Your cart is empty.