Following the Blueprint made my WordPress site load in 0.127 seconds

My 127ms page load WordPress Speed Up Optimisation Blueprint

What if you could make your WordPress website load faster than your competitors website yourself? And by quick I mean LIGHTENING QUICK!

The 4 Speed Optimisation Steps

You would gain an automatic elevation on Google SERPs, your website visitors would be able to access more content quicker and they would be a lot happier, you wouldn’t have to pay a developer because you could do the job yourself and you’d most likely make more money from internet sales and generate a better ROI. Win, win.

The Third Attempt AKA Version 3.0

Believe it or not you’re reading the third attempt of my Blueprint. Earlier versions were fast, but this version is faster and easier to get results! You can read about my earlier insights here. If you’re still reading this and wondering what the heck is WordPress… well it powers 1 in 3 websites!

How Fast Is WordPress?

A basic WordPress website loads in 0.456 seconds, an intermediate WordPress website loads in 2.24 seconds and an advanced WordPress website loads in 2.7 seconds. You can read about a standard WordPress speeds here. Ladies and Gentleman 0.456 seconds is the WordPress website page speed to beat!

The WordPress Speed Up Optimisation Blueprint by Ben Llewellyn

Take a deep breath, “you got this” :) Step one, make a cup of coffee and please read all the blueprint before attempting to try it!

What is a standard WordPress website page speed for a vanilla WordPress site install?

Answer: 0.456 seconds according to my standard WordPress speed test results.

To set a personal best time (PB), I needed to have a track record or in other words I needed to define benchmark WordPress website page load speed to beat. I setup a basic WordPress website running the Twenty Nineteen WordPress theme running on a standard web hosting package.

I only did the following:

  • I removed all plugins (I didn’t install Google Analytics)
  • I setup permalinks as the post name
  • I didn’t change anything else in the WP dashboard
  • The site didn’t have an SSL certificate

I did a quick speed test on pingdom.com which recorded a 0.456 second load speed. My goal was to make my new speed optimised WordPress website load quicker and look much better than this website.

Benchmark WordPress website page load speed to beat of WPStandardSpeed.com: 0.456 seconds (456ms)

Time to beat: 456ms recorded on www.WPStandardSpeed.com

I started from scratched

I wanted to build a new WordPress website because it would be difficult to write an article on how to optimise every current WordPress theme available (although there’s lots of things you can take from this article to do that)! I knew this was the only way I could explain how my readers could get the same speed results. So the process started with me buying a new domain name for my speed optimised WordPress website.

I purchased a .com domain name for my new speed optimised WordPress website

Domain TLD has some affect on SEO so it’s important not to make a rushed decision. Country level domains are geo targeted by Google. I found an available .com domain because I wanted to appear on Google.co.uk, Google.com, Google.us and other international Google an on Google search result pages. It’s more likely that a .com webpage result will be served on Google.us (and other international Google search sites) as opposed to a .co.uk search result (given other factors like for like are the same)! I wanted visitors all around the World to find my fast WordPress website, not just visitors in the UK searching using one Google search engine (Google.co.uk).

I settled on wpspeedupoptimsation.com. The WordPress trademark rules prevented me from using the word “wordpress” in my domain name without their expressed permission because it’s a protected trademark.

I purchased wpspeedupoptimsation.com from HeartInternet for £10.79 exc VAT per year a UK based hosting company. As a professional WordPress developer I purchase my domain names from the same place because it helps me to keep track of all domain renewals (I have around 200 domains which I manage on behalf of paying WordPress development, WordPress website maintenance, WordPress SEO company clients.

Fast DNS lookup demands a faster than normal DNS service

My domain name already came with a DNS service supplied by Heat Internet:

  • ns.mainnameserver.com
  • ns2.mainnameserver.com

But I needed a premium DNS service because I wanted the fastest speed possible for DNS lookup.

Premium DNS lookup service

I created a DNSMadeEasy.com account and I paid $29 for 1 year. DNSMadeEasy provide outstanding DNS lookup times. I was motivated by their affordability and performance rank on dnsperf.com (in the top 10)!

Top 10 DNS Speed Providers

Top 10 DNS Speed Providers According To dnsperf.com July 2018

How I connected DNSMadeEasy to wpspeedupoptimisation.com purchased from Heart Internet

I logged into my DNSMadeEasy account and added my domain. DNSMadeEasy have this help video on “How to add a domain”.

I followed these 3 steps in the video
  1. Select the “DNS” Menu, select “Managed DNS”
    Step 1

    Step 1A


    DNS Made Easy How To Add A Domain Step 2

    Step 1B

  2. Click “Add Domains”, on the right
    DNS Made Easy How To Add A Domain Step 3

    Step 2

  3. Enter Domain Name(s) one per line (replace example.com with your domain anem). Click “Ok”
    Step 3

    Step 3

Once I clicked “Ok” DNSMadeEasy loaded a popup with the following nameservers (yours might be different):

  1. ns10.dnsmadeeasy.com
  2. ns11.dnsmadeeasy.com
  3. ns12.dnsmadeeasy.com
  4. ns13.dnsmadeeasy.com
  5. ns14.dnsmadeeasy.com
  6. ns15.dnsmadeeasy.com

HeartInternet DNS configuration

** IMPORTANT ** Making DNS changes to a domain name is a risky business, for starters any changes you make will make your website and email go off for up to 48 hours (sometimes longer). Secondly if you make a mistake you will have extended downtime! I purchased a new domain that wasn’t being used, so I could live with my website and email going offline whilst the DNS changes propagate.

Navigate to: www.HeartInternet.com >> Login >> Domain Control Panel >> [Select Domain Name] >> Change Name Servers

Then I made the following change in HeartInternet to use the DNSMadeEasy nameservers.

In Heart Internet I Change The Name Servers To DNSMadeEasy Like This

DNSMadeEasy Name Servers Where Added In HeartInternet (I Could Only Enter 4 Of The 6 – Some domain registrars only let you enter 2 so 4 is enough)

I waited for around an hour and my DNS had properagated (sometimes this can take up to 48 hours). I used whatsmydns.net to check the nameservers had changed.

Definition of: Propagation

Definition of: Propagation

This is what my DNSChecker result looked like, the DNSMadeEasy nameservers were showing meaning it had completed (nsXX.dnsmadeeasy.com):

DNS Change Completed

DNS Change Completed Showing The New DNSMadeEasy Nameservers

DNS lookup speed

I ran two DNS look up speed tests using this DNS lookup speed test tool to verify a high speed DNS lookup.

WPStandardSpeed.com DNS look up average speed: 0.081 seconds (81ms)

Standard WordPress Website DNS Look Up Time

81ms average = Standard DNS Look Up Speed

DNSMadeEasy DNS look up average speed: 0.003 seconds (3ms)

2ms average = Fast DNS Speed

2ms average = (Enhanced) Fast DNS Look Up Speed

Speed gain: 0.078 seconds (78ms)

Fast WordPress hosting account setup

Next, I setup my WordPress hosting! As a senior WordPress developer, I’ve used some very good and very bad hosting companies in my time. I’ve had the luxury of working on client sites and sampling pretty much all of the mainstream hosting companies over the course of 12 years development. I’ve worked with companies that employ thousands of people all around the World and I’ve worked with one man bands. To give you an idea of my experience with hosting companies: I’ve probably used around 30 of the top current just within the past 2 years and I’ve built hundreds of WordPress websites using lots of different hosting providers. There’s a big different in speed performance between the good and the standard hosting companies.

My preferred fast WordPress hosting company is WP Engine. They provide a very reliable hosting service, excellent live chat technical support, page caching, staging server, production sever, backup and recovery, CDN (content delivery network) and they manage security server side – so WordPress website owners don’t need to install security plugins to harden their WordPress websites (which slow WP websites down). More importantly WordPress sites load much more quickly on WP Engine servers!

I selected the WP Engine starter package and added the CDN option to it. A CDN (content delivery network) enables images and other website assets to be downloaded from a server closest to a website visitors geographic location. It improves content download speed for visitors worldwide – so it’s a must for high speed content loading.

I checked out and paid $50 per month! WP Engine are positioned at the high end for hosting, but I wanted a better than standard website speed and I was willing to pay whatever it took to get the enhanced performance! Based on my experiences as a WP developer, I knew without this my website speed just wouldn’t be fast enough.

WP Engine domain settings

I needed to tell WP Engine which domain was going to belong to my new speed enhanced WordPress website. To do this I logged into my WP Engine account, clicked on my install name and navigated to domains. I entered my wpspeedupoptimisation.com and www.wpspeedupoptimisation.com and pressed Add Domain. I had to enter the www version and the non www version of my domain for WP Engine engine to understand they are both the same domain.

Navigate to: www.Wpengine.com >> Login >> Install Name >> Domains

WP Engine Add Domain

WP Engine Domain Settings Configuration

Then, to make my domain (www.wpspeedupoptimisation.com) my website URL I clicked Set as primary on the www domain entry. This made WP Engine display my website for my domain name as opposed to the demo speedup.wpengine.com testing URL.

Set Primary Domain Name In WP Engine Account

WP Engine Set Primary Domain As The WWW .com Version

I went back to my install overview page and made a note of my server IP address. I wrote my IP address down (because I needed it for the next step).

Server IP WP Engine

I Made A Note Of The Server IP

I pointed my domain to WP Engine in my DNSMadeEasy account

I logged into my DNSMadeEasy account and clicked on my domain.

DNS Made Easy View DNS Settings

I Navigated To My Domain Name In My DNSMadeEasy Account

I clicked the + icon under A Records. A pop up loaded and I entered my server IP address (from the previous step) into the form field.
Just like WP Engine, I had to create two records for my www.wpspeedupoptimisation.com and wpspeedupoptimisation.com (www and non www domain).

DNS Made Easy A Record Settings

I Added My WP Engine Server IP (Your’s Will Be Different To Mine) And Left Name Empty


I Added The WWW A Record Setting To DNSMadeEasy

I Repeated The Step Above But Entered www Into The name Field

My DNSMadeEasy A Record settings looked like and had two rows:

2 Server IPs For A Records

2 A Records – 2 Rows

I waited for an hour or so, then I typed my website URL into my web browser and it loaded my new WP Engine website which had been automatically created by WP Engine.

SSL (https://) is best

It’s best practise to run a website on https:// now a days as opposed to http://. Https was always seen by most developers as a “nice to have” feature of a website, but things have changed and moved on. Chrome browser now actively warns website visitors if they are about to access a http:// website – which I don’t want.

I logged into my WP Engine account and navigated to SSL and placed an other for my SSL certificate. It was free!!

Navigate to: Wpengine.com >> Login >> SSL

SSL Install Step 1 of 3

SSL Certificate Order

SSL Certificate Order 1 of 3

SSL Install Step 2 of 3

SSL Certificate Order 2 of 3

SSL Certificate Order 2 of 3

SSL Install Step 3 of 3

SSL Certificate Order 3 of 3

SSL Certificate Order 3 of 3

After completing the 3 steps above my SSL settings showed as “pending”

I waited for around an hour – then WP Engine emailed me to say my SSL was active. I tested https:// was working by visiting my domain name with https:// in front of it (https://www.wpspeedupotomised.com) and it loaded my WordPress website.

Final SSL settings

Secure All URLs On WWW (Primary Domain)

Secure All URLs On WWW (Primary Domain)

The SSL Let’s Encrypt™ certificate came free with my WP Engine account and took around 20 minutes to automatically activate. I didn’t need to confirm my email or do anything outside of WP Engine.

I setup https:// for all my WordPress URLs with WP Engine live chat

After successfully purchasing my SSL certificate, I logged into my WP Engine account and clicked on the live chat icon (located at the top right of the WP Engine account control panel). I live chatted to WP Engine technical supprt and asked them to change my website database URLs from http:// to https://. I asked them to change two URLs in my database to https://

I requested:

  1. xyz.wpengine.com (in my case wpspeedup.wpengine.com) to https://
  2. http:// URLs to https:// URLs

This was a bit lazy, and I really wanted to use my favourite database tool to do this, but I also wanted to write an article that a non developer could follow. Besides, WP Engine have world class WP support (which I paid for) so I decided to get my moneys worth. After a few minutes of silent live chat (whilst the operator performed the request) it was complete. I graded the live chat 10/10. Make sure you grade them too – it helps the person at the end of the line!

Lightweight WordPress theme install

My earlier version of The WordPress Speed Up Optimisation Blueprint included activating the Genesis theme and it performed really well. However, in the quest for high speed perfection – Twenty Nineteen performs better! I activated the Twenty Nineteen WordPress theme without a child theme.

Parent theme installation

I logged into my WP admin, navigated to themes, clicked add new and activated the Twenty Nineteen theme.

Navigate to: WordPress Login >> Dashboard >> Themes >> Add New (Search Twenty Nineteen)… Then Activate It

Something you should know about the WP Engine cache

WP Engine recommends that you stage your WP site and not work directly on the live (production) server. The live server caches content which means some changes aren’t immediately apparent. My article however is aimed at “non developers” so we’re going to ignore this suggestion and not use any code editors or SFTP (secure file transfer protocol)! This does however mean you may have to hard reload (hard refresh) your web page to see changes or open an incognito window in Chrome to see new changes. These resources will explain how to do that:

I know this is a faff – but it will be worth it in the end and it keeps this article simple for you to follow.

Website speed graphs explained for speed gainers

There are broadly 3 key speed test websites that most of my WordPress website developer friends use.

A Pingdom speed test diagram height and width has a meaning.

Pingdom.com speed test diagram explained

Time in milli seconds (ms) runs along the top. The assets of a webpage being tested run down the page (on the left hand side).

Pingdom Speed Test Diagram From Previous Speed Test

Previous Speed Test Waterfall Diagram – Pingdom.com

Each Row

A new row is a new website asset loading on the web page being tested. This creates a waterfall effect, cascading down the page. Assets load one at a time and the time taken to download is recorded. The next asset can’t load until the previous asset in the row above has loaded. Assets may include: 1 image, 1 CSS file, 1 JS file. Lots of assets makes a website speed graph taller (more rows) and the website load time becomes longer because lots of assets make a web page load speed longer. 10 website assets take up 10 rows, 50 website assets take up 50 rows and so on. In this article we are going to explore how to load as fewer WordPress website assets as possible without making the website look rubbish. There is a fine balance between number of assets used and website aesthetics. If we were just going for ultimate speed we would load zero web assets :) This however wouldn’t have a real World value for any business because a visitor wouldn’t be impressed once they arrived on the website.

Each solid bar in a row

A new bar (one bar per row) is the time taken for 1 asset to load. The time unit measurement is milli seconds (1000th of a second) e.g. 300 milliseconds = 0.3 seconds. The bar can have maximum of 6 parts in 6 different colours). The colours can are used to identify what the hold up is.

  • DNS -Web browser is looking up DNS information
  • SSL – Web browser is performing a SSL handshake
  • Connect – Web browser is connecting to the server
  • Send – Web browser is sending data to the server
  • Wait – Web browser is waiting for data from the server
  • Receive – Web browser is receiving data from the server
Fast is square and small

A fast website speed report has fewer rows with small and condensed bars. We need to make our Pingdom waterfall speed diagram look like a small square – this is the WordPress website speed sweet spot. We definitely do not want a big square and certainly not a long portrait orientation rectangle.

If you’re still unsure: do a pingdom speed test and click on the 1st column link (asset 1) – this will take you to the asset being loaded on your speed test for a particular web page. This will help you to understand that a website is composed not just of 1 asset but of sometimes 20, 50, or even 300 assets! Each row is the time taken to load just one website assets (one part of a website)!

The speed optimise goal is to reduce rows and move the bars further left (at the same time).

Website Speed Optimisation Diagram Example

How To Make A Website Load Quickly – Pingdom Diagram Explanation

Bare in mind, when you optimise a website the scale of the waterfall diagram becomes less (the diagram will always appear the same width).

WordPress admin dashboard speed optimisation settings and configuration

I took the following steps to get marginal WordPress speed gains. I knew these may not benefit me solely, but I was fairly sure combined with lots of other steps they’d provide a few milliseconds of speed gain.

I removed all plugins (besides from the 3 mandatory WP Engine ones)

I didn’t have any additional WordPress plugins installed besides the four mandatory WP Engine ones. They’re required to make WordPress run efficiently on WP Engine servers and besides you can’t remove them! In my install I had 3 X Must-Use Plugins and 1 X Drop-ins.

Navigate to: WordPress Website >> Login >> Dashboard >> Plugins

WordPress Plugins

WordPress Plugins

I remove all comments and deleted them from trash

Navigate to: WordPress Website >> Login >> Dashboard >> Comments

WordPress Comments

WordPress Comments

I removed all posts and deleted them from the bin

Navigate to: WordPress Website >> Login >> Dashboard >> Posts

WordPress Posts

WordPress Posts

I removed all page and deleted them from the bin and then created my homepage

Navigate to: WordPress Website >> Login >> Dashboard >> Pages

WordPress Pages

WordPress Pages

I configured the General Settings

Navigate to: WordPress Website >> Login >> Dashboard >> Settings

WordPress General Settings

WordPress General Settings

I configured the Discussion Settings

Navigate to: WordPress Website >> Login >> Dashboard >> Discussion

WordPress Discussion Settings

WordPress Discussion Settings

I setup permalinks

Navigate to: WordPress Website >> Login >> Dashboard >> Settings >> Permalinks

WordPress Permalink Settings

WordPress Permalink Settings

I setup the Reading Settings to assign my new homepage

Navigate to: WordPress Website >> Login >> Dashboard >> Settings >> Reading

WordPress Reading Settings

WordPress Reading Settings

PHP 5.6 speed test

I ran a new speed test to gauge the speed performance before I did the next steps.

There was zero speed change after making the WordPress Admin changes above! But I had to do them to absolute sure either way.

PHP 7 setup

I logged into my WP Engine and live chatted with the support agent. I requested my install to be upgraded to PHP 7. They CC’d me in on a support ticket and I had to wait for a little while for this to complete.

PHP 7 speed test

I ran a new speed test on my website but this time it was running the latest PHP 7 version.

There was zero speed change after upgrading to PHP 7.0! At least I knew. To be frank my WP site was so light at this point that a PHP 7.0 upgrade would probably only be noticeable on a website loading more than 16 assets.

WpEngine Finale

Believe it or not, but speed tests with the WpEngine CDN activated on PageSpeed Insights recorded a lower speed. So I decided to not activate my WpEngine CDN.

I turned on object caching

WP Engine >> My Account >> Utilities

I Turned On Object Caching

I Turned On Object Caching

I cleared the cache

WP Engine >> My Account >> Utilities

The Clever Speed Optimisation Step

After the first attempt of my Blueprint I had created a WordPress website that loaded in 0.157 seconds. However the steps to complete for the “speed optimisation” process was complicated and technical. So I took some time off and I built a WordPress plugin!

I installed my WordPress speed plugin

Download it here

Navigate to: WP Dashboard >> Plugins >> Add New (Upload and Activate the plugin)

I visited the options page and activated all the speed enhancing settings by ticking the check boxes and clicking save.

It was time to run a final speed test.

My WordPress speed up optimisation speed mission was finished

I ran a speed test and my new WordPress website loaded in 0.127 seconds from London (Pingdom).

The final outcome of following the WordPress Speed Up Optimisation Blueprint was: I had built one of the fastest WordPress websites ever built – faster than 99% of websites tested on Pingdom.com.

WordPress Website Page Load speed: 0.127 seconds (127ms)

Proof

An updated version of this post is published online: WordPress Speed Optimisation V2.0 updated 2019.

Ben’s WordPress Speed FAQs

I get asked quite a lot of questions regarding WordPress site speed. So here are the answers to some of the most frequently asked questions.

How long did it take you to build a wordpress speed up site?

I started the WordPress speed optimisation process on a Friday evening around 5pm. I’d successfully setup my hosting account by Friday night and performed the DNS update on my domain (20% complete).

On Saturday I had performed around 80% of the WordPress speed up process. Finally on Sunday I completed the process by the early afternoon.

My way of working is probably going to be a bit quicker, than someone doing it for the first time. Having said that – I was also writing and taking screengrabs and running speed tests throughout the process. I also had to fine tun the WordPress theme.

I’d allow 1-2 days to complete the WordPress Speed Up Optimisation Blueprint. It’s not hard, but all the steps need to be completed in the same order.

What are the best ways to speed up my existing site?

If you want to Increase wordpress speed without following the blueprint, there’s still a lot of valuable information you can take from it. Here are my top 4 WordPress speed optimisation tips:

  1. DNS Look Up Speed – DNSMadeEasy.com
  2. Host with WPEngine.com
  3. Install and run a lightweight and stable WordPress theme. Genesis Framework have a lot of Child themes to choose from!
  4. Don’t install any additional plugins that you absolutely don’t need

What sites are best for WordPress speed tests?

Pingdom dot com, GT Metrix dot com and Google’s own PageSpeed Insights.

Chrome browser also has a built in speed tester. You open it by following these steps (you don’t need an additional extension – it’s part of the core browser functionality):

  1. Press F12 on your keyboard to open the developer toolbar
  2. Then click on the the “Network tab”
  3. Click the “X” to close the developer toolbar

You can use this if you’re developing your WordPress website locally on a localhost or private web server.

What’s the best WordPress speed up plugin?

I think if you’re in the position where you’re installing plugins to try and obtain speed gains – it’s probably not going to be as beneficial as following the WordPress Speed Up Optiomisation Blueprint.

How do I improve WordPress speed without following these steps?

Good question! I think this question is website specific. For example, does your site use too many plugins? Does your site rely on too many third-party assets? The answer to these questions will influence the solution to the problem.

Anything I say here is really speculation without understand the site you’re trying to speed optimise.

How do I do a WordPress speed up admin?

If you’re WordPress admin dashboard is running slowly it’s most likely to do with your server performance or the type of hosting package you have. I don’t notice any admin speed performance issues with sites running on WPEngine.

What’s the best wordpress speed test plugin?

There are plugins that kind of do what the WordPress Speed Up Optimisation Blueprint does…

  1. Page Caching
  2. CDN
  3. CSS Minification

But you have to load additional assets onto your WordPress website pages by installing WP plugins. That’s why I haven’t discussed this approach.

During my research, I found lots of articles approaching speed optimisation this way but there wasn’t 1 common standard to do it right to a new site, first time around, until now.

How do I perform WordPress speed up database queries?

You don’t. The way WordPress queries pages can’t be altered. It’s part of the core functionality of WordPress.

The easiest way to speed up your database queries is not by making a page run lots of queries.

  • Limit your blog posts to around 10 posts per page
  • Don’t use lots of widgets on the same page or footer to display page links or post lists
  • Don’t bolt on lots of things to WordPress beyond the core functionality
  • In the blueprint I installed the Wp Optimize plugin to optimise the mysql database linked to my website – do the same. Then de-activate and delete the plugin

How often should I perform a WordPress speed check?

I check WordPress speeds fairly regularly. It’s a good idea to keep a check on page speed especially if you’re running advertising campaigns!
From personal experience I’ve found running regular speed checks is a way to ensure your CDN is always active (you may have turned it off to do site work or development). Slow speeds will identify a site issue and flag that you might need to investigate it.

What should a realistic outcome be for a WordPress speed service?

You want a WordPress website that loads as fast as possible.

Tip: Install my Speed Optimised Genesis Child Theme + Genesis Framework Parent Theme, run a speed test and compare the speed test to same site running your theme. If there’s a big different in speed you know your theme needs lots of speed optimisation.

What should a WordPress speed up load time be?

If you want a before and after figure – I’d always aim for at least 50% quicker after optimisation. Especially if your site has E and F grades on Pingdom dot com.

How can I speed up ajax in WordPress?

This is probably related to your WordPress hosting. I generally see long ajax lags on shared server environments hosted with budget hosting providers.

What have you spelt wordpress speed optimization wrongly?

  • The American spelling is: WordPress speed Optimization
  • The British spelling is: WordPress speed Optimisation

It’s British thing?!

This article covers both WordPress speed optimization and WordPress speed optimisation. They are the same thing!

What other hosting companies have you used?

Dedicated Servers (Various providers)
VPS Severs (Various providers), Lots and lots and lots of shared hosting providers (Lots!) – Including but not limited to:

  • Heart Internet (Host Europe)
  • 1And1
  • Bluehost
  • SiteGround
  • WP Engine
  • 123 Reg
  • DigitalOcean
  • HostGator
  • GoDaddy
  • NameCheap
  • One.com
  • Rackspace
  • Linode
  • DreamHost
  • Gandi
  • InMonthion Hosting
  • FatCow
  • Fasthosts
  • Names
  • eUKhost
  • Amazon AWS

And lots more!!

What should my WordPress speed benchmark be?

As fast as possible. If you have identified your competitors – use their page speeds as benchmark times to beat.

How did you optimise your functions.php file?


/* Enable SVG uploads */
function slibdesign_svg_types_addition($existing_mimes_curr_svg = array())
{
$existing_mimes_curr_svg['svg'] = 'image/svg+xml';
return $existing_mimes_curr_svg;
}
add_filter( 'upload_mimes', 'slibdesign_svg_types_addition' );

/* Credit to GeekFlare for suggesting these functions.php speed optimisation functions here: https://geekflare.com/wordpress-performance-optimization-without-plugin/ */

/* Remove RSD Links */
remove_action( 'wp_head', 'rsd_link' ) ;

/* Remove Shortlink */
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);

/* Disable Embeds */
function disable_embed()
{
wp_dequeue_script( 'wp-embed' );
}
add_action( 'wp_footer', 'disable_embed' );

/* Disable XML-RPC */
add_filter('xmlrpc_enabled', '__return_false');

/* Hide WordPress Version */
remove_action( 'wp_head', 'wp_generator' ) ;

/* Remove WLManifest Link */
remove_action( 'wp_head', 'wlwmanifest_link' ) ;

/* Disable Self Pingback */
function disable_pingback( &$links )
{
foreach ( $links as $l => $link )
if ( 0 === strpos( $link, get_option( 'home' ) ) )
unset($links[$l]);
}
add_action( 'pre_ping', 'disable_pingback' );

/* Disable Heartbeat */
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat()
{
wp_deregister_script('heartbeat');
}

/* Remove query string from resources ? */
function _remove_script_version( $src )
{
$parts = explode( '?', $src );
return $parts[0];
}
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );

/*
Credit: https://www.infophilic.com/remove-jquery-migrate-wordpress/
*/

/* Remove Jquert Migrate */
function remove_jquery_migrate( $scripts )
{
if ( ! is_admin() && isset( $scripts->registered['jquery'] ) )
{
$script = $scripts->registered['jquery'];

if ( $script->deps ) { // Check whether the script has any dependencies
$script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) );
}
}
}
add_action( 'wp_default_scripts', 'remove_jquery_migrate' );

/**
* Disable the emoji's
*/
function disable_emojis()
{
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
}
add_action( 'init', 'disable_emojis' );

/**
* Filter function used to remove the tinymce emoji plugin.
*
* @param array $plugins
* @return array Difference betwen the two arrays
*/
function disable_emojis_tinymce( $plugins )
{
if ( is_array( $plugins ) )
{
return array_diff( $plugins, array( 'wpemoji' ) );
}
else
{
return array();
}
}

/**
* Remove emoji CDN hostname from DNS prefetching hints.
*
* @param array $urls URLs to print for resource hints.
* @param string $relation_type The relation type the URLs are printed for.
* @return array Difference betwen the two arrays.
*/
function disable_emojis_remove_dns_prefetch( $urls, $relation_type )
{
if ( 'dns-prefetch' == $relation_type )
{
/** This filter is documented in wp-includes/formatting.php */
$emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' );

$urls = array_diff( $urls, array( $emoji_svg_url ) );
}

return $urls;
}// JavaScript Document

Help!! What should I do?

Comment below or drop me an email via my website homepage contact form.

OMG This really works!!

Please share the success you’ve had… If you enjoyed reading my WordPress speed up optimisation article and you found it useful please share it and comment below. If you get stuck drop me an email via my website contact form on my homepage or comment below.

Is there a plugin to do this?

Please read Version 2.0. This article is the update to Version 1.0 and includes a plugin and theme update. It’s a quicker, easier and efficient method to get speed results.

Disclaimer:

This article is a true account of my steps and my results ONLY. Website site speed is subjective. It is affected by many factors including your location. Therefore to replicate the same speed results in milliseconds is virtually impossible. Following this guide will not guarantee the exact same results for you.

Share buttons

Ben

Author Ben

Senior WordPress developer (London) and founder of SlibDesign.com. I've been using WordPress for over 12 years. Feel free to get in touch with me if you need WordPress help or tips.

More posts by Ben
Top