How To Increase WordPress Website Speed?

Jignesh Thanki
5 min readJan 22, 2019

--

Website speed is an important factor for SEO and site traffic. It also said that faster sites do end up ranking higher. Hence people have started focusing more on page speed. Here is a list of some tools to examine website speed.

All of the tools mentioned above, provide us with an insight into each issue and solutions to each issue on the tested website. you can go through the suggestions provided by the tools mentioned above to increase your site speed.

Here are some general techniques to increase WordPress website speed.

Serve optimized images

Images make people attracted to your content. However, if images aren’t optimized, they could be damaging rather than supporting. Non-optimized images are one of the most common speed issues that websites face.

There are some good plugins available in the market which can help you in optimizing the images. here is the list of such plugins:

  • Smush Image Compression and Optimization
  • EWWW Image Optimizer
  • Compress JPEG & PNG images
  • ShortPixel Image Optimizer

Enable Browser Caching

Browser caching temporarily stores visited web page resources on a local disk. So, if someone visits the webpage again, the browser requests only updated data from the server & loads other data from the cached content. Hence, Enabling Browser Caching became important to load your web pages faster.

Browser caching can be enabled by manually setting the expiration time for various resources into the htaccess file on Apache or by setting cache-control header & expires headers to your server block on Nginx or by using a plugin.

Below is the list of some available plugins in the market to enable browser caching:

  • WP Fastest Cache
  • W3 Total Cache
  • Leverage Browser Caching
  • WP Performance Score Booster

Enable gzip compression

GZIP compression means zipping(compressing) pages on a server before the page is sent to the visitor. Enabling compression can significantly reduce the loading time of your page. For enabling GZIP compression you can use listed below plugins :

  • Check and Enable GZIP compression
  • WP Performance Score Booster
  • W3 Total Cache
  • Warning: Many shared hosting servers do not support gzip compression. Below is the list of modules to enable compression on your server.
  • Apache : mod_deflate
  • Nginx : ngx_http_gzip_module

Html, CSS and Javascript Minification

Minification implies eliminating extra spaces, lines, and unnecessary characters from the website source code. Minified files are faster to load and enhance your site’s speed.

For Html, CSS, and Javascript minification you can rely on plugins like Autoptimize, W3 Total Cache, WP Super Minify, or Better WordPress Minify.

Defer javascript parsing/Asynchronously load javascript

To serve a webpage to the visitor, the web browser parses all the tags added on the web page. This parsing adds page loading time. By reducing the amount of javascript required to display the web page or deferring javascript parsing until required, you can reduce the loading time of a web page.

To defer javascript parsing, you can use the given below plugins or you can use the WordPress filter hook given below to add defer/async to script tags.

  • Async JavaScript
  • Autoptimize
WordPress filter hook: function add_asyncdefer_attribute($tag, $handle) { // if the unique handle/name of the registered script has 'async' in it if (strpos($handle, 'async') !== false) { // return the tag with the async attribute return str_replace( '<script ', '<script async ', $tag ); } // if the unique handle/name of the registered script has 'defer' in it else if (strpos($handle, 'defer') !== false) { // return the tag with the defer attribute return str_replace( '<script ', '<script defer ', $tag ); } // otherwise skip else { return $tag; } } add_filter('script_loader_tag', 'add_asyncdefer_attribute', 10, 2);

To use the above hook just add ‘async’ or ‘defer’ to your script handler. So, your add_enqueue_script call will look something like below :

wp_enqueue_script( 'scriptname-defer', ....... ); OR wp_enqueue_script( 'scriptname-async', ....... );

The Difference between async & defer is explained below:

  • Async downloads the script file during HTML parsing & pauses the HTML parser to execute the script when it has finished downloading.
  • Defer downloads the script file during HTML parsing & will only execute it after the parser has completed.

Implement the Content Delivery Network (CDN)

CDN cache your website content on a geographically distributed server & provide cached content from a web location nearest to a visitor. The primary goal of a CDN is to enhance site performance by reducing the time required to transmit data to site visits.

To implement CDN on a WordPress website, you can choose a web hosting company that offers a CDN as an integrated part of their services or you can rely on a third-party service provider.

If you choose a hosting provider with CDN service, you’ll need to update your account settings to make sure it’s enabled on your website. For third-party integration you need to follow below steps:

  • Choose a CDN provider & get registered

Here is the list of some well-known CDN providers: MaxCDN, Cloudflare, Rackspace, Akamai, Amazon’s AWS, and CoralCDN.Choose a CDN provider & get registered

  • Choose a plugin to implement CDN on your website.

There are two powerful plugins that can help you to implement CDN on your website: WP Super Cache & WP Total Cache.

  • Connect Chosen CDN to your WordPress setup.

The last step is to set up your WordPress site to actually call the CDN instead of the server files. This is the step where you’ll configure the plugin you chose in the previous step.

Optimize WordPress Database

WordPress database collects a lot of additional data such as revisions, data from plugins you are no longer using, unused tags, spam or trashed comments, and more. Removing this additional data can significantly decrease your database size which speeds up your backup process and can add minor performance gains as well.

Below are the plugins which you can use to optimize your WordPress database.

  • WP-Optimize
  • WP-Sweep

Having a fast website helps increase your website rankings, improves crawlability for search engines, improves conversion rates, increases time on site, and decreases your site bounce create.

Want to hire WordPress developers to get the best-class WordPress development services?

Let’s Talk!

Email: hello[at]creolestudios[dot]com | Phone: +852 92014949

Originally published at https://www.creolestudios.com on January 22, 2019.

--

--

Jignesh Thanki
Jignesh Thanki

Written by Jignesh Thanki

Working at Creole Studios. Best web and mobile app development company in Hong Kong. To hire dedicated developers, Call at +852 92014949. www.creolestudios.com

No responses yet