IMPROVE SITE PERFORMANCE AND TOP-LINE REVENUE
10 WordPress Performance Optimization Strategies
We saw what factors into your website slowing down page load speed, now let’s see ways we can reduce the load
time with website optimizations and best practices. I recommend you take a speed test of your website before we
begin our optimizations. We will use this as a benchmark to compare all the work we do each step to. Some
excellent tools to test your website speed are,
GTmetrix,
Pingdom, and
PageSpeed Insights
by Google. Let’s go ahead with the optimization now.
1. Choosing a Good WordPress Hosting Plan
One of the most important aspects of your website's overall performance is choosing the right hosting plan. The
host's server is the place in the data center where your website's data resides. There are two ways of going
ahead with this. There are shared hosting plans and
managed WordPress hosting.
Shared hosting: In the case of a shared hosting plan, your server's resources are shared with
many other websites. The most significant advantage of this approach is that it cuts down the price you will
have to pay for the hosting company by nearly 70%. Other added perks are; you're allowed to host multiple
websites, and unlimited visitors are permitted.
Nevertheless, since the resources are shared, this might significantly slow down your website. Other
disadvantages would be; you'll have to deal with c-panel (control panel) of the server for configuration, which
is a bit complex if you're not from a WordPress/technology background. Shared hosting lacks other value-added
features like WordPress specific performance optimizations, automatic updates, and backups.
Managed WordPress Hosting: In managed WordPress hosting, there's a set of exclusive services
given to you. Which includes built-in WordPress optimization configurations to help decrease load time, tools to
install, and manage WordPress, automatic updates and backups, and website security features. However, such
curated services come at a premium price. So, the major downside of a managed hosting would be high pricing.
Other disadvantages are, they impose a strict upper cap on the number of visitors to the site and the number of
websites.
Now that we know the major differentiator between a shared and managed hosting is the pricing, we have a few
suggestions for you. If you're a beginner or your website ranges from small to medium, shared hosting is your
best bet. Some of the best known shared hosting plans can be found at
Bluehost and
SiteGround. If your website handles
massive traffic or is a business website or if it's an eCommerce one, managed hosting will give you the best
results: Kinsta and
WPengine are a few of the best providers.
2. The Theme of Your WordPress Site Counts Too
Themes have a lot to do with the entire look and feel of your website and user experience. The digital theme
market is so attractive that we often tend towards getting the one that has the best reviews and is highly
customizable. Your WordPress theme needs to grab the attention of your desired end-users, but not at the cost of
performance. Your website cannot afford a bulky, or poorly coded, ill-maintained theme. Hence, thorough research
and performance analysis should be done before finalizing which website theme you will be using. Another aspect
that puts some light in this area is whether it's a free or premium theme. Free themes can sometimes turn out to
be a costly affair for your website's performance. Premium ones, on the other hand, are less prone to flaws. We
recommend the following multipurpose light themes with easy load times; Astra, Divi, and theme forest, which has
a vast collection of WordPress themes.
3. The Media in your WordPress Site
Bulky media could drastically affect the performance of your website. It slows down the load time of your
website hence bringing down the rank. It's paramount to compress and optimize your images before uploading them
to your website. Images are generally either .PNG or .JPG format. A .PNG file is an uncompressed image of higher
quality and large size. Whereas a .JPG file is a compressed image of little lesser quality and an astonishingly
smaller size. Can you visibly make out any difference between the two images below? You won't know the
difference until you see their properties! And you will realize that there's a massive difference in their size,
which will predominantly affect the load time.
.PNG file of size 3.23MB
.JPG file of size 306KB
So, if your website is using images, make sure to optimize them. You could use .JPG in almost all scenarios but,
if you're using an image with a transparent background or a cover image, then a .PNG is recommended. You could
do all the optimization manually, but if you're looking for a plugin,
WPSmush and
Imagify are some of the best plugins for image
compression.
That was about images on your website. Another aspect concerning media on your website is embedding videos on
your website. So, if your website is a video-centric one, consider using third-party video hosting. Because
otherwise, it will significantly hamper the performance of your website. Some of the popular video platforms are
YouTube and Vimeo.
When the files on your website are directly linked to another site, it is called Hotlinking. The data is usually
images and videos. When users access the other website, they are using the bandwidth of your server—resulting in
an increase in load time, of course, thereby reducing the website's performance. To prevent this, you should
avoid Hotlinking, by editing your .htaccess file with the below code.
#Switch on rewrite engine RewriteEngine on #Allow empty referrals, in case visitors are using personal
firewalls RewriteCond %{HTTP_REFERER} !^$ #Match request URL. Replace www.yourwebsite.com with your website URL
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?www.yourwebsite.com [NC] #Match all files with the below list
of extensions RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
4. What is Caching and Why is it Important?
Caching is a process of keeping a copy of a previously visited page on a website. If you refer to our previous
article
WordPress Website Basics, we have explained the architecture of a WordPress website. You will see that the pages are served
dynamically, which means that every time a page is requested, it is processed, the queries are executed, and the
server renders those pages to the user. We know that a database transaction is costly, which, when called each
time, would bring down the website's performance. The server stores a copy of it to render data when requested,
called caching, which will dramatically lower the load time and improve the website's performance.
Now that we know what caching is and its importance, how do we achieve it? If you have a managed WordPress host,
it is usually handled by your hosting provider. In some cases, you'll have to do it manually by a click of a
button. And in other instances, you'll have to verify to keep it enabled. It differs from one hosting provider
to another. If your hosting provider doesn't handle caching at all, then there are many plugins that will help
your website in this regard. However, we recommend
WP Rocket.
5. Why Use a CDN?
CDN stands for Content Delivery Network. CDN is a network of servers that store a static copy of your website in
all their servers and serve the static pages on request, based on proximity. Now, don't confuse yourselves with
the hosting provider server; both are completely different services. At your hosting provider server, all the
processing happens, and pages are generated dynamically, as we saw in the previous section. But in a CDN, a
static copy of unchanging files like CSS, images, and JS are stored. For instance, if your physical server
resides in India, your server renders results faster to a user in India than in the USA because the Indian user
is closer to the server. Now that we have set up a CDN for our website, our content is distributed over the
network of servers. USA-based users are now served from a server closest to his geolocation, hence improving the
performance.
The advantages of using a CDN would be:
-
A decrease in load time since static pages do not have any processing to carry out, making it an excellent
experience for the user.
-
Use of a CDN cuts-down load of your hosting server, too, since it doesn't have to render CSS, JS, and other
files, thereby improving the website's performance.
-
Google has cited that the use of CDN would tend to rank your website higher in search results. We recommend
using StackPath CDN as for your
WordPress website.
6. Optimize Your WordPress Database
Since WordPress web pages are generated dynamically, a lot of users are concurrently querying the
database. Hence, it's essential to keep the database clean. After using WordPress for a significant
period, a lot of data becomes redundant. It could be unused tags, revised posts, etc. I'd recommend
WP-Optimize
plugin, an all-rounder, which can compress your files, clear cache, and maintain the database.
7. Choose Your Plugins Wisely
Plugins are third-party extensions that extend the functionality of your WordPress site. WordPress has a massive
collection of over 56k+ of third-party plugins, and 'WordPress plugin development' is a small market in itself.
So, we can't assure the authenticity of every plugin out there. We indeed ought to keep the number of plugins to
a minimum. But 9-10 better performing plugins are always preferred over 4-5 poorly coded plugins. One way of
testing them would be to run speed tests before and after installation. We should always try to keep plugin
count to a minimum. For most purposes, we have recommended plugins in the previous sections. Other than those,
the following might be helpful.
-
Yoast SEO plugin for SEO
related optimizations is an excellent plugin.
-
Akismet, an anti-spam plugin, protects your
website from spam.
-
Really Simple SSL, to make your site SSL proof.
-
UpdraftPlus, to
back-up and restore either locally or to cloud.
- WPForms, useful contact form plugin.
Sometimes we install plugins for a specific need that overtime becomes obsolete and we no longer need it.
Whenever you uninstall a plugin, it is not uncommon for some files to be left behind. They may be settings
files, logs files, database files, etc. They will eventually build up and eat up your load time. Hence, it's
essential to clean up the plugin bloat periodically. I recommend you to do this manually.
8. Keeping Your Site and Code Up-to-Date
9. General Optimizations for Web Pages
-
We had seen in the CDN section that HTML, JS, and CSS files do not change frequently. You can opt to minify
these files for performance optimization. Minification of files includes removing comments, whitespaces, and
other unnecessary characters.
-
The home page is the main/landing page of your website. And it's important not to load too much information
and instead use excerpts. WordPress gives you an option to show full text or summary of the articles on the
homepage, displaying excerpts is a minimalistic, optimized approach to showcasing article publications.
-
You should limit your post revisions to a minimum. Every time you revise your post, it will create a handful
of junk files. It is always a good practice to keep them to a minimum. You can also set a limit in your
WordPress settings.
-
You should have a default page displayed whenever the server is down, a default 404-error page is displayed.
Now, usually, this page is bulkier than needed. You can instead load your own lighter custom 404 error page,
which also prevents querying the database and hence improving the website's performance.
-
I'm sure some blogs/websites have active and interactive traffic volumes, and some don't. If the comment
section is not required or if it's not busy, you might want to disable it. If the comments section is active,
breaking them into pages would help website performance.
10. Additional Tips for Optimization
Let’s quickly go through some small tweaks to boost the performance of your website further!
-
Disable unused code: The WordPress theme you're using often loads fonts that are never used
in your website, be sure to disable them because they eat up time to load.
-
Turn off pingbacks and trackbacks in your WordPress: since it doesn't much add up to anything
but slower load time.
-
Disable unused modules: WordPress loads the emojis module by default. You should consider
disabling it if it's of no use to you.
- Take out the trash: Keep in mind to empty the trash after deleting anything.
-
Defer loading: If your website uses a lot of images and videos, you should consider deferring
the loading of certain pieces of content.
-
Use an elastic-search engine: an open-source search tool to embed the search bar on your
website.
-
Opt for site monitoring systems: They ensure the constant availability of your website and
whether working as expected or not.
-
Mobile-first approach: Google’s algorithm highly ranks mobile indexing for all websites
starting in 2019. Before 2019 only desktop versions were used for indexing and ranking. Now with a significant
increase in mobile usage, Google indexes mobile versions too. Therefore, it's essential to optimize your
website for mobile responsiveness.