Hey, guys in this article, I will tell you how to improve website performance in WordPress.
WordPress is the most famous site motor on the planet. More than 75 million sites operate on this CMS: blogs, information resources, online stores. And they all need speed. Moreover, the faster your site loads, the better.
Every newbie asks how to improve website performance in WordPress so here I will deeply explain you. Just read this article properly you can understand How can I improve my WordPress website speed?
how to improve website performance in WordPress Top 6 Ways
If you follow the given below tips so you can successfully improve website performance in WordPress.
Why website loading speed is so important
Do you have a slow website loading, but have a great blog and User-Friendly Interface? It’s a shame the client will never know about this.
He will close it before he sees the content. And then search robots will also lower the page in the SERP.
According to Akamai, low website loading speed can spoil the opinion of the company for 35% of users, and 22% of visitors will not return to a page that is not working correctly.
The loading speed also affects the indexing of new pages. A slow site gives content longer, which means that search robots spend more time processing all pages. As a result, new pages will later appear in Google SERPs.
Plus, starting May 2021, Google will rely on Core Web Vitals to rank sites. This set of factors includes three parameters that show the speed of appearance of the most voluminous element of the page, its interactivity, and stability of work.
That is, the search engine will display numerically how convenient it is for the user to work with the site.
How to measure the website loading speed
Special tools will help here:
Let’s take a look at a real example of how Google PageSpeed makes recommendations for speeding up a website, and what parameters are included in Core Web Vitals.
Enter the desired URL on the PageSpeed page, click “Analyze” and select the result for computers. The most important metrics are displayed first:
- First Contentful Paint
- Largest Contentful Paint
- First Input Delay
- Cumulative Layout Shift
First Contentful Paint – First Response Speed. FCP shows how many seconds after a user clicks on a link, the first signs that the site is loading appear on the screen.
If “signs of life” appeared in less than a second, this is an excellent indicator. If nothing happens on the page after three seconds, this is a bad sign. Most likely, the user has already closed the tab.
Largest Contentful Paint – loading speed of main content. LCP shows how quickly the user will see the key information on the page and will be able to assess whether the content meets his request.
Ideal for loading in less than 2.5 seconds. If your page load time is more than four seconds, you could lose a potential customer.
First Input Delay – response time to client action. The FID shows how fast page elements respond when a visitor clicks on them.
A value of fewer than one hundred milliseconds says that for the user, switching to another page or opening an image looks instant. When an element responds to a click after three hundred milliseconds or more, it seems that the site is freezing.
Cumulative Layout Shift is an indicator of page stability. CLS is measured in points and shows how often the user can see the displacement of content or fields on the page when it loads.
For example, you started reading an article, and then suddenly a banner or message pops up above it, and the lines of text move down.
Or you are ready to put the cursor in the search bar, and the navigation menu shifts it, and you unexpectedly open one of the sections.
The less often this happens, the more stable the page is considered. If the value is 0.25 or higher, the page is considered unstable.
The last three parameters – LCP, FID, and CLS – are the foundation of Core Web Vitals. In addition to them, the report contains parameter values that simulate page loading:
- First Contentful Paint
- Speed Index
- Largest Contentful Paint
- Time to Interactive
- Total Blocking Time
- Cumulative Layout Shift.
To examine the meaning of these parameters, switch to the advanced display mode in the service. To do this, click on the icon with stripes to the right of the inscription “Simulate page loading”.
Google will provide recommendations on how you can speed up your website loading, based on the errors it finds. Tips for each resource are individual, but they are not exhaustive, you should not rely only on them.
Standard ways to speed up a WordPress site
Besides PageSpeed Insights and other recommendations, there are universal ways to speed up your WordPress site. If you are experiencing slow page loading, these points are worth checking first.
Server and browser caching
Data can be cached using the browser and server-side. With browser caching, the client won’t go to the server every time to load the page.
After the first visit to the site, data about it will be saved in the computer memory, so that each subsequent download will take less time. We enable browser caching using the Expires header on the server-side.
With server-side caching, plugins generate HTML files that are stored in memory. When the server is accessed again, it does not need to reload the site scripts – they are already assembled into an HTML file.
Popular WordPress caching plugins:
Content Delivery Network (CDN) is a cluster of servers located in different parts of the world and transmitting information about the site from the machine closest to the user.
Due to this, the territorial proximity between the server and the client helps to speed up the loading of the site.
This is a costly way to improve site speed by using your own hardware. It is justified for international companies with clients and distribution in distant countries.
Local blogs and online retailers are better off considering other optimization techniques. International businesses that don’t have big budgets yet can set up a CDN for WP for free using the W3 Total Cache plugin and Cloudflare service.
Optimizing your code
Also, the site will load faster if you place the CSS files at the beginning of the page and the JS files at the end. Then the browser will start processing scripts after it loads the page content.
You can optimize not only the code and page loading but also the content. To do this, use third-party services or plugins for compressing images:
To make things easier for plugins and influence the final result, use JPEG for photos, SVG for icons, PNG for illustrations. The WebP format is also gaining popularity, since with the same quality, it is “lighter” than PNG and JPEG – by 26% and 34%, respectively. This is evidenced by research conducted by Google.
Other plugins that optimize website performance are Clarify, WP-Optimize, Easy & Fast Optimization. They act on the principle of CCleaner, removing duplicate pages and outdated information from databases.
More powerful iron
Poor site performance is not always related to site optimization. An online store or blog may run slower because the hosting does not meet their CPU or RAM needs.
If you got rid of unnecessary plugins and unnecessary queries in the database and did not get the desired result, it makes sense to upgrade to a higher tariff plan or to another type of hosting. HOSTiQ offers virtual, cloud, VPS, and shared hosting for various purposes.
Usually forgotten ways to speed up your website
If the hosting is suitable, have tried all of the above methods, and the download speed has not increased – try the methods of speeding up the site, which is not immediately remembered.
Reduce the number of post versions
WordPress saves all versions of posts and drafts that you create. This is a useful feature, but you probably won’t need a post history from the beginning of time.
Limit the number of versions to 3-5 depending on the frequency of updates and possible needs. This can be done through the wp-config.php file. Enter the line in it: define (‘WP_POST_REVISIONS’, 7) . Where 7 is the number of post versions.
If you do not need to store versions, disable this feature with the parameter false: define (‘WP_POST_REVISIONS’, false).
The more comments under the post, the more interesting the topic, the more popular the resource. The abundance of comments increases the image and slows down the speed of the site.
To prevent communication with users and between users from overloading the site, divide comments into pages:
on the left in the control panel, select the “Settings” menu;
in the settings, click “Discussion” – “Other comment settings”;
put a tick in the box “Split top-level comments into pages” and enter how many comments you want to see on one page.
This trick works well with reviews: visitors see the most recent ones and can navigate to another page to read older ones.
Configure hotlinking protection
A hotlink is a direct link to files from your website hosted on a third-party resource. We will not touch on the ethical issue of hotlinking, since we are interested in another side effect of this phenomenon – slowing down the speed of your site.
When a third-party site is loaded that contains a link to your pictures or videos, it contacts your hosting server for that content. This creates a burden that wastes resources and brings no benefits.
One way to prevent hotlinking is to set up rules in the CDN. The second way is to use plugins for WP:
- All in One WP Security and Firewall
- Secure Copy Content Protection
- WP Content Copy Protection & No Right Click
Disallow indexing for unwanted bots
Getting into the index of a search engine is the cherished goal of any site. But the more pages the search robots need to process, the more load they create on the server.
In order not to fall out of the issue of the system you need and at the same time not to overload the site, prohibit indexing to unnecessary sites.
For example, let’s say you want your site to appear in Google SERPs, but you don’t need any queries from Yahoo. Then in the robots.txt or .htaccess file, you need to prohibit indexing for unwanted bots.
If your site is under construction or under redesign and you don’t need to be indexed at all, make it “invisible”. Select “Reading” – “Visibility for search engines” in the settings and check the box “Ask search engines not to index the site”. This will close the site from all search robots.
Must Read: How Keyword Research is Done
Use the latest version of PHP
The site’s performance is affected more by the code itself than by the version of the language in which it is written.
Nevertheless, starting with the seventh version of PHP and higher, the OPcache function is provided, which gives an increase in site performance. Therefore, it is better to write optimized and structured code using the latest version of PHP.
Go to HTTP / 2
The HTTP / 2 protocol is built-in binary rather than text format and creates less bandwidth when transferring files. This makes an HTTP / 2 site faster than an HTTP / 1 site.
It is worth considering that HTTP / 2 is suitable for sites with SSL / TLS and is not suitable for resources where work is done with large files, video, and audio streams. In addition, the use of HTTP / 2 will slow down the loading of the site over the mobile Internet.
I hope you understand how to improve website performance in WordPress.