fbpx

To be able to thrive in a world where competition is strife and businesspeople are ever ready to lay waste to their opponents, it is necessary that you reach out to your potential clients in the right way. Thus, it goes without saying that the best way to do some solid outreaching would be by having a website that can engage your clients and put your products and services out there in the world.

Since there is no business that runs without a website these days, what matters is how you optimise your website to reap the best out of it.

Having a website is not going to do the trick unless it gains more traffic and results in a substantial conversion rate. So, first things first-

Think of a slow website as the death of half of your business. Nothing bugs a user than a website that might have piqued their interest, but refused to load in a jiffy. Do not take my word for it, but extensive studies have been conducted on this and have proven that human beings cannot hold their attention for more than 5 to 7 seconds.

This article that I am writing shall not hold your attention for a longer time if I do not cut to the chase and start talking about how you could optimise your WordPress site and do some serious business out there.  Similarly, your website too, needs to have a great speed to be able to tweak the Click-Through-Rate (CTR) and get your hands on some good revenue. Here are some ways in which you could go about the process.

WordPress Level Optimisation:

It is always advisable to get a back-up of your WordPress site in its entirety before you do anything with it.  WordPress can crash at the slightest interference and then you will have nothing to make changes to. Careful there!

Start by adding Expires Headers-

Expires headers inform the browser about whether it needs to request a specific file from the server or obtain it from the browser’s cache. However, remember not to install plugins or enable plugins that you might need to install later.

So, you begin by first telling the site that you want to enable expires headers by pasting the following code in htaccess.

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault “access plus 1 month”
</IfModule>

Next, you need to look for the resources that are hardly updated.

<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault “access plus 1 month”
</IfModule>
# CSS
ExpiresByType text/css “access plus 1 month”
# Javascript
ExpiresByType application/javascript “access plus 1 year”
</IfModule>

The aforementioned example is not what happens in 99% of the cases. It only takes into consideration all the resources that are updated once a month every year. It is 100% safe to add expiry headers for CSS/JS and favicon if work on the site is completed. Therefore, perform this only as the last step. If you have implemented expiry headers, you need to test if it works by running a gtmetrix scan. It should confirm the same.

Enable keep-alive-

Keep-alive is a persistent connection that allows only one connection to several HTTP requests. It prevents multiple permission calls to one server. Therefore, you need to add the following as your next step-

<ifModule mod_headers.c>   

Header set Connection keep-alive

</ifModule>

A word of caution

While editing an htaccess file, you need to make sure that you copy the code as it is. There is a potential threat of your website crashing if there is any change in the code, no matter how trivial it might look. Also, always append the code, which basically means to add them in the end. Do not ever replace existing code and make sure that the code you copy paste is not already present. Just like the negative of negative is positive; similarly, no two commands in htaccess can become a Yes).

Limit post revisions-

Here is another trick that you must have up your sleeve. WordPress keeps adding post revisions and a single post may have 10-20 post revisions. Needless to say, this takes up a lot of space. However, you could limit the post revision by adding this code in wp-config.php.

define( ‘WP_POST_REVISIONS’, 3);       

This means that you are limiting the total saved revisions to 3.

Disable image hotlinking-

This pointer is going to come in handy when the website you are working with has bandwidth issues. The reason being, when others use the urls of images from your site and use it on their posts, it depletes the bandwidth of your site. So, a 1mb image referred 1000 times will cost us 1000mb in bandwidth. Going through this step then can substantially reduce no anchor image backlinks created this way.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?ventureharbour.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

Turn off pingbacks and trackbacks-

Trackbacks could be seen as an equivalent to acknowledgements that you find at the end of a research paper or scholarly article. Basically, trackbacks are notification systems designed to notify a legacy blog, using pingbacks, if you have linked to them.

Turning this system off can save a lot of space from database. You need to Go to Setting -> Discussions and disable pingbacks and trackbacks.

Move Google fonts call to footer-

99% of WordPress sites use Google fonts at one point or the other. The API call is usually in the header, but you could move it to the footer so that the page can load faster. Add the following code to the footer-

<script type=”text/javascript”>
WebFontConfig = {
google: { families: [ ‘Noto+Serif:400,400italic,700,700italic’ ] }
  };
 (function() {
 var wf = document.createElement(‘script’);
wf.src = ‘https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js’;

 wf.type = ‘text/javascript’;
wf.async = ‘true’;
var s = document.getElementsByTagName(‘script’)[0];
s.parentNode.insertBefore(wf, s);
})(); </script>

Uploading and configuring plugins-

It would do you good to upload the following plugins.

  • WP Fastest Cache – make sure you enable minify and GZip.
  • Query Strings Remover – this prevents the attempts of stray SQL injections.
  • Shortpixel – install this and use it to compress images
  • WP Optmize – cleans DB and post revisions.
  • BJ Lazy Load – use this with caution as this can cause sites to crash.
  • Async Javascript Plugin- enable the plugin and allow the Jquery defer option. This allows WordPress to queue plugin loads.
  • Also when working with any of these programs, make sure that you always choose Minification and not anything do with obfuscation. Minification just removes blanks while the latter changes code which can cause themes to break.

Uploading and working with plugins could be a tricky affair and you must exercise precaution to ward off unwanted complications and technical glitches.

Manual minification for codes in widgets-

Codes present in widgets and other parts of the site need to be minified manually. You could paste the code in the link http://refresh-sf.com/ and get it minified.

Disabling HeartBeat API-

The HeartBeat API is a simple server polling API built into WordPress and has the function of allowing near-real-time frontend updates. It deals with WordPress’s deadlock procedures. The tactic of disabling the API can only be implemented if the client is the only user of the site and does not update it much with new posts and pages.

Paste the following code in the functions.php theme files-

add_action( ‘init’, ‘stop_heartbeat’, 1 );
function stop_heartbeat() {
wp_deregister_script(‘heartbeat’);

The Must Have WordPress Plugins:

It is all fun and games when you have a lot of time on your hand and are prepared to sift through these aforementioned steps to optimise your WordPress. However, some of you might not have so much time and need shortcuts instead. Here are some essential plugins for WordPress to save your day.

WP Rocket-

WP Rocket is by default the best plugin there is, for WordPress. Not all of us are great at the technical stuff which is where these plugins come into the picture. You need no skill to use it and can leave everything up to WP Rocket. The plugin instantly increases you website speed and puts you in an advantageous position. It automatically turns on some of the recommended WordPress caching settings like CDN- support and minification, while also giving you options to manually control other features.

Autoptimize-

This particular plugin makes optimising WordPress really easy. It aggregates, minify and cache scripts and styles, while also tending to features like injecting CSS to page head by default. Therefore, if you really have performance on your mind and hardly any technical skills, this should easily be your safest bet.

W3-Total Cache-

W3-Total Cache is a great plugin used in WordPress to increase the loading speed of your site. Like has already been discussed, it is important that your users are caught up to speed not just with the matter that your website furnishes but also with how fast the page loads. W3- Total Cache does exactly that by increasing your server performance. This enables a better SEO score for you and thus, helps your site to rank higher in the SERP.

In A Nutshell:

There are enough ways to enhance your site’s load speed and performance and thus, rank higher in the Search Engines Results Page (SERP). You could get hired help at the cost of quite some amount to do the work for you or you could do all of that by yourself. While it might seem like professionals have a better know-how in dealing with these technical nitty-gritty, more often than not, they perform exactly what the article entails.

I hope the article was enlightening and I hope that you have a great time optimising your WordPress site the next time you embark on such a venture.

WordPress Lightbox