• info@kubixtech.com

  • +234(0)705 703 4276

Optimize your WordPress website in 5 steps

1. Get a good web hosting
There are many reasons for one to consider choosing a good web hosting company. A few include affordability, storage capacity, bandwidth allotment, reliability, support and so on. However, this article will focus briefly on RELIABILITY AND SPEED OF ACCESS.
This is important because a website that is often down will loss visitors. Users are often frustrated when surfing through slow websites. Be sure that your hosting company guarantees an uptime of 99.5% at a minimum and offers refunds or discounts should it fail.
How to know if your hosting is fast or reliable ? – Test it yourself during peak hours, look up reviews about the host provider and try to get feedbacks from your site users.

2. Pay attention to your theme selection or site design
Are you purchasing a theme for your website ?
Choosing a WP theme with a fast load time will help you a lot over time. If your code is poorly structured, your load time will be poor. You can test your theme using online tools like Google Page Speed Insights, Pingdom Tools etc.
Often themes with many features can often lead to a slow website speed.

3. Useful plugins
Frequently, plugins affect your website speed and load time as they ultimately lead to an increase in requests being made to the server etc… However, there are some lightweight and extremely useful plugins I have used over time for various reasons as you will find below.

3.1 P3 Plugin Profiler : This will give you an insight on all installed plugins and how they all affect you website load time.

3.2 WP-super-cache : This plugin will help reduce load time by creating static files from your website dynamic files. This files are served to your visitors rather than having to process heavy scripts always.

3.3 EWWW Image Optimizer : Very often, image contents on a website can play a big role in the website load time due to the file size. It can often cause a slow page load as it requires time to be served to the user. This plugin can help you compress images in various formats (PNG, JPG) with little or not reduction in image quality. Compressed images will not only improve your page speed, it will help you back up your site faster and reduce you bandwidth usage especially if you have monthly bandwidth limits on your hosting subscription.

3.4 Autoptimize: This plugin will scan your HTML, CSS, JS codes and attempt to optimize it mainly by removing redundant codes found and tweaking a few others for better performance. This is a similar idea used by compression tools like WinZip.

3.5 Remove query strings from static resources: If you’ve come across page speed reports by Pingdom tools, Gtmetrix, Google page speed, you may be familiar with this already.
Here is an example of a query string : /file-directory/folder/filename.extension?ver=4.4.4 ….
In summary, many servers and content delivery networks are usually unable to cache static assets with query strings. This plugin will move the query string and encode the parameters into the URL. This will improve your site performance.

4. Server / Script configurations
Below are few configurations you can apply to your scripts or server to help speed up your website load time.

4.1 Browser Caching
This is a process of loading previously loaded resources from the local disk if not expired. This means you could save a lot of time when making a request to a webpage. Note this will require “mod_expires” to be enabled on Apache. While most host providers do, some may not. Contact your provider for more information on this.
File : .htaccess
File Access: You can access this file via FTP or by logging into your Cpanel/Plesk if you have root access.
Take a backup of this file locally before proceeding with this step.
Mainly the objective is to help leverage browser caching. There may be some plugins offering this function. However, we also want to keep minimal the number of plugins installed on our website.

Copy paste the code below to your .htaccess and save it.

#Leverage browser caching
ExpiresActive On
ExpiresByType text/css “access plus 1 month”
ExpiresByType text/javascript “access plus 1 month”
ExpiresByType text/html “access plus 1 month”
ExpiresByType application/javascript “access plus 1 month”
ExpiresByType application/x-javascript “access plus 1 month”
ExpiresByType application/xhtml-xml “access plus 1 month”
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/x-icon “access plus 1 month”

Test your website using some tools mentioned above and you should see some improvements.

4.2 Compress MIME File types
This option is often included on your CPanel by default. Web servers can compress any content before serving it at the expense of memory. The objective here is to compress only text-based contents before serving it. This will reduce bandwidth consumption as well increase your site performance.

4.3 Optimize WP database
Over time, your database will accumulate a lot of data that may not be needed. Such data include spam comments, revisions, trashed comments, data not used by plugins and more.
Cleaning up your database regularly will increase its performance while reducing the size. Before attempting this step, take a complete backup of your database.
You can do this via phpMyAdmin control panel if you have required access OR you can use a WordPress plugin such as WP-Sweep or WP-optimize.
Both plugins do the same thing but with a slightly different approach. WP-Sweep uses WordPress delete functions while WP-optimize uses direct delete SQL queries. Possible problem with the WP-optimize approach is that you may omit cleaning orphaned data (e.g. data rows whose associations are broken etc ).

4.4 Enable GZip Compression
This is a method compressing files for faster network transfers. Because the size of files are smaller, your website will load faster when access by users. Also if you’ve tested your website with one of the tools mentioned in this article (e.g. Gtmetrix, google page speed, etc), you may come across an error or fix recommended: “Enable Gzip Compression”.
This is one quick solution if you have access to your .htaccess file.

N/B: Backup your current .htaccess file before proceeding with this step.

Add the code below to your .htaccess file

#Enable gzip compression
FilesMatch “\.(ico|jpg|jpeg|png|gif|js|css|swf|svg|pdf|flv|mp3)$” – enclose line between < >
IfModule mod_expires.c – enclose line between < >
ExpiresActive on
ExpiresDefault “access plus 1 month 2 days 3 hours” //you can modify this
Header set Cache-Control “public”
IfModule – enclose line between < / >
FilesMatch – enclose line between < / >

Re-run a speed test of your website and should have an improvement on this.

5. Content Delivery Network (CDN)
Assuming you have a website hosted by company ABC and server location is XYZ. When users visit your site, all the request is served from this single server at XYZ. If there is a high volume of traffic, the server can be overloaded, leading to a slow load time. This is the main problem addressed by CDN technology. It caches your static files like images, javascript, CSS etc and saves to a network of servers in different locations. When users visit your website, they will be redirected to the closest server location. This will improve your site speed and performance.

Need a FREE 1HOUR assistance or consultation on your website project?
– Hosting account setup and migration
– WordPress website theme design, customization, optimization …
– Website speed optimization, SEO assistance and more
– Website security scan, malware removal, and fix

Contact us via email and we will respond to your request in 24hrs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Select Language