Speed is a game changer with SEO and winning clients. It is absolutely important to speed up your website in mobile and desktop devices. To get the speed we have to go to the old school basics of html.
With wordpress you have to strip everything out and eliminate the bloat, which is slowing down your website. After tinkling around for years, i will give you some important tips to speed up your website loaded with wordpress. For heavy traffic sites, these bare bone tips will work like a charm. For speed you have to sacrifice a lot.
In my experience, these speed techniques i used, dramatically boosted the speed of my site from 6s to 2.8s in my dedicated server running Centos.
Speed Benefits
- Low bounce rate
- User experience
- Conversions from leads
- Beat the competition
- Speed is a ranking factor in Google
What causes slow speeds?
- Heavy plugins and themes
- Server hardware and software
- Outdated themes and plugins
- Site errors from Php and Apache
- Denial of service attacks or brute force
- Redirects are slow
How to Speed up?
- Use a lightweight wordpress theme (eg. Coblocks etc, Twenty twenty etc..)
- Disable and delete heavy wordpress plugins (wordfence, seo tools etc). Get rid off unwanted ones. Keep it simple (less than 10 plugins is great)
- Optimize images before you upload (I use https://tinyjpg.com/) or WP smush.
- Do not use page builders (eg. Elementor, WP bakery). These are heavy and once you use them you cannot get rid of their code in your pages.
- Use CDN services such as cloudflare etc. This greatly speeds up for regional users.
- Use browser leverage caching.
- Use Caching plugin such as Fastest cache with Autoptimize and Asset class Page speed booster.
- Look for website errors in Apache error logs. Any errors or warnings could slowdown your website.
- Upgrade to latest PHP version
- Increase the memory of PHP in php.ini to atleast 250M
- Use lazy load (look in autoptimize) to defer loading of heavy images.
- Block access to unwanted ports (FTP etc)
- WordPress: Disable pings, comments and set blog type to summary, set login attempts to 3
- Get rid of useless google fonts, smileys
How to Test?
First use tools such as
- Google speed insights
- GT metrix
- Pingdom
Look for these measurements
- First Contentful Paint (FCP)
- First Input Delay (FID)
- Largest Contentful Paint (LCP)
- Cumulative Layout Shift (CLS)
The three important metrics to analyze the speed of website. Take a look at the time factor.
- Largest Contentful Paint (LCP): measures loading performance. To provide a good user experience, LCP should occur within 2.5 seconds of when the page first starts loading.
- First Input Delay (FID): measures interactivity. To provide a good user experience, pages should have a FID of less than 100 milliseconds.
- Cumulative Layout Shift (CLS): measures visual stability. To provide a good user experience, pages should maintain a CLS of less than 0.1.
Keep an eye on
- Total Page Size – Less than 500kb
- Total Page Requests – Less than 20
- Fully Loaded Time – Less than 2s
How to improve?
- Eliminate render-blocking resources
- Remove unused JavaScript
- Reduce initial server response time
- Ensure text remains visible during webfont load
- Reduce the impact of third-party code
- Image elements do not have explicit width and height
- Minimize main-thread work
- Reduce JavaScript execution time
- Avoid chaining critical requests
- Keep request counts low and transfer sizes small
- Largest Contentful Paint element
- Avoid large layout shifts
- Avoid long main-thread tasks
Good luck!