How to Improve the Loading Speed of your WordPress Blog

0
167

A speed blog is a dream of visitors. They do not have to wait long to get the information they want to find. In addition, there are many benefits that can be obtained when the blog or website we feel quickly accessed. Some of them are

  1. Improve SEO rankings (Google wants the best)
  2. And Improve UX (User Experience), give a good impression to visitors. This is very important if the visitor is a potential buyer of the product.
  3. Lighten the bandwidth burden, the more optimal it will reduce the amount of content distribution.
  4. Next, Lighten for visitors with slow connections.
  5. Lastly, you also hate the slow web right?

Steps to Improve the Loading Speed of your WordPress Blog

In this technique we will try our loading speed as optimal as possible, note that we do not have to apply all the steps to be explained. do it wisely and keep the direction of each step. Steps will be divided into two categories:

  1. Server
  2. Content Elements

Before starting, please backup your website or blog first.

SERVER

In the case of a server, you can start doing the optimization by choosing a good place in terms of support and easy in performing server optimization. Do not get constrained because the rules of hosting providers that complicated this should be and this is limited. Let’s start doing the optimization. and try to change the web to maintenance mode so as not to disturb the visitors.

CACHE BROWSER

By utilizing the browser cache, you can trim loading for frequently loaded files like CSS, JS, and images. The way it works is on the first visit the client browser will load the content from the server, and it will cache the browser. by storing the content in the browser cache than for the next visit, the browser will not request the content to the server but will load the browser cache. The trick is as follows:

By adding an Expires header set to the htaccess file. you can set the file type and the length of the cache time to last. In this tutorial, I use the usual example settings and pass the Google PageSpeed.

READ ALSO  How to Install Favicon in Blogger.com

The code below tells the browser what files will be cached and how long to “hold” in the cache (local). Add to the top of the .htaccess file. Set how long the cache lasts according to the web update level in the “access 1-year” section. be careful not to set too long if the web updates frequently.

# Leverage Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x–javascript “access 1 month”
ExpiresByType application/x–shockwave–flash “access 1 month”
ExpiresByType image/x–icon “access 1 year”
ExpiresDefault “access 1 month”
</IfModule>
<IfModule mod_headers.c>
<filesmatch “.(ico|flv|jpg|jpeg|png|gif|css|swf)$”>
Header set Cache–Control “max-age=2678400, public”
</filesmatch>
<filesmatch “.(html|htm)$”>
Header set Cache–Control “max-age=7200, private, must-revalidate”
</filesmatch>
<filesmatch “.(pdf)$”>
Header set Cache–Control “max-age=86400, public”
</filesmatch>
<filesmatch “.(js)$”>
Header set Cache–Control “max-age=2678400, private”
</filesmatch>
</IfModule>

KEEP-ALIVE

For those who do not know what is keep-alive. keep-alive is a technique that allows TCP connections to stay alive and helps reduce latency in subsequent requests. so latency is caused by always requesting a new TCP for each request. by making TCP live on will force using the same TCP and avoiding the new TCP usage.

To apply keep-alive, you can first ask the hosting provider and have the keep-alive feature enabled. If it is difficult to do so then there are some other ways described below (use one):

<ifModule mod_headers.c> Header set Connection keep–alive </ifModule>

Add the above script to the htaccess file.

# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to “Off” to deactivate.
KeepAlive On
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
MaxKeepAliveRequests 100
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
KeepAliveTimeout 100

Add the above script to the apache config file (if web hosting provider is allowed).

GZIP COMPRESSION

There are several benefits that we get by enabling Gzip compression. because this method is the most popular to load our site faster by reducing more than 70% the size of blog or web page. Now, most web or blogs use Gzip compression.

READ ALSO  List of Free SSL (HTTPS) Providers

You can use htaccess to enable the Gzip Compression method, how to add the following script to the htaccess file.

# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x–javascript
AddType x–font/otf .otf
AddType x–font/ttf .ttf
AddType x–font/eot .eot
AddType x–font/woff .woff
AddType image/x–icon .ico
AddType image/png .png

CDN

CDN (Content Delivery Network) or Content Delivery Network is a server network system to deliver existing content. In an application/web to various visitors/users in various places. So that data/content sent is received faster (data transmission does not have to be from a central server. but via the closest CDN).

In the picture above (extracted from gtmetrix.com) explains that with CDN, European users will be able to download static content via the closest CDN (located in Europe as well) so the site will be faster. Because it does not need to download static content from the central server who is in America.

The problem is, as smart CDN buyers we have to be smart in choosing a CDN provider. Make sure the available space (CDN spot) meets our target market, the more it is not necessarily better. Adjust to the level of needs of the area you want to reach.

CONTENT ELEMENT

After the server has finished our optimization, then we move to the content. In this section we will do optimization that focuses on the content, on the server that served in terms of content distribution is completed optimized. then by optimizing the content to be distributed will make web speeds increase very well.

MINIFY SKRIP

The first part to be optimized is the script section in the form of HTML, CSS, and JS (Javascript). This technique works by optimizing the script that will be used in the production site (used during live, open trial or debug).

READ ALSO  How to create a blog at blogger.com | Easy Steps For Beginners 2018

When scripts are used in a trial and debugging we will make our script as neat as possible. By adding tabs, spaces and comments to make it easy to read and easy when handling script errors.

When the script is ready to use, then we can reduce the size of the script by removing spaces, tabs, and comments. This technique is called minify. if you ever downloaded a script that when opened looks without spaces. The comment and seemed stacked into a single line, then the script has been unminify.

Minify is not limited to one script file, if we have more than one CSS / JS script, we can combine all CSS / JS on one file and directly in minify (CSS and JS must be separated, join the like).

You can use the W3 Total Cache plugin to start to minify or merge CSS and JS files into one.

OPTIMIZING IMAGES

At this stage, we will make the image on our website optimally well. we all know if the image is the main content that takes up space or space on a website. because most of the filling in the web is the picture. If we can optimize the use of images in the web then we’ve managed to reduce the server load so large.

There are several techniques that can be applied starting from reducing the size of the image by in-compress to utilize free cdn. regarding what steps we can take, please note the steps below:

Compress Image

Before posting a picture, you should first compress the image. Can use online tools or software, usually, the image size will be reduced without unduly reducing the image quality.

For those who do not want complicated can use the help of plugins. One of the WordPress plugins I recommend to compress images is WP Smush.

So some tips that you can try to increase the loading speed when accessing your blog. If you have other tips, share dikolom comment yaa.

Good luck and hopefully useful.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here