speed-up-wordpress-website-like-geek

This post will Cover

 

Everyone is familiar with WordPress, one or the other way.  Some of you may be are having clients who are using WordPress as their website core, some of you may be are bloggers, some of you are compelled by the title and are seeking for something quick and beneficial in this post (which you will get) and some of you are autodidact like me.

Powering 28% of the internet, WordPress is one of the largest CMS, widely loved and user-friendly.

The story of need for speed became official on 9th of April 2010 when Google announced

Website speed to be one of the ranking factors for search results. Since then every webmaster became officially serious about speeding up their website.

WordPress is a compact CMS which do not has any open ends to directly modify it for speed. There are some resourceful and recommended methods of optimizing speed which can be implemented on your WordPress website.

Before going through recommendations, let us ask few questions related to the speed of a website and WordPress.

 

Why speed matters for my WordPress website?

I ask you this, how much time does your website takes to load?

According to statistics most of the visitors with broadband do not wait for even 2 seconds for a website to load.

That’s the answer.

 

Other reasons to be concern about website speed are

  • It is one of the most important on-page SEO factors to rank a website in SERP.
  • It is a factor which affects traffic on your website.
  • It can irritate customers while browsing your site
  • It can affect conversions on a website.
  • It can affect the reputation of a website.

 

How to test a WordPress site speed?

To do WordPress site speed test you have two ways.

 

Ask people


Sometimes you just need to do is ask. Before asking, decide your target demographics. If you are unaware of your demographics you can check the traffic demographic in you Google Analytics. Did I tell you that you can use Jetpack to get traffic analytics about your WordPress website?

Some websites deal internationally and some are specific to a country. After Knowing visitor demographics, you can ask people on social media groups or your followers to help you do the speed test for you from their location.

To speed test a website without any online tools, ask your helping hands to do as follows.

Use Command Prompt to find ping time.

Press window+R,  type “cmd” and hit enter.

cmd-command

Type ping websitename.com and hit enter.

ping-using-cmd

Above time=63ms means it took 63 milliseconds to reach the server from your device. It will vary for different demographics.

Next, you can ask them to use console in the browser to check the speed.

Press F12 or fn+F12 to popup console.

manual-speed-test1

Keep Preserve Log radio button checked and then hit ctrl+F5. Using ctrl+F5 will load the website from the server, instead of using browser cache files.
As website starts to load, you can see lots of activity in the console until loading is completed.

manual-speed-test-2

At the bottom, you will see total page size and total time taken to load the whole website.

This method can be used to manually speed test website files.

 

Use website speed test tools

Generally, people prefer this as the primary method, but Geeks, they prefer to go for above-mentioned method first.

There are several online tools available for checking website speed. Some of these tools have demographic limitations but are perfect for suggesting improvements which will help in your website speed optimization.

Speed test for WordPress website can be easily executed using these online tools, as they do not have any limits regarding CMS’s and Frameworks.

Below are some of the website where you can check the speed of your WordPress website.

  1. Google Page Speed Tool
  2. GTMetrix
  3. Pingdom Speed Test Tool [4 Test Locations]
  4. Web Page Test [20+ test Locations]
  5. Key CDN Speed Test Tool [14 Test Locations]

Just add your site, and analyze. Results and suggestions will be shown after the analysis which you can download too.

 

What are the factors affecting my WordPress website speed?

There are many factors which are responsible for your website speed. Major of them are:

  • Your Web Hosting Type
  • Your Server Location
  • Images on website
  • Installed Theme
  • Http Requests
  • Backend Requests
  • Plugins
  • No server-side compression

 

How to speed up my WordPress Website?

Below are some tips to must follow for WordPress speed optimization.

  • Hosting

    There are specifically configured hosting packages for WordPress. Most of the WordPress owners prefer using a shared hosting.
    Instead, they can use WordPress dedicated hosting which can be choosen depending upon installs, monthly visits, and web space. It can cut off the need of hosting optimization for WordPress.

    Alternatively, you can choose some reputed web hosting providers for shared hosting. They may seem costly but will be compromised with your website performance.
    Few of the hosting providers are:


If you have a huge WordPress website like a news website or any portal, then it is suggested to go for a Dedicated hosting.

 

  • Plugins

    Plugins are one of the shadow culprits which can slow down a website. Plugins are very useful for adding extra functionality to your WordPress website. Unknowingly some of them utilize extra server resource, which causes a website to slow down.  

    As a solution to this issue, try to do customizations and implementations manually from the server-side, rather than using the plugin(s) individually for every need.

    For example, if you want to add Google Tag Manager code to your WordPress website, then add it manually by editing header.php, rather than using a plugin for it.

    Some plugins are already speed optimized for WordPress and are light weight, just like our social sharing plugin for WordPress.

    Additionally, you can use plugin performance profiler to determine your culprit.

     

  • Images

    While developing and after development we rarely acknowledge the size of images we use. Heavy images take time to load, impacting performance of a website.

    Optimizing images in WordPress can be done in two ways.

    You can compress images first by using an image compression software like Caesium and them upload them on a website, or use image compression plugin like WP Smush, EWWW Image Optimizer, Kraken.io Image Optimizer etc.
    These plugins compress existing images on the website and compress images while they are uploaded.

    NOTE: If you know what sized images are being used, you can resize them to respective sizes to save space.

     

  • Caching

    A cache is a temporary storage area of your browser where some static website files are stored so that they can be easily available upon revisiting the website.
    Enabling caching in WordPress will allow static part like images, css files to save in browser cache area and serve them when someone revisits it from same browser and device. This reduces request to server hence saving bandwidth, resources and website access time

    To start caching in WordPress use W3 Cache plugin but to do it the geeky way, we will enable caching manually on WordPress website. This saves memory which may have been consumed by a caching plugin.

    To manually enable browser caching, add this code in your .htaccess file.

    CODE:

    <IfModule mod_expires.c>
    # Enable expirations
    ExpiresActive On 
    # Default directive
    ExpiresDefault "access plus 1 month"
    # My favicon
    ExpiresByType image/x-icon "access plus 1 year"
    # Images
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    # CSS
    ExpiresByType text/css "access plus 1 month"
    # Javascript
    ExpiresByType application/javascript "access plus 1 year"
    </IfModule> 

    You can change expiration time of your cache depending upon elements and functionality of your website.

     

  • Minify HTML and CSS

    Minify means compressing. Compressing HTML and CSS files can greatly save space as well as loading time.
    Better WordPress Minify and Autoptimize are two of the most installed plugins for minifying JS and CSS files. These plugins aggregate, compress and cache HTML and CSS files, which decrease requests made to the server, hence increase website speed.

     


  • Enable server-side compression


    Commonly Geeks know it as GZIP compression. Basically, it compresses some server files like HTML files, plain text files etc before sending it to requesting server. Compression decreases file size of requested files and increases website loading speed.

    There are three methods to enable GZIP Compression for WordPress.

    1. Enable GZIP compression from server: Open cpanel of a website, navigate to Software tab and select Optimize Website.

    GZIP-compression-using-server1
    Select Compress all content and GZIP compression will get enabled. To enable it for specific types, select Compress the specific MIME types and mention file types.

    GZIP-compression-using-server2
    Below two methods are for enabling GZIP compression for those who have access to main admin only, not server.

    2. Using Plugin: Use a GZIP compression plugin like GZIP Ninja Compression to enable compression.

    3. Using .htaccess:  Add following lines to your .htaccess files to manually enable GZIP compression on your WordPress website.

    CODE:

    <IfModule mod_deflate.c>
      AddOutputFilterByType DEFLATE application/javascript
      AddOutputFilterByType DEFLATE application/rss+xml
      AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
      AddOutputFilterByType DEFLATE application/x-font
      AddOutputFilterByType DEFLATE application/x-font-opentype
      AddOutputFilterByType DEFLATE application/x-font-otf
      AddOutputFilterByType DEFLATE application/x-font-truetype
      AddOutputFilterByType DEFLATE application/x-font-ttf
      AddOutputFilterByType DEFLATE application/x-javascript
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE font/opentype
      AddOutputFilterByType DEFLATE font/otf
      AddOutputFilterByType DEFLATE font/ttf
      AddOutputFilterByType DEFLATE image/svg+xml
      AddOutputFilterByType DEFLATE image/x-icon
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE text/javascript
      AddOutputFilterByType DEFLATE text/plain
    </IfModule>
    


  • Use a CDN

     Content Delivery Networks help deliver static files faster from a location much closer to the visitor(s). It makes a website seem even faster than existing state.
    CDN uses a wide network of servers placed in different location to deliver content to visitors. Closer be the CDN server to the visitor, the faster the static content delivered to the visitors.

     

    how-cdn-works

    Image Credits: creative-artworks.eu


 


These are some ways a WordPress website can be optimized to speed up and compete other fast websites on internet.

Before ending this post, here are some performance optimization tips to follow while working on a WordPress website, which adds to its performance.

 

Top WordPress optimization tips to keep in mind

  • Do not use full posts

    Instead of showing full length posts, use excerpt in blog section.

  • Pagination

    If a post is too long, use pagination to divide content.

  • Lazy Load

    Use lazy load plugin to show images when they are focused. It saves ample of time while loading content.

  • Disable hotlinking and Leaching of content

     In Order to save bandwidth, others link content from another website, rather than hosting them on own servers. It exhausts bandwidth for server hosting the content. More people will link, more the performance will degrade for the website hosting.

    #disable hotlinking of images with forbidden or custom image option
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?social9.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.ca [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
    


    This code blocks hotlinking while allowing images to be viewed in search results and on your website.

  • Cleanup Database

    Use WP-Sweep plugin to remove extra data which gathered with time, like spams comments, revisions etc.
    Removing unnecessary data will significantly reduce database size, which adds minor performance improvements to the website.

Imply these changes and get Blazing fase WordPress website. If you find this post resourceful (which you will), please share it with friends, family, workmates and strangers.