If 10,000 people visit your website every month but only 50 contact you, buying more traffic can simply mean paying to send more people into the same broken funnel.
Conversion rate optimization, or CRO, starts somewhere else.
Find the points where visitors hesitate, get confused, lose trust, abandon a form, or simply cannot figure out what to do next.
Fix those points.
A website that turns 1% of visitors into leads and moves to 2% does not need twice the traffic to generate twice the leads. The traffic stays the same. The website gets better at converting.
That is the basic CRO opportunity.
No CRO change can guarantee that your leads will double. Results depend on traffic quality, offer, pricing, audience, industry, brand trust, and the existing conversion rate. But when a website has obvious conversion problems, fixing several of them can drive big gains without increasing the ad budget.
Here are five CRO fixes worth checking first.
Why More Traffic Is Not Always the Answer
Most businesses look at a traffic report and ask one question:
How do we get more visitors?
That is useful, but incomplete.
A better question is:
What happens after visitors arrive?
Imagine a local service website gets 5,000 monthly visitors and generates 50 qualified inquiries. That is a 1% visitor-to-lead rate.
If traffic increases to 10,000 visitors but the conversion rate stays at 1%, the business gets about 100 inquiries.
But if the website improves from 1% to 2% while traffic stays at 5,000, the business also gets about 100 inquiries.
That is why CRO matters.
You are improving the output from traffic you already paid for through SEO, Google Ads, social media, referrals, email, or content.
The first job is not redesigning the entire website.
The first job is finding where potential customers disappear.
Find Where Leads Disappear
Start with actual behavior.
Look at:
Landing pages
Contact form starts
Contact form submissions
Phone clicks
Email clicks
Booking starts
Booking completions
Add-to-cart events
Checkout starts
Purchases
Mobile versus desktop performance
Traffic source
Device type
Page-level conversion rates
Google Analytics currently uses key events to identify important actions for a business. A lead form submission can be tracked as a key event, allowing you to analyze the paths users take before completing the form.
This matters because pageviews alone tell you very little.
A page can receive 20,000 visitors and generate almost nothing.
Another page can receive 2,000 visitors and produce 80 qualified leads.
The second page may be the better business asset.
Measure the action that actually creates value.
Fix #1: Make the Primary CTA Impossible to Miss
Your visitor should never have to ask:
“What am I supposed to do here?”
This happens constantly.
A service page might have a large hero image, a headline, three paragraphs of company history, several navigation links, social icons, four different buttons, and finally a tiny “Contact Us” link.
The website technically has a CTA.
The visitor still has no clear path.
Your primary CTA should tell people what happens next.
Weak:
Submit
Better:
Request a Free Quote
Weak:
Learn More
Better:
See How We Can Improve Your Website
Weak:
Contact
Better:
Book a 15-Minute Consultation
The exact wording depends on the business.
The principle is simple.
Make the next action obvious.
One Page, One Main Action
This does not mean every page needs only one button.
It means every important page should have a clear primary conversion goal.
A service page should not compete equally between:
Read our blog
Follow us
Meet the team
View our history
Download our brochure
Contact sales
Subscribe
Book a call
Too many equal choices create friction.
For a lead-generation page, decide what matters most.
Maybe it is:
Request a Quote
Then make that action visually obvious.
Place it where users naturally look:
Near the top
After the main value proposition
Near important proof
Near pricing or service details
At the end of the page
On mobile where appropriate
Do not rely on the navigation menu to carry your conversions.
Your visitor should be able to understand the next step without hunting.
Fix #2: Remove Friction From Your Forms
Forms are where many websites lose leads.
A visitor can be interested.
They can trust the business.
They can like the offer.
Then they see this:
Name
First Name
Last Name
Company
Job Title
Address
City
State
ZIP
Phone
Email
Website
Budget
How did you hear about us?
Tell us about your project
Upload a file
Subscribe to newsletter
And they leave.
The business may think:
“We need this information.”
The visitor thinks:
“This is too much work.”
Those are very different perspectives.
Baymard’s recent ecommerce research continues to show the relationship between form complexity and usability. Its 2024 research found an average checkout contained 11.3 form fields, while its testing found that the number of fields users must deal with matters more than simply counting checkout steps.
For lead-generation websites, the lesson is not “every form must have three fields.”
The lesson is:
Every field should earn its place.
Ask Only What Sales Actually Needs
Before keeping a field, ask:
Will this information change what happens after submission?
If not, remove it.
If the sales team only needs:
Name
Email
Phone
Project details
Start there.
You can collect additional information later.
A lead who submits four useful fields is better than a potential lead who abandons a twelve-field form.
For ecommerce, the same principle applies to checkout.
Baymard’s current checkout research reports that 63% of mobile ecommerce sites and 64% of desktop sites in its 2025 benchmark had mediocre or worse checkout UX. Its research also identifies unnecessary fields, unclear requirements, poor error handling, and other interaction problems as recurring issues.
Make Form Errors Easy to Fix
A form should not simply say:
“There was an error.”
Which field?
What went wrong?
What should the visitor enter?
W3C’s WCAG guidance says automatically detected input errors should identify the field and describe the error in text.
Good:
Email: Please enter a valid email address.
Bad:
Invalid submission.
Good error handling reduces confusion.
It also helps accessibility.
W3C recommends properly labeling form controls so users and assistive technologies can understand what each control is for.
That is not just an accessibility concern.
Clear forms are easier for everyone to use.
Fix #3: Rewrite the Above-the-Fold Message Around the Customer
Your homepage may look beautiful.
That does not mean it communicates value.
One of the most common CRO problems is writing about the company instead of the customer.
Example:
“We are a full-service digital agency with over 15 years of experience.”
That tells the visitor about you.
Try:
“Get a Faster WordPress Website That Converts More Visitors Into Leads.”
Now the visitor immediately understands the problem you solve.
The first screen should answer three questions quickly:
What do you do?
Who is it for?
Why should I care?
If those answers are unclear, visitors have to work to understand your offer.
Most will not.
Match the Message to Search Intent
Do not send every visitor to the same generic homepage.
Someone searching:
emergency plumber in Miami
has a different intent from someone searching:
commercial plumbing maintenance
Someone searching:
WordPress speed optimization
has different intent from someone searching:
WordPress developer
The landing page should reflect that intent.
If someone searches for WordPress speed optimization and lands on a page that spends the first 600 words discussing general web development, the message is mismatched.
The visitor wanted one thing.
Give them that thing.
This is where SEO and CRO overlap.
Better targeting can bring more relevant visitors.
Better messaging can help those visitors take action.
You do not need more traffic if your existing traffic is landing on the wrong page.
Fix #4: Speed Up the Mobile Experience
This is where technical optimization becomes CRO.
A slow website creates friction before the visitor even sees the offer.
The visitor taps.
The page begins loading.
Nothing useful appears.
They wait.
A script blocks interaction.
An image shifts the page.
The browser freezes.
The visitor leaves.
You lost the lead before your sales copy had a chance.
Do not optimize a website only because a testing tool gives it a number.
Look at the actual problems.
For example:
Huge hero images
Render-blocking CSS
Unused JavaScript
Third-party scripts
Heavy page builders
Excessive plugins
Poor caching
Slow hosting
Font loading problems
Layout shifts
Long main-thread tasks
Slow server response
Unoptimized WooCommerce functionality
A page can have a reasonable desktop score and still feel terrible on a mid-range mobile device.
That is why field data matters. We cover this in detail in our guide on why PageSpeed scores don’t matter as much as most people assume.
The real customer experience matters more than making a test report look pretty.
This is also where root-level WordPress optimization can produce a CRO benefit.
Removing unnecessary scripts, properly minifying CSS and JavaScript, improving caching, optimizing images, reducing plugin overhead, and fixing server-side bottlenecks can reduce friction throughout the funnel.
The goal is not:
“Get 100/100.”
The goal is:
“Make it easier for the customer to complete the action.”
Fix #5: Add Proof Where the Decision Happens
Trust is not something you should hide on an “About Us” page.
Put proof next to the decision.
If the visitor is deciding whether to:
Request a quote
Book a consultation
Buy a product
Start a subscription
Call your business
show relevant proof nearby.
This can include:
Customer reviews
Case studies
Specific results
Before-and-after examples
Client logos
Certifications
Guarantees
Product ratings
Security information
Clear return policies
Relevant testimonials
But do not dump 40 testimonials into one section.
Match proof to the concern.
If you sell expensive website development, show examples of websites you built.
If you sell SEO, show measurable SEO outcomes.
If you sell a medical service, explain credentials and provide appropriate trust information.
If you sell ecommerce products, make shipping, returns, payment, and product information easy to understand.
Proof Should Support the CTA
Imagine a visitor reads:
“Ready to improve your website?”
Then immediately sees:
“Trusted by hundreds of businesses.”
That is better than putting the same statement somewhere near the footer.
Even better is specific proof.
Instead of:
“We deliver amazing results.”
Use:
“Reduced page load time from 6.2s to 1.4s on a lead-generation website.”
Specific evidence is easier to understand.
The same principle applies to ecommerce.
Baymard’s recent payment UX research emphasizes that users need confidence around payment details, total cost, security, and what happens when something goes wrong.
Trust is not decoration.
It removes uncertainty.
Stop Sending Every Visitor to Your Homepage
The homepage is not a universal landing page.
It has too many jobs.
It introduces the company.
It supports navigation.
It explains products or services.
It may target multiple audiences.
It may rank for branded searches.
It may contain company information.
A dedicated landing page has one job.
That makes it easier to optimize.
For example:
/wordpress-speed-optimization/
can focus entirely on WordPress performance.
/hvac-web-design/
can focus entirely on HVAC businesses.
/emergency-plumber/
can focus entirely on emergency plumbing.
The visitor arrives.
The headline matches the search.
The offer is clear.
The proof is relevant.
The CTA is obvious.
That is a much cleaner conversion path.
Build Dedicated Landing Pages
Good landing pages do not need to be complicated.
A strong structure can be:
Problem
What is going wrong?
Outcome
What does the customer want?
Solution
How do you solve it?
Proof
Why should they believe you?
Process
What happens next?
CTA
What should they do?
For example, a WordPress speed page might open with:
Your WordPress Website Is Slow. We Fix the Problems Causing It.
Then explain:
What is slowing the site
What gets optimized
What happens during the audit
What tools are used
What results have been achieved
What the client receives
How to start
That is much stronger than:
“Welcome to our digital agency.”
Fix Broken Contact and Booking Flows
This sounds obvious.
Many businesses still lose leads here.
Test the complete journey yourself.
Do not just test whether the page loads.
Submit the form.
Call the number.
Book the appointment.
Use a phone.
Use Chrome.
Use Safari.
Try a slow connection.
Check the confirmation.
Check the email notification.
Check the CRM.
Check whether the sales team actually receives the lead.
A form that displays “Thank you” but never sends the lead notification is not a functioning conversion system.
Neither is a booking form that works on desktop but fails on mobile.
Neither is a phone number that is visible but not clickable on mobile.
CRO is not only about design.
It is about the entire path from visitor to customer.
Use Analytics Before Changing the Design
Do not redesign a website because you personally dislike the hero section.
That is not CRO.
That is preference.
Start with evidence.
Google Analytics lets you define important actions as key events and analyze how users reach those actions. Google specifically documents lead-generation form submissions as an example of an important key event.
Track things such as:
Page view → CTA click → form start → form submit
For ecommerce:
Product view → add to cart → checkout → purchase
Now you can identify the leak.
Example:
100,000 visitors
↓
12,000 product views
↓
3,000 add to carts
↓
1,000 checkout starts
↓
400 purchases
Do not randomly optimize the homepage.
Look at the biggest problem in the funnel.
If thousands of people add products to carts but only 400 purchase, checkout deserves investigation.
If visitors rarely click the CTA, the problem may be messaging or offer clarity.
If visitors start the form but do not submit, form friction deserves attention.
Measure first.
Then change.
Track Micro-Conversions
Not every visitor is ready to buy immediately.
That does not mean their behavior is useless.
Track meaningful actions such as:
CTA clicks
Phone clicks
Email clicks
Form starts
Form submissions
Pricing-page visits
Booking starts
Downloads
Product views
Add-to-cart
Checkout starts
Video engagement
But do not treat every click as a business conversion.
A visitor scrolling 90% down a page is not the same as someone requesting a quote.
Google Analytics separates important business actions as key events and allows businesses to use those events for reporting and optimization.
Your tracking should reflect the actual business goal.
A/B Testing Without Guessing
Once you identify a problem, test the solution.
Do not change ten things at once and then claim the redesign increased conversions.
You will not know what caused the result.
A cleaner experiment might test:
Version A: “Get a Free Quote”
Version B: “Request Your Project Estimate”
Or:
Version A: Long form
Version B: Short form
Or:
Version A: Generic headline
Version B: Problem-focused headline
The goal is not to make the page prettier.
The goal is to learn what helps users complete the desired action.
For low-traffic websites, formal A/B testing can take a long time to reach useful confidence.
That does not mean you cannot improve the site.
Use multiple evidence sources:
Analytics
Search data
User recordings
Heatmaps
Form abandonment
Customer questions
Sales-team feedback
Support tickets
Direct user feedback
Then make controlled changes.
CRO for Local Service Businesses
Local businesses often have a simple conversion goal:
Get the visitor to call, book, or request a quote.
Do not bury those actions.
A local service page should quickly communicate:
Service
What do you provide?
Location
Where do you provide it?
Availability
When can the customer get help?
Trust
Why should they choose you?
Action
What should they do now?
For example, an HVAC company can build dedicated pages for:
AC repair
AC installation
Heating repair
Emergency service
Commercial HVAC
Each page can target a specific problem and location.
The CTA can then match the intent.
Call for Emergency AC Repair
is stronger than:
Learn More About Our Services
when the visitor is actively searching for emergency repair.
Baymard’s current research places global cart abandonment at around 70%, based on its long-running dataset, and its checkout research identifies significant usability problems across both desktop and mobile ecommerce experiences.
That does not mean every abandoned cart can be recovered.
It means the checkout deserves serious attention.
Look for:
Unexpected costs
Unclear shipping
Forced account creation
Too many fields
Poor mobile layout
Confusing error messages
Weak payment confidence
Slow checkout
Missing product information
Difficult coupon handling
Poor return information
Baymard’s research also shows that reducing unnecessary form fields can improve checkout usability, with its 2024 benchmark finding 11.3 fields on average compared with its finding that many checkouts could function with fewer.
Do not optimize ecommerce checkout by blindly making it shorter.
Optimize the actual work users must perform.
What Not to Change
CRO does not mean changing everything.
Do not remove useful information simply because you want a shorter page.
Do not hide important pricing information to force users into a sales call.
Do not add fake urgency.
Do not add popups every five seconds.
Do not make the CTA visually aggressive.
Do not remove navigation when users genuinely need it.
Do not sacrifice accessibility for aesthetics.
Do not remove product details because someone told you “short pages convert better.”
Do not assume a competitor’s layout will work for your audience.
And do not chase a higher conversion percentage while lead quality collapses.
If your conversion rate rises from 2% to 4% but half the new leads are useless, the business may not have improved.
Measure qualified leads, not just raw submissions.
How to Prioritize CRO Work
You do not need a six-month CRO project to find useful improvements.
Start with the biggest leaks.
Use a simple framework:
Impact
How many users experience the problem?
Severity
How badly does it affect their ability to convert?
Confidence
Do you have evidence that this is actually happening?
Effort
How difficult is the fix?
A broken mobile form can affect a huge percentage of visitors and may be relatively easy to fix.
That should probably be investigated before changing the color of a button.
A 3% difference in button color is not more important than a form that fails.
Technical problems come first.
Conversion clarity comes next.
Visual polish comes after that.
30-Day CRO Plan
You can structure the first month like this.
Week 1: Measure
Set up or audit analytics.
Define key events.
Track leads, phone clicks, form submissions, bookings, add-to-cart, checkout, and purchases where relevant.
Identify the highest-value pages.
Week 2: Remove Friction
Test forms.
Test mobile.
Test contact flows.
Test booking.
Test checkout.
Fix broken links.
Fix confusing errors.
Remove unnecessary fields.
Week 3: Improve Messaging
Rewrite weak headlines.
Clarify offers.
Strengthen CTAs.
Add relevant proof.
Create dedicated landing pages for important search intent.
That is how you turn CRO from opinion into a process.
Conclusion
You do not always need more traffic.
Sometimes you need to stop wasting the traffic you already have.
Start with the five areas that create the most obvious friction:
Make the CTA clear.
Reduce form friction.
Make the message about the customer’s problem.
Improve mobile performance.
Put proof next to the decision.
Then measure what happens.
A website generating 50 leads from 5,000 visitors has a different problem from a website generating 500 leads from 50,000 visitors.
Traffic tells you how many people arrived.
CRO tells you what happened after they arrived.
That distinction matters.
For WordPress websites, CRO often overlaps with development, technical SEO, UX, and performance optimization. A slow script, broken form, bloated plugin stack, poor mobile layout, or weak landing-page structure can all become conversion problems.
If your website has performance issues contributing to lead loss, our WordPress speed optimization services are designed to remove that friction at the root level.
The strongest CRO work does not begin with:
“Let’s redesign the website.”
It begins with:
“Where are potential customers getting stuck?”
Find that point.
Fix it.
Measure the result.
Then move to the next bottleneck.
Traffic tells you how many people arrived. CRO tells you what happened after they arrived. That distinction matters. If you want help identifying exactly where your potential customers are getting stuck, book a free call and we will walk through your funnel together.
FAQs
Can CRO really double website leads?
It can happen, but there is no universal guarantee. A website with serious conversion problems has more room for improvement than one that is already highly optimized. Doubling leads can also come from several smaller improvements working together rather than one dramatic change.
What should I optimize first?
Start with the biggest measurable bottleneck. Check forms, CTAs, mobile performance, landing-page messaging, booking flows, and checkout. Use analytics to identify where users are dropping out before changing the design.
How many fields should a lead-generation form have?
There is no universal number. Keep the fields required to qualify and process the lead, then remove anything that does not provide enough business value to justify the extra friction. Ecommerce research from Baymard shows that unnecessary form fields can significantly increase interaction effort.
Does website speed affect conversion rate?
Speed can affect the user experience and therefore can affect conversion behavior. Core Web Vitals measure loading, responsiveness, and visual stability through LCP, INP, and CLS. The practical goal should not be chasing a perfect laboratory score. The goal is making important pages fast and responsive for real users.
What should I track for CRO?
Track actions connected to business value. For lead generation, this can include form submissions, phone clicks, booking completions, and qualified leads. For ecommerce, track product views, add-to-cart, checkout starts, purchases, and revenue. Google Analytics supports defining important user actions as key events so you can analyze those behaviors across your traffic sources.
Your website may have beautiful design, strong branding, good services, persuasive copy, and clear calls to action. None of that matters much if potential customer taps your Google result on phone, waits, watches blank screen, tries to scroll, and leaves before page becomes usable. Mobile speed is not only technical SEO problem. It is lead generation problem. When page loads slowly, every form submission, phone call, booking, quote request, product purchase, and consultation opportunity sits behind unnecessary friction. That is exactly what our WordPress speed optimization services are designed to remove.
Google’s current web guidance treats Core Web Vitals as important user-experience measurements covering loading performance, responsiveness, and visual stability. Google also continues to treat INP as a Core Web Vital, replacing FID. But numbers only tell part story. Business owner does not lose lead because LCP number is 4.8 seconds. Business loses lead because person wanted answer now and website made them wait. That distinction matters when optimizing a real business website. You are not optimizing numbers for their own sake. You are reducing friction between customer intent and customer action.
Think about it like physical store. Customer walks through door and asks employee, “Can you help me?” Employee stares at them for five seconds before responding. Then every time customer touches product, employee freezes. Then checkout counter jumps sideways while customer reaches for wallet. Would customer trust store? Probably not. Slow website creates similar experience, except visitor can leave with one thumb tap and visit competitor.
Mobile Speed Is Now a Lead Generation Problem
Many businesses still treat website speed as something developers worry about after design is complete. Marketing team handles leads. Designer handles appearance. SEO person handles rankings. Developer handles speed. Problem: these things are connected.
Suppose local roofing company gets 1,000 monthly mobile visitors. Website receives traffic from Google, Facebook, paid ads, referrals, and Google Maps. Homepage loads slowly. Service pages contain huge images. Contact form loads several scripts. Phone button is buried below large hero section. User clicks “Get Free Estimate,” but JavaScript takes time to respond. Some visitors leave. Others never reach form. Business may blame ads, seasonality, weak offer, or poor traffic quality. Actual problem sits inside website experience.
Google’s older mobile-performance research found strong relationship between slower mobile experiences and user behavior. One Google/ SOASTA analysis reported that mobile pages loading one second faster saw up to 27% higher conversion rates, while bounce rates increased sharply as load time increased. Those figures come from older research, so they should not be treated as universal 2026 conversion benchmarks, but they demonstrate why performance can affect commercial outcomes.
Visitors Do Not Care Why Website Is Slow
Visitors do not know the website uses Elementor. Visitor does not know hosting company. Visitor does not know 47 plugins are active. Visitor does not know marketing team installed three tracking systems. Visitor does not know hero video is 8 MB.
Visitor sees one thing:
Website is slow.
That is all.
And visitor has options.
Google search result contains competitor. Browser back button works instantly. Search engine does not charge visitor for switching websites. There is no reason for user to wait patiently while your homepage negotiates with six third-party servers and downloads massive JavaScript bundle.
This is why speed optimization should begin with customer journey.
Find important pages. Find pages receiving mobile traffic. Find pages generating leads. Test those pages. Fix highest-impact bottlenecks first.
Do not spend three hours optimizing footer icon that contributes nothing to conversion while 2 MB hero image delays main content.
Why Mobile Users Leave Slow Websites
Mobile browsing happens under messy conditions. User may have weak Wi-Fi. User may use cellular connection. User may be commuting. User may have older phone. Browser may have limited resources. Battery may be low. Multiple apps may run in background.
Desktop test from fast office connection tells only small part of story.
Google’s mobile-speed research has repeatedly highlighted relationship between loading time and user behavior. Older Google research found that as mobile load time increased, probability of bounce increased substantially. Again, these are historical studies, not current universal thresholds, but underlying lesson remains useful: waiting creates friction.
Every Extra Delay Creates Friction
Imagine user wants emergency plumber.
They search:
“plumber near me emergency”
They tap result.
Website shows blank hero area.
Three seconds.
Five seconds.
Six seconds.
User goes back.
Next result loads quickly.
Lead gone.
No SEO report tells business owner which exact lead disappeared. Analytics may show landing-page exit. Ads platform may show click without conversion. CRM may show fewer calls. But root cause can sit between click and content.
Same thing happens with forms.
User sees:
Request Free Quote
Taps button.
Nothing happens.
Taps again.
Still nothing.
Then button finally opens modal.
User starts typing.
Keyboard causes layout shift.
Phone field refuses input.
User leaves.
You did not lose lead because offer was bad. You lost lead because interaction was painful.
Core Web Vitals and Lead Generation
Core Web Vitals provide standardized way to measure important parts of user experience. Current Core Web Vitals include LCP, INP, and CLS. Google identifies these as loading performance, responsiveness, and visual stability measurements.
They are not complete website-quality score. Passing Core Web Vitals does not guarantee high conversion rate. Failing them does not automatically mean website cannot generate leads. But poor values can expose technical problems worth fixing.
For lead-generation website, think about metrics through customer actions.
LCP asks: Can visitor see main content quickly?
INP asks: Does website respond quickly when visitor interacts?
CLS asks: Does page stay visually stable while visitor uses it?
These questions map nicely to real-world behavior.
LCP, INP, and CLS Explained
LCP, Largest Contentful Paint, measures when largest content element in viewport becomes rendered. On many pages, that may be hero image, heading, or major content block. If LCP is slow, visitor may stare at incomplete page while browser works.
INP, Interaction to Next Paint, measures responsiveness to user interactions across page. High INP means clicks, taps, typing, menus, filters, or other interactions can feel delayed.
CLS, Cumulative Layout Shift, measures unexpected movement of content. Imagine trying to tap “Book Appointment” and button suddenly moves because image or ad loads above it. You tap wrong thing. That is not theoretical annoyance. It is poor interaction design.
Google’s current documentation confirms INP is now Core Web Vital and replaced FID.
LCP Can Delay First Impression
LCP often becomes biggest visible speed problem on marketing websites.
Large hero image. Background video. Slider. Custom font. CSS blocking render. Slow server. JavaScript-dependent hero section. Any combination can delay main content.
A website may technically start loading quickly while still feeling slow because meaningful content appears late.
Common WordPress LCP Problems
WordPress websites frequently create LCP problems through oversized hero images, background images loaded through CSS, sliders, page-builder markup, excessive CSS, web fonts, delayed image discovery, and slow server response.
Page builder itself is not automatically problem. Elementor, Divi, Gutenberg, Kadence, Bricks, and other systems can produce fast websites when used properly. Problem starts when page contains unnecessary layers.
For example, Hero section contains:
Background image
Overlay
Heading
Animated subtitle
Button animation
Decorative SVG
Video
Slider script
Tracking script
User sees simple headline and button.
Browser sees entire orchestra.
Optimization asks: What does visitor actually need before taking action?
Maybe static optimized image beats video. Maybe heading can render without animation. Maybe unnecessary slider can disappear. Maybe critical CSS can load earlier. Maybe hero image needs proper dimensions and priority.
Do not optimize code blindly. Remove unnecessary work.
INP Can Kill Form and Button Interactions
A page can load quickly and still feel slow.
This happens when JavaScript blocks main thread.
User taps menu. Nothing.
User opens form. Delay.
User clicks calculator. Delay.
User selects product filter. Delay.
User types into field. Browser struggles.
This is where INP becomes relevant.
Large JavaScript bundles, third-party scripts, heavy animations, complex DOM, expensive event handlers, and poorly optimized page-builder code can all contribute to responsiveness problems. web.dev’s current performance guidance specifically provides optimization guidance for INP and identifies responsiveness as core part of web performance.
For lead generation, test actual interactions.
Do not only test homepage loading.
Click:
Menu → Service → CTA → Form → Submit
Watch what happens.
If every step feels delayed, speed problem is also conversion problem.
CLS Makes Website Feel Broken
Layout shift gets ignored because page can technically load fast while still behaving badly.
Imagine visitor lands on page. Heading appears. They start reading. Image loads above content and pushes heading downward. Visitor scrolls. Cookie banner appears. Content shifts again. Chat widget appears. Another element moves.
Now visitor has to visually chase page.
CLS is designed to measure this kind of unexpected movement. Stable layout is especially important for forms, buttons, navigation, and ecommerce controls.
Reserve space for images. Set dimensions. Avoid injecting content above existing content. Manage ads and embeds carefully. Load fonts without creating major layout movement.
Fast but unstable page still feels bad.
Why Mobile Speed Matters More Than Desktop Score
Desktop performance can create false confidence.
A powerful desktop computer connected to fast broadband can hide inefficient website architecture. Mobile hardware and network conditions expose it.
That is why you should inspect mobile performance separately.
Real Users Do Not Browse Like Lighthouse
Lighthouse gives controlled lab measurements. Useful. Necessary. But not same as field data.
Real users have different devices, networks, locations, browsers, CPU speeds, and interaction patterns. Chrome User Experience Report data can provide field information for eligible pages and sites. Google also distinguishes lab testing from real-user measurements in its web performance guidance.
If you want to understand why chasing a perfect Lighthouse number can mislead you, read our breakdown of why PageSpeed scores don’t matter as much as most people think.
Use both.
Lab data helps identify technical opportunities.
Field data tells you what real users experience.
If PageSpeed says 95 but real-user data says important mobile pages struggle, do not celebrate number. Investigate.
If lab score is 62 but field data is healthy, inspect why lab environment differs before rebuilding entire site.
Numbers need context.
The WordPress Problems Making Your Site Slow
WordPress gives business owners huge flexibility. That flexibility can become performance debt.
Website may accumulate plugins over years.
Marketing adds popup plugin.
Designer adds slider.
SEO team adds schema plugin.
Developer adds custom scripts.
Tracking team adds analytics.
Agency adds optimization plugin.
Client adds chatbot.
Nobody removes anything.
Five years later, homepage loads 2 MB of JavaScript before visitor can click button.
Page Builders, Plugins, and JavaScript
Again, page builder is not automatically guilty.
Bad implementation is problem.
You can build fast website with page builder. You can build slow website with plain HTML. Technology choice matters, but architecture and implementation matter more.
Audit actual output.
Check CSS. Check JavaScript. Check DOM size. Check third-party resources. Check network waterfall. Check unused code. Check render-blocking resources. A good starting point is understanding how to properly minify CSS and JavaScript without breaking functionality or creating plugin conflicts.
Ask:
What is browser downloading?
Why is browser downloading it?
Does visitor need it immediately?
Can it load later?
Can it be removed?
Those questions often reveal bigger opportunities than installing another cache plugin.
Images Are Often Biggest Performance Problem
Images can make website beautiful.
They can also make website enormous.
A hero image uploaded directly from camera may be 5 MB. Website displays it at 1,200 pixels. Browser downloads 5 MB anyway unless responsive image strategy handles it properly.
Use modern image formats where appropriate. Resize images. Compress them. Serve responsive dimensions. Avoid loading below-the-fold images immediately. Preload or prioritize only genuinely critical resources.
Do not lazy-load everything.
If hero image is LCP element, lazy-loading it can delay LCP.
Optimization needs context.
Image optimization is not “compress every image and turn on lazy loading.”
It is deliver right image, right size, at right time.
Hosting and Server Response Time Matter
Frontend optimization cannot fix every backend problem.
If server takes too long to generate HTML, browser starts late.
Slow hosting. Poor database queries. Overloaded server. Bad PHP configuration. Unoptimized WooCommerce queries. Excessive plugins. External API calls. Cache misses.
All can contribute.
Time to First Byte, TTFB, is not Core Web Vital, but it influences how quickly browser can begin receiving page content and can affect LCP. web.dev’s current LCP guidance specifically emphasizes looking beyond image optimization and considering TTFB and resource-load delay.
For WordPress site, investigate hosting before blindly blaming frontend.
If server response is slow for cached pages, find the reason.
If uncached dynamic pages are slow, profile backend.
If only logged-in users experience delay, investigate a different caching path.
Third-Party Scripts Can Destroy Performance
Marketing scripts often receive free pass.
Chat widget.
Heatmap.
Analytics.
Ad pixel.
CRM.
Booking system.
Call tracking.
Social feed.
Review widget.
Cookie manager.
Each one sounds small.
Together they can create traffic jam.
Third-party JavaScript can consume network, CPU, and main-thread time. Some scripts also wait for external servers. If external service is slow, your website can feel slow. One practical step many WordPress site owners overlook is setting up cookie-free domains with Cloudflare to reduce request overhead and improve static asset delivery.
Audit third-party scripts.
Ask whether each one produces measurable business value.
If script generates one useful report per month but delays thousands of visitors, question it.
Do not remove analytics blindly. Measure dependencies first.
Why More Speed Plugins Do Not Always Fix Website
This is one of biggest WordPress misconceptions.
Website slow?
Install plugin.
Still slow?
Install another.
Still slow?
Install optimization plugin.
Now three plugins modify same CSS and JavaScript.
Result can become worse.
Caching, minification, delay, lazy loading, database cleanup, image optimization, CDN, and script management all have legitimate uses.
If you are evaluating a tool like NitroPack, understand what it does and does not handle before enabling every setting. But plugin settings can conflict. Some plugins duplicate functionality. Some features break forms or checkout.
Some optimization tools hide symptoms instead of fixing root cause. Speed optimization should be diagnostic. Find bottleneck. Fix bottleneck. Measure. Then move to next bottleneck. Do not turn website into plugin laboratory.
How Slow Website Hurts Local Lead Generation
Local service websites depend heavily on mobile visitors.
Person searching electrician, dentist, lawyer, HVAC company, plumber, roofing contractor, cleaning service, mechanic, restaurant, or clinic often wants answer quickly.
They may search while standing outside. They may need appointment. They may need phone number. They may need directions.
Website should make action easy.
If phone number appears after massive hero animation, problem.
If contact form takes ten seconds, problem.
If location page loads slowly, problem.
If map widget blocks rendering, problem.
If appointment calendar takes forever, problem.
Local lead generation has low patience threshold because user often has immediate need.
A slow website can waste traffic business already paid for through SEO, Google Ads, social media, directories, referrals, or Google Business Profile.
How Slow Website Hurts Ecommerce Conversions
Ecommerce has even more interaction.
Product page.
Gallery.
Variant selector.
Quantity control.
Add to cart.
Cart.
Checkout.
Payment.
Every interaction creates opportunity for latency.
Slow ecommerce website can also create trust problem. If product images jump around, cart takes time to update, checkout freezes, or payment button responds slowly, customer may wonder whether transaction is safe.
Do not test only homepage because homepage is usually not where every lead lands.
Use Google Search Console to identify pages receiving impressions and clicks. Compare those pages with conversion data where analytics setup allows.
Lab Data vs Real User Data
Lab data gives controlled test conditions. Field data gives real-world experience.
Both have value.
Lab tests help developers diagnose.
Field data helps business understand actual visitors.
Core Web Vitals are based on real-user experience when field data is available, while tools such as Lighthouse provide lab measurements. web.dev recommends understanding both forms of measurement rather than treating one test as complete truth.
Also test multiple times.
Caching changes.
Network conditions change.
Third-party resources change.
Server load changes.
One test is snapshot.
Optimization needs trend.
How to Fix Mobile Speed Without Rebuilding Website
Many slow websites do not need complete rebuild.
Start with audit.
Find biggest problems.
If hero image is 4 MB, optimize image.
If server response is slow, investigate hosting and backend.
If 30 scripts load globally, reduce or conditionally load them.
If font files block rendering, improve font strategy.
If page builder generates unnecessary elements, simplify sections.
If plugin adds scripts site-wide but used only one page, restrict loading.
If third-party widget delays page, defer or remove it.
If CSS is huge, identify unused or unnecessary styles.
If JavaScript blocks interaction, reduce execution and break long tasks.
This can produce major gains without changing brand or rebuilding every page.
That is important for established businesses. Rebuild can introduce new bugs, SEO losses, migration issues, content problems, and unnecessary expense.
Optimize first.
Rebuild only when architecture itself prevents reasonable performance.
JavaScript: unnecessary libraries, long tasks, global scripts
Fonts: file count, format, loading strategy
Plugins: redundant or unnecessary plugins
Third parties: chat, analytics, widgets, ads, social embeds
Caching: page cache, browser cache, object cache where appropriate
CDN: static delivery and geographic distribution
Mobile UX: buttons, forms, navigation, readability
Measurement: PageSpeed Insights, Search Console, field data, analytics
Do not blindly check boxes.
Prioritize problems based on business impact.
When Website Needs Full Technical Rebuild
Sometimes optimization reaches limit.
If theme is abandoned, codebase is heavily customized, templates are broken, plugin dependencies are impossible to untangle, backend architecture is obsolete, or site cannot support required functionality without excessive hacks, rebuild may make sense.
But rebuild should solve documented problem.
Do not rebuild because agency says “your website is old.”
Age alone does not make website slow.
A five-year-old optimized website can outperform brand-new bloated website.
Likewise, modern design does not automatically mean good performance.
Before rebuild, document:
Current traffic.
Current rankings.
Current conversions.
Current URLs.
Current Core Web Vitals.
Current integrations.
Current content.
Current backlinks.
Current technical issues.
Then create migration plan.
Protect what works while replacing what does not.
Conclusion
Your website does not need to be perfect to generate leads.
It needs to be fast enough, responsive enough, stable enough, and useful enough that visitor can reach answer and take action without fighting website.
That means stop treating mobile speed as PageSpeed score competition.
A score is a diagnostic signal.
Business outcome is the goal.
Google’s current web guidance continues to emphasize user experience and Core Web Vitals, while web.dev provides ongoing guidance around LCP, INP, CLS, field measurement, and performance optimization. Older Google research also provides useful evidence that mobile performance can influence bounce and conversion behavior, although those historical percentages should not be presented as universal 2026 benchmarks.
For WordPress businesses, biggest gains often come from removing unnecessary work rather than installing another optimization plugin.
Compress right images.
Fix slow server.
Reduce JavaScript.
Control third-party scripts.
Improve LCP.
Fix INP.
Prevent layout shifts.
Make forms respond quickly.
Test real user data.
Then measure leads.
Because final question is not:
“Did PageSpeed score go from 62 to 94?”
Better question:
“Can more visitors reach CTA and complete action without friction?”
That is speed optimization that matters. If you want us to find those friction points for your website, book a free call and we will walk through it together.
FAQs
1. Does mobile speed directly affect Google rankings?
Core Web Vitals are part of Google’s page experience signals, but Google does not say that passing Core Web Vitals guarantees higher rankings. Relevance and many other Search systems matter. Speed should therefore be treated as both user-experience and search consideration, not ranking shortcut.
If you are just getting started, our SEO tips for beginners cover the foundational signals Google uses to rank pages, including how performance fits into the bigger picture.
Google’s current documentation confirms INP is a Core Web Vital and continues to guide page experience.
2. What is a good Core Web Vitals result?
Current Core Web Vitals focus on LCP, INP, and CLS. Google and web.dev provide thresholds and measurement guidance for each metric. Passing all three gives useful signal that page meets Google’s “good” user-experience thresholds, but it does not guarantee good conversion rate or high search rankings.
3. Can WordPress website be fast with Elementor?
Yes. Elementor or another page builder does not automatically make a website slow. Performance depends on page structure, CSS, JavaScript, assets, plugins, hosting, third-party scripts, images, caching, and implementation. A poorly built Elementor page can be slow; a carefully optimized Elementor website can perform well.
4. Should I install more speed plugins if PageSpeed score is low?
No. First identify root cause. Multiple optimization plugins can duplicate features or create conflicts. Audit server response, images, CSS, JavaScript, fonts, third-party scripts, caching, and page architecture before adding another plugin.
5. How can I know if slow website is costing leads?
Connect performance data with analytics and conversion data. Compare mobile conversion rate, form completion, calls, bookings, e-commerce transactions, and landing-page exits against performance measurements. Test important pages before and after optimization. A speed improvement should ultimately be evaluated against user behavior and business outcomes, not PageSpeed score alone.
A PageSpeed score is useful, but it is not a stopwatch for your website. PageSpeed Insights combines Lighthouse lab testing with field information from the Chrome User Experience Report when sufficient real-user data is available. Google describes the PageSpeed Insights API as providing both Lighthouse lab data and real-world data, which is one reason you should look beyond the large score displayed at the top of the report.
The distinction matters because a performance score is produced from several measurements under a controlled test. It is not simply saying, “A visitor opened this website and it took X seconds to load.” Your actual visitors may be using an older Android phone, a slower mobile connection, a different browser configuration, or a network route that behaves very differently from the test environment.
Think of the score as a diagnostic dashboard rather than the destination. A 92 tells you that the page performed well under that particular test configuration. It does not tell you that every visitor will see the page quickly, that every interaction will respond immediately, or that your WordPress backend is healthy.
This is especially important for WordPress sites because the visible page is only the final result of many moving parts. Your hosting server, PHP execution, database queries, theme, plugins, CSS, JavaScript, images, fonts, CDN and third-party services can all influence the experience.
Lab Data vs Real User Data
Lab data is generated by Lighthouse in a controlled environment. It is extremely useful for finding opportunities because the conditions are repeatable. If you change your homepage and run the test again, you have a reasonable way to compare the before and after results.
Field data comes from actual users. It reflects real devices, networks and browsing conditions. Core Web Vitals are designed around real-world user experience, and Google uses the 75th percentile when evaluating whether the recommended thresholds are being met.
That creates a serious situation: you can have an excellent Lighthouse result while some of your visitors still have a poor experience.
Why the Two Results Can Look Completely Different
Imagine you test your WordPress website from a powerful desktop computer on a fast connection. The page may appear almost instantly. Now imagine a visitor opens the same page on a mid-range phone using a congested mobile network.
The HTML may arrive later. JavaScript may take longer to execute. A large hero image may take longer to decode. A cookie banner or marketing script may compete for the browser’s main thread.
The visitor experiences all of that. The 92 score does not magically remove those delays.
Why a High PageSpeed Score Can Still Feel Slow
The biggest mistake I see website owners make with performance testing is treating the score as the user experience itself. A page can score 90 or above and still have an obvious delay between the first visible part of the page and the rest of the content.
For example, the header might appear quickly while the main hero section takes another second or two to become useful. From the browser’s perspective, something has already been painted. From the user’s perspective, however, the website may still feel like it is loading.
This is where Largest Contentful Paint, or LCP, becomes much more useful than simply looking at the score. LCP attempts to identify when the largest visible image, text block or video has rendered, making it a better representation of when the main content becomes available. Google currently recommends an LCP of 2.5 seconds or less at the 75th percentile for a good experience.
There is another issue: a page can load visually and still feel sluggish when you try to use it. Clicking a menu, opening a popup, submitting a form or interacting with a slider can trigger JavaScript work. If the browser’s main thread is busy, the interface may hesitate.
That is why WordPress website speed should be evaluated as a complete experience rather than a single number.
Understanding Core Web Vitals
Core Web Vitals focus on three major parts of the experience: loading, responsiveness and visual stability. The current metrics are LCP, INP and CLS. Google recommends evaluating them at the 75th percentile rather than relying on one isolated test run.
LCP, INP and CLS in Plain English
LCP measures loading. It answers a practical question: when does the main content become visible? (LCP is related to but distinct from First Contentful Paint, which measures when any content first appears.) If your hero image is the largest element in the viewport, that image can become the LCP element. A slow server, poorly prioritized image, render-blocking resources or excessive client-side work can all push LCP later.
INP measures responsiveness. It is concerned with how quickly the page responds to user interactions. A website can look completely loaded and still have poor responsiveness because JavaScript is consuming too much main-thread time. Google currently considers an INP of 200 milliseconds or less a good result.
CLS measures visual stability. If content jumps while the visitor is reading or trying to click something, that is a layout shift. Images without reserved dimensions, dynamically inserted banners, advertising elements and some third-party embeds can contribute to the problem. A CLS of 0.1 or less is the current good threshold.
These metrics describe different problems. A page might have excellent CLS but terrible LCP. Another might load quickly but become unresponsive when several scripts execute. Looking at all three gives you a much better picture of WordPress performance.
TTFB and the WordPress Server
Time to First Byte, commonly called TTFB, measures how long it takes before the browser receives the first byte of the response. It is not the entire loading time, but it can establish a slow starting point for everything that happens afterward.
If your server takes 1.5 seconds to produce the initial response, the browser cannot display the HTML that it has not received yet. You can optimize CSS and compress images afterward, but you have already lost valuable time.
On WordPress, TTFB can be affected by hosting resources, PHP execution, database queries, uncached requests, plugins, theme logic, external requests and server configuration. Full-page caching can make a dramatic difference for cacheable pages, but caching should not be treated as a substitute for diagnosing the underlying site — see our full breakdown on how to reduce TTFB for the diagnostic steps.
When investigating a slow WordPress website, I would not immediately start deleting plugins. First, I want to know whether the delay happens before the HTML arrives or after the browser receives it. That single distinction can save a lot of unnecessary optimization work.
Render-Blocking CSS and JavaScript
A browser cannot simply display everything as soon as it receives the HTML. It has to process resources, build the page structure, calculate styles and execute JavaScript.
Render-blocking CSS can delay the point at which the browser is ready to paint the page. JavaScript can create another problem by occupying the main thread while the browser is trying to render and respond to interactions.
This is why WordPress optimization plugins often provide options for delaying JavaScript, removing unused CSS or generating critical CSS. Those features can help; we cover the settings that actually move the needle in our guide to reducing total blocking time, but they need to be configured carefully.
One mistake I see often is enabling every optimization option at once and assuming more optimization must equal better performance. It does not. A script that is delayed incorrectly can break a navigation menu, form, checkout flow or interactive component.
The better approach is to identify which files are actually contributing to the problem. Look at the waterfall, inspect long tasks and determine what is needed during the initial render. Then make targeted changes and test again.
Large Images and Hero Sections
Images are one of the easiest ways to create a misleading performance problem. A homepage may have excellent caching and optimized CSS, yet still feel slow because the most important image is several megabytes or is being delivered at a much larger size than the visitor needs.
The hero section deserves special attention because it is often above the fold and frequently becomes the LCP element. If that image is requested late, lazy-loaded when it should not be, served at an excessive resolution or blocked behind unnecessary JavaScript, your LCP can suffer.
WordPress image optimization is not simply about reducing file size. You also need to consider dimensions, format, compression, responsive image delivery, loading priority and whether the image is actually necessary.
For example, a 2400-pixel-wide image displayed at 700 pixels wide on a phone is doing unnecessary work. The browser has to download more data than the visitor needs.
Third-Party Scripts Can Change the Experience
Analytics, advertising, chat widgets, heatmaps, social embeds, tracking platforms and marketing automation tools can all add JavaScript to a page.
The problem is not that third-party scripts are automatically bad. The problem is that every additional service has a performance cost somewhere. Some scripts download resources, some execute JavaScript, some create network connections and some modify the page after it has already started rendering.
A website can therefore have a good WordPress setup and still feel slower because of what has been added around it.
I usually look at third-party requests when a page looks optimized on paper but behaves differently in the browser. If removing or delaying one external script suddenly changes the loading timeline, you have useful evidence about the actual bottleneck.
The answer is not always “remove the script.” Sometimes it is better to load it later, restrict it to pages where it is needed, or replace it with a lighter implementation.
Why Mobile and Desktop Scores Differ
It is normal for mobile PageSpeed performance to be worse than desktop performance. A desktop computer generally has more processing power and a more capable network environment than a typical mobile device.
Google’s Core Web Vitals thresholds are not different for mobile and desktop, but the practical difficulty of meeting those thresholds can differ because mobile devices and networks are more constrained.
This is why I would never optimize a WordPress website by looking only at the desktop report.
A desktop score of 98 can look impressive while the mobile experience remains frustrating. If most of your visitors arrive from phones, the mobile report is much closer to the problem you actually need to solve.
When Should You Actually Worry About Your PageSpeed Score?
Do not panic because your score is 78, and do not relax simply because it is 94.
The score becomes useful when it helps you identify a meaningful performance problem. If your real users have poor Core Web Vitals, your pages take too long to become useful, interactions are delayed, or important content appears late, you have a problem even if the score looks respectable.
Likewise, if your site has a score in the 90s and users are genuinely having a fast experience, spending hours trying to push the number to 100 may provide very little practical value.
The thresholds are more meaningful than the obsession with the final score. For Core Web Vitals, Google currently identifies good results as LCP up to 2.5 seconds, INP up to 200 milliseconds and CLS up to 0.1.
What I Check When a WordPress Website Scores Well but Still Feels Slow
When a site scores well but feels slow, I start by reproducing the problem in an actual browser. I want to see what the visitor sees, not just what the Lighthouse report says.
Then I look at the Network panel in Chrome DevTools; this is one of several tools we rely on, alongside the others in our WordPress performance audit toolkit. The waterfall can reveal whether the delay comes from the initial HTML request, CSS, JavaScript, fonts, images or third-party resources.
Next, I inspect the Performance panel. Long JavaScript tasks can explain why a page looks loaded but does not respond immediately.
I also compare the homepage with other templates. If posts are fast but the homepage is slow, that usually points toward page-specific content, a builder section, hero media, widgets, forms, sliders or scripts that are only loaded there.
Finally, I compare desktop and mobile behavior and look at real-user data when it is available. The goal is not to collect a bigger score. The goal is to identify the bottleneck that a visitor is actually experiencing.
A Practical WordPress Speed Diagnosis Process
A useful performance audit should follow a logical sequence rather than jumping between optimization settings.
Start with the server response. Check TTFB and determine whether the page is being served from cache. If you’re choosing a caching plugin, our WordPress cache plugin comparison breaks down which one fits your setup. If the server is slow, front-end tweaks may only hide part of the problem.
Then inspect the rendering path. Find CSS and JavaScript that delay the first useful render. Check whether critical resources are being prioritized correctly and whether unnecessary assets are being loaded on the page.
After that, inspect images and fonts. Look specifically at the LCP element instead of compressing every image on the site without understanding which ones matter.
Next, review third-party scripts. Identify external domains, tracking scripts, chat tools, advertising systems and embedded services. Ask whether each one needs to load immediately.
Finally, test the page after every meaningful change. Performance optimization is much easier when you know which change produced which result.
This process is particularly important on WordPress because a plugin may not be the problem by itself. A plugin can be perfectly reasonable while its assets are being loaded on pages where they are unnecessary. The solution might be asset management rather than uninstalling the plugin.
Stop Chasing 100 and Start Measuring the Right Things
A perfect PageSpeed score is satisfying. It is also easy to chase because the number gives you an obvious target.
The problem starts when optimization decisions are made solely to improve that number. You can spend hours removing a few milliseconds from a lab test while ignoring a slow server, a massive hero image or a JavaScript-heavy third-party tool that visitors actually notice.
Instead, track Core Web Vitals, TTFB, LCP, responsiveness, visual stability and actual loading behavior. Compare those measurements across important templates and devices.
A useful performance target is not “make PageSpeed say 100.” A better target is “make the important pages consistently fast for real visitors.”
That difference sounds small, but it changes the entire optimization process.
Conclusion
A 90+ PageSpeed score is a good signal, but it is not proof that a WordPress website is fast. PageSpeed Insights is a diagnostic tool, and its lab environment cannot represent every device, connection and interaction experienced by your visitors.
The better approach is to look at the entire loading process. Check TTFB, identify the LCP element, understand JavaScript execution, inspect images, review third-party requests and compare mobile with desktop. When real-user Core Web Vitals data is available, use it because it tells you what visitors are actually experiencing.
At ProSpeedGuy, the useful part of a performance audit is not producing a pretty score. It is finding the reason a page is slow and fixing the bottleneck that matters. If a WordPress site scores well but still feels slow, a technical performance audit can be more valuable than another round of blindly changing PageSpeed settings.
FAQs
Is a 90 PageSpeed score good?
Yes, a 90 or higher is generally a strong Lighthouse performance score, but it does not guarantee that every visitor experiences a fast website. Check Core Web Vitals, TTFB and actual browser behavior alongside the score.
Why is my WordPress website slow when PageSpeed says 90+?
The issue may come from server response time, a slow LCP element, JavaScript execution, third-party scripts, large images or differences between the test environment and your real visitors. A high score does not eliminate these possibilities.
What is a good LCP for WordPress?
Google currently recommends an LCP of 2.5 seconds or less at the 75th percentile for a good user experience.
Is TTFB important for WordPress speed?
Yes. TTFB affects how quickly the browser receives the initial response. Slow hosting, uncached pages, PHP processing, database work and server configuration can all contribute to a high TTFB.
Should I try to get a PageSpeed score of 100?
Not necessarily. Once a website is performing well, chasing the last few points can become counterproductive. Focus on user-facing metrics and bottlenecks that affect real visitors.
Why is my mobile PageSpeed score much lower than desktop?
Mobile devices generally have less processing power and may use slower or less reliable networks. This can make JavaScript execution, image delivery and rendering more difficult, so desktop and mobile results can differ significantly.
How can I find what is actually making my WordPress site slow?
Start with PageSpeed Insights, then reproduce the issue in Chrome DevTools. Check the Network waterfall for server and resource delays, inspect the Performance panel for long tasks, identify the LCP element and review third-party scripts. Combining these tools gives you much more information than the score alone.
If your site feels fast on desktop but still fails performance checks, a Core Web Vitals fix guide is exactly what you need. In 2026, speed is no longer just a technical nice-to-have; it affects user experience, conversions, and how confidently your site can compete in search.
The good news is that most Core Web Vitals problems are fixable. The bad news is that many sites try to fix the wrong things first, like buying a new plugin before checking hosting, images, scripts, or theme bloat. This guide focuses on practical fixes you can actually apply, especially if you run a WordPress site.
What Core Web Vitals Mean
Core Web Vitals are Google’s key page experience metrics. They focus on three things: how fast the main content loads, how stable the page looks while loading, and how quickly users can interact with it.
The three metrics are:
LCP: Largest Contentful Paint
CLS: Cumulative Layout Shift
INP: Interaction to Next Paint
In simple terms, LCP measures loading speed, CLS measures visual stability, and INP measures responsiveness. If one of these is bad, your site may feel slow or frustrating even if the design looks good.
How To Check Your Scores
Before fixing anything, test your site so you know what is actually broken. Use PageSpeed Insights, Lighthouse, and Search Console to see both lab data and real-world field data.
Focus on templates, not just the homepage. A blog post, product page, and landing page can all perform differently, and the weakest template often drags down the whole site.
Fix LCP First
LCP is usually the metric that needs the most attention. If your main content takes too long to appear, users feel the site is slow even if everything else eventually loads.
Start with the biggest causes:
Slow hosting
Heavy hero images
Render-blocking CSS and JavaScript
Too many fonts or third-party scripts
A few strong fixes usually make a big difference:
Compress and resize your main image.
Use WebP or AVIF where possible.
Preload the hero image and critical fonts.
Remove unused scripts from the header.
Use caching and a CDN.
Fix CLS Next
CLS is all about page stability. If things jump around while the page loads, the experience feels sloppy and can hurt trust.
The most common causes are missing image dimensions, ads that inject late, and font swapping. To reduce layout shift, always define image and video sizes, reserve space for embeds and ads, and use font loading settings that prevent text from jumping.
Fix INP For Better Interaction
INP became more important after Google replaced FID, and it measures how quickly the page responds when users click or tap. If your site feels laggy after someone interacts with it, this is the metric to watch.
The biggest causes are heavy JavaScript and too many third-party tools. To improve INP, reduce script weight, delay non-essential tools, break long tasks into smaller chunks, and remove anything that blocks the main thread.
Best WordPress Fixes
If you use WordPress, the fastest wins usually come from simplifying the stack. A lightweight theme, fewer plugins, and better hosting often do more than endless tweaking.
A lot of sites waste time fixing the wrong layer first. For example, changing fonts will not help much if your hosting is slow or your homepage loads too many scripts.
Avoid these mistakes:
Optimizing only the homepage.
Ignoring mobile results.
Keeping unnecessary plugins active.
Adding more scripts while trying to improve speed.
Measuring once and never checking again.
Simple Fix Order
If you want the fastest path to better scores, follow this order:
Improve hosting response time.
Optimize the LCP image.
Remove render-blocking CSS and scripts.
Set image and video dimensions.
Reduce JavaScript and third-party code.
Re-test after each change.
This order works because it tackles the biggest bottlenecks first. Small improvements add up quickly when the page is already bloated.
FAQs
What is the easiest Core Web Vitals fix?
The easiest fixes are usually image compression, resizing images correctly, and removing unnecessary scripts. These changes often improve scores without touching code.
Which Core Web Vital matters most?
All three matter, but LCP is often the most noticeable because it affects how fast the main content appears. If the page looks slow, users usually notice that first.
Do Core Web Vitals affect SEO?
Yes, they can affect SEO because they are part of page experience and influence how users interact with your site. Better performance also usually leads to better engagement.
Can a WordPress theme affect Core Web Vitals?
Yes. Heavy themes can add extra CSS, JavaScript, and layout complexity that slow pages down. Best WordPress themes usually give you a better starting point.
How often should I test my site?
Test whenever you make major changes, and also on a regular schedule. Performance can degrade over time as plugins, media, and third-party tools are added.
Conclusion
Fixing Core Web Vitals is mostly about reducing friction. If you improve hosting, simplify the page, optimize images, and cut unnecessary scripts, your site will usually become faster and more stable without a complete redesign.
The best approach is to fix LCP, CLS, and INP in that order, then keep testing so performance does not slowly slide back. For WordPress sites, a lightweight theme, optimized hosting, and fewer plugins are still the foundation of better results.
In the end if there’s no improvement in your stats? get me here for Core Web Vitals fixes 🙂
130+ performance tips and WordPress Speed Optimization Guide to overcome your WordPress speed addiction.
Are you a speed addict?
Are you worried about poor SEO rankings?
Do you want instant loads for your website, EVEN ON MOBILE?!
Do you want to save money on server costs?
Do you want to bedazzle your clients?
Or are you just some DIY-er looking for new tactics?
Whatever the reason for your addiction, you’ve come to the right place. I’m not going to judge you. Or call you OCD about speed. I’m gonna show you the pro tactics that I cleverly thought up in a time lonnnngggggg before WordPress speed-up was a trend. (I’ll also warn you about dumb ones that only waste time.)
I promise this is the toughest speed-up guide you’ve ever read.
Edits:
AUG 15, 2017 – started writing. Gave up because it was too long.
APR 22, 2020 – finished during Corona downtime.
JUN 3, 2020 – more tips and clarifications.
JUN 24, 2020 – added network firewall, cache prebuild, and form lazy load.
My addiction for faster load times began in 2007, with Joomla (not WordPress).
I had a few successful sites growing out of control. Many plugins were installed, ads, hundreds of comments on many posts (some had thousands). Slow frontend and backend. It was a pain to update as I’m possibly the most impatient person in the world. I couldn’t stand it… I could perceive even 100ms difference in load times.
So what did I do?
I moved to WordPress around 2010. Switched themes like 20 times. Then switched my webhosting 3 times. Then got a VPS plan. Then I got 5 more VPS because the first one sucked. Then I taught myself how to manage servers because I got tired of admins not being available when my site went down.
When I finally got my site stable, then came the theme rebuild. I rebuilt my theme from scratch several times. Also enlisted some developers and coders with much more experience than myself. Then I argued with some of them because I didn’t trust their logic. Sometimes only one of us was right, other times we were both wrong.
Load times improved but my addiction only got worse. The faster things got, the more used to it I became. The moment I broke the mythical 1-sec barrier, it only felt like I reached the bottom of a new mountain to climb. Now I wanted a sub-500ms site!
Every developer working with me argued the same thing,
Why do you want it faster? Your site is already fast!
I knew my site was already faster than others. What I couldn’t understand was why a custom-coded site still needed even half a second to load. Anybody working with me needs to understand they’re dealing with an addict, not a hobbyist. Anyway, I found a developer friend who was every bit as willing to explore with me. He went the code route. I went the server route.
He rewrote our WP_Query from scratch, completely refactored all our CSS. Rebuilt all our custom work to be mobile-first. And when I say from scratch…I mean from scratch. All the CSS/JS optimization you see nowadays, but done by hand. He integrated many of our plugins directly into the theme or rewrote them entirely.
In the meanwhile, I was screwing with servers. I didn’t like servers but I was the more Linux-capable one between us two. So I tested various stacks. Screwed around with configurations. Turning things on and off. Tried different security systems. Lucky for me, the server world was already quite evolved in performance-tuning. With the help of a few senior admins, I was ‘up to speed’ within 1-2 years.
We were way ahead of the times.
I doubled back to WordPress this time. Now as a speed architect alongside my developer friend. We got even more aggressive, inventing many tactics that are either obsolete today or more conveniently-implemented via plugins. It’s amazing how much we accomplished in a time when WordPress and web servers weren’t so user-friendly. Anything we wanted to do, we had to do it manually or invent it ourselves.
Today, it seems all WordPress users want more speed. It’s actually a trend now. Hahaha. It’s not only Johnny “the speed addict” harassing developers. There’s speed tests. And performance plugins like caching, combining, minification, image compression, etc. It seems even the average user is trying to remove bloat and provide the best user experience possible.
Speed optimization is more important than ever now…
While we do have faster internet, websites are more bloated than ever. Themes and plugins keep getting fancier and loaded with more features. The majority of internet visitors are browsing from mobile (with less bandwidth and processing power). Google now considers your speed as a ranking signal. Facebook ads don’t convert as well when your site is slow (users just click “BACK” and keep scrolling). Faster websites also make more money! No surprise, right?
Faster websites make more money, rank better, and improve overall user experience!
Are you a WordPress speed addict (with no life just like me)?
If yes, then you’ve found my black book of speed-up secrets. If you wanted just simple tips, please choose an easier speed optimization guide to follow. This guide will make you break up with your developer and pick fights with your server admin. I want you to learn, but also have fun. I’ve been doing it for many years and come from a much harder time when not so many tools were available.
Everything I share here is EXACTLY what I recommend to all clients. Even the $20k ones. Even the developers and agencies who consulted with me to train them and their team. They all get exactly what I put below. Instead of just bullshit generic advice, I’ve listed many sneaky ones as well. Some of them are extremely technical. If you don’t understand my brief explanation for it…you are probably not at the level to attempt it! Follow what you can but hire if you need. Test carefully.
I’ve gotten many fancy sites – nice graphics, over 1mb size, 100+ requests, to load instantly and well under 500ms. I’m sure you can, too. I will give you almost every WordPress speed-up trick that I know! 😉
Let’s do it!
SPEED OPTIMIZATION RULE #1: Always optimize for HUMAN VISITORS! (not speed tests)
Your webhosting speed determines how fast it can process code, and how many visitors it can handle. Compare your website to a car. To make a car go faster, you either A) get a stronger engine and/or B) lighten the weight. For websites, the web-server is the “engine” and the code is the”weight”.
The goal is to improve our web-server “engine” while decreasing code “weight”, ok?
Changing your webhosting is one of the easiest ways to improve speed. Those of you on cheap $5/month shared webhosting will benefit the most from moving to a managed hosting service or even your own VPS. The difference will be night and day without any site changes. Moving from managed hosting to an optimized VPS or dedicated “bare metal” server will be another night-and-day jump.
The difference isn’t only speed but also a matter of cost (savings). A fast server can handle more visitors than a slow one. If your server can handle double the traffic, theoretically the bill can be twice as cheap. Not a big deal for a small site but what about a huge ecommerce site with a $1k/month server bill? 50% cost reduction sounds mighty attractive!
Obviously, you should pick a server location that’s closest to your visitors. Ideally, you don’t want your DNS ping time more than 100ms from the server to your visitor’s computer. There are many implications depending on your needs.
Local businesses should get a server as close to their visitors as possible. Keep it within 100ms or less, within 50ms is better. Check ping times with WonderNetwork.
The USA is about 80ms from coast to coast. Canada and Mexico are close enough as well.
All of Western Europe is only 40-50ms, very close.
Asia is within 80ms between most countries.
India/Pakistan, Australia/NZ, Africa are somewhat isolated. Local businesses there need a local datacenter. Even Singapore to Australia is borderline “far” by DNS standards (~150ms).
South America can be unreliable infrastructure. For that reason, many companies in Central/South America still use US-based datacenters like in California, Texas, or Florida (Miami). Luckily, Google Cloud opened up a datacenter in Sao Paolo, Brazil. Reliable but pricey.
If you have worldwide traffic (including Asia/Pacific) and no particular core region, I like USA west coast as perfect location for fast traffic to Europe and Asia.
If you have only USA & Europe traffic and no particular core region, I like USA east coast for fast traffic to Europe.
It’s also good to have a webhosting company on the same timezone as your core audience. That way they can (quickly) support or troubleshoot issues when most of your visitors are awake.
Those of you thinking a CDN can make up for far server location (that’s not necessarily true!)
Those of you hunting for dedicated nodes…the best is TIER-4 datacenter with four 9’s (99.9999% uptime guarantee). But good luck getting those guaranteed!
Nearest.host – cool site showing nearby server companies.
2. Choose the right website hosting service (BEG, HIGH)
Shared hosting ($5-30/month) – fine for small sites and low traffic up to 100k hits/month. No access to server configurations. Safe choice is Cloudways, SiteGround, Kinsta, or WP Engine.
VPS/cloud hosting ($30-300/month) – great for medium sites and traffic up to 30 million hits/month. Safe choice is or Gridpane, or try a fully managed VPS service.
Dedicated (bare metal) server ($200/month & up) – great for large sites with TONS of traffic. Safe choice is LiquidWeb.
Buy the best that you can comfortably afford. A small website doesn’t need much power but it’s still noticeable when you get a better server and appreciated more than you think. Think of a new phone that opens apps just a fraction of a second quicker. You really can feel the difference and it improves user experience tremendously.
Shared webhosting is usually slow because they stuff hundreds of customers/websites onto the same server (maximize profits). This increases slowdowns, unexpected crashes or server restarts, security attacks, and your email IP getting marked as spam.
Shared hosting environments are also slow because they load many scripts/modules to maximize compatibility for as many users as possible. And without dedicated resources, your visitors end up waiting in line while the server is busy handling other websites first.
VPS/Dedicated servers are faster because there’s more resources available per account and your resources are serving only your websites. You have more control over your environment, can configure it for your needs. VPS/dedicated can be costly or difficult to manage for regular users. There are cloud-panel services to help manage it and also fully-managed services where they take care of everything for you.
Those unable to handle technical responsibilities of VPS can go for “premium shared hosting” like Coludways Kinsta or WP Engine. They don’t crowd the server as much but the performance (while better than regular shared hosting) will be still be far behind a VPS.
3. Choose a high performance web server (INT-ADV, HIGH)
Use any web server software but Apache. The best is NGINX or LiteSpeed, or highly-optimized Apache (rare to find). The higher your traffic, the more noticeable the difference.
NGINX shines at simple sites. Just set it and go. Not much settings to optimize. But once you have a complicated site, NGINX is a mixed bag. Some NGINX features aren’t easy to configure. If you have a server-admin to fine-tune, it’s great but many people don’t.
LiteSpeed has more easy-accessible features than NGINX. Like when you need some things cached but not others, or dealing with server-level redirects via htaccess. LiteSpeed also has a WordPress cache plugin which NGINX doesn’t. That’s a HUGE advantage. (I personally prefer LiteSpeed.)
OpenLiteSpeed is the free community version of LiteSpeed. It’s a great alternative for those wanting the free price of NGINX but the powerful LiteSpeed cache plugin.
Some webhosts have the Apache+NGINX hybrid stack. I feel those are outdated now and makes for unnecessarily slower/heavier stack.
If using Apache, MPM events is best (compared to worker or prefork).
Keep your webserver updated. Later versions can speed up certain protocols and processes noticeably.
4. Web server configuration (ADV, MED-HIGH)
Most web servers come with safe/functional configurations right off the bat. Adequate for the average small site with little traffic. It’s when you get more traffic and more security attacks, or have more demanding apps that fine-tuning the configurations makes a big difference.
Timeout – 30 to 60 seconds is a safe start. You can increase up to 600 or beyond if needed for long processes (import, export, backups). Keep in mind that allows poorly-coded processes or hack exploits to run out your server resources.
# of child processes allowed – depends on the server environment. Default should be fine.
Concurrent connections allowed – anywhere from 1-20k. Higher is not necessarily better!
Keep alive – on, off, or LiteSpeed’s “smart keep-alive”. I think “on” is safer. If you have LiteSpeed, the smart keep-alive is awesome!
Keep alive timeout – 3-5 seconds is a safe start. Increase if needed.
How many threads, body/buffer size, workers, clients, etc….all that you can look up online. It depends on your server size and use scenario. Jump on forums and ask around or have a sys-admin configure for you. Keep in mind different admins have their own ways of configuring.
The most important distinction for me is to decide whether this server should be set aggressive or conservative:
AGGRESSIVE configuration – gives every site as much resources as possible. Good for low-tenant or dedicated servers.
CONSERVATIVE configuration – gives every site as little resources as possible. Good for high-tenant or shared servers.
5. Disable unused services (INT, HIGH)
Many servers are automatically set up with all features running to make things easy for you. But they’re just like brand new computers with pre-installed software. Get rid of the ones you don’t use. Even if they don’t use much memory, they can still be bombarded by hackers and that eats resources.
DNS – disable if you’re using external DNS service. (Cloudflare, DNSME, etc.)
Email – disable if you’re using 3rd-party email. (G-Suite, MXroute, etc.)
FTP/SFTP – disable if not using.
Memcache/Redis – disable if you don’t use it.
Other services – Varnish, Elastipress, etc.
If you want to be OCD, scan your system for all listening ports and services.
6. Remove unused server modules (ADV, LOW)
Want to be even more OCD? Disable every single module not used by the server. Some of them are junk unused server stuff; others are unused Linux distro stuff. Old school Apache-compatible stacks or unoptimized control panels tend to have many unused modules enabled by default (while also not enabling ones you might need).
Read documentation and check online before blindly removing or replacing them. The danger is you disable things you need (or worse, one that improves performance). You should make a list of disabled services/modules to reference later or give to a contractor when troubleshooting.
7. Use the latest PHP version (INT-ADV, HIGH)
The PHP version alone makes a HUGE difference.
Use the latest PHP version possible! (Easily-configured from your webhosting control panel.)
For example, PHP 7.0 is 3 times faster than PHP 5.6.
Even PHP 7.3 is 10% faster than PHP 7.2.
At the time of this writing, PHP 7.4 is available.
Be wary of any webhosts still using old PHP!
Keeping your website PHP version updated is not only for speed but also security. The only issue is some themes or plugins may not be compatible with the latest PHP version. You’ll know because your site doesn’t work right, or looks weird. So test carefully and keep themes/plugins updated, which helps them stay compatible with the latest PHP.
8. Recommended php.ini configurations (INT, MED):
Most of you (on shared hosting) won’t even have access to these settings or know how to set them. But nonetheless, here are my recommendations.
max_execution_time – lower (30-60 sec) is better to prevent resources hogs from lagging out the server. But you may need higher execution times for long processes like imports, exports, backups.
max_input_time – lower (60 sec) is better. Increase only if you’re trying to import something that takes forever.
max_input_vars – set to “1000”, unless some plugins need higher.
memory_limit – try “256M” to be safe. Raise if you have heavy plugins. I like to set lower so I’m notified immediately when there are memory hogs. The “error_log” will tell you if you need more.
zlib.output_compression – may or may not help. I leave it off.
9. Use an updated MySQL fork version (INT-ADV, LOW)
Most people only know of MySQL, which is now acquired/owned by Oracle. There’s also MariaDB (a fork of MySQL by its original creators) and Percona, and also others.
MySQL 8 is much better than MySQL 5.7.
But it’s better if you can use MariaDB over MySQL. Community-friendly and better performance than vanilla MySQL 5.7.
Use the latest MariaDB version that you can.
Whatever you do, just don’t use MySQL 5.7.
What about Percona? What about the other 3rd-party MySQL-compatible forks? For most sites, it makes little difference if any. Don’t forget to backup your database before changing or upgrading MySQL.
Usually not required (or noticeably-beneficial) for the average site but can help tremendously for large sites with high traffic and varying query lengths.
You can run MySQLTuner for general recommendations or ask around the sys-admin community to see what everyone else uses.
Buffer size, packet size, cache, connections, cache, stack, etc…are all among the general things to tune.
When trying out random configurations online or copying somebody else’s, please make sure their environment is similar to yours. The main distinctions are:
server size, resources available
how many clients/sites on server
how many end users on server
how much traffic
how big are the sites
what kind of read/write behavior
It’s important to know whether their settings are for efficiency (high-tenant webhost) or aggressive performance (low-tenant webserver).
12. Server full-page caching (ADV, HIGH)
Full-page caching can help speed-up any website. But caching directly from the server is much more powerful and resource-efficient than PHP/application-level caching done through a plugin.
Some Apache or NGINX servers use Varnish – ugghhh, outdated. Don’t use Varnish proxy. Just upgrade to pure-LiteSpeed or pure-NGINX stack.
LiteSpeed servers can use LiteSpeed cache – powerful, many features, and comes with a handy WordPress cache plugin (called “LiteSpeed Cache”).
NGINX servers can use FastCGI – great, super fast! While there’s no official NGINX cache plugin for WordPress, there are various “NGINX helper” plugins to facilitate basic cache functions (like purging).
To be safe, you should disable caching on pages with forms, carts, or checkouts. Private pages (for logged-in users) CAN be cached but don’t mess with that unless you have that much private traffic and ready to spend hours configuring private cache.
You can only enable server-level caching if you own or have access to the server. Otherwise, your webhost decides what caching options you have.
Shared hosting usually allows all caching plugins.
Managed hosting usually limits you to only their proprietary one.
13. Memory object-caching (ADV, LOW-HIGH)
Object-caching caches only the database queries instead of the entire page html. This technically makes it “slower” than full-page caching (since you’re not caching the entire page) but useful for speeding up dynamic pages or private pages (logged-in users, admin backend) that can’t be static-cached.
Any site with lots of constantly-refreshed data on frontend, or lots of numbers and reports on backend…would stand to benefit from object caching. Mostly-static sites or low-traffic sites would not benefit from object-caching at all; don’t use it on them…it can make them slower!
Redis is the gold standard in object caching now. It’s superior to the older memcache in almost every way.
Memcache is only used in rare situations where Redis doesn’t work or is slower.
If your data doesn’t change much, you can set longer object caching times (e.g. 60 mins and up). Longer times means fewer database queries.
Otherwise, stick with the default 5-10 mins to be safe…unless you don’t mind users seeing stale data.
Object caching can be managed by WordPress plugins. Most ideal if you have one cache plugin to manage both full-page caching and object caching.
You can get ~25% faster object caching by using a Unix Socket
UNIX sockets are run from a lower-level layer on the OSI networking model and therefore faster than standard TCP sockets.
Redis and Memcache UNIX socket configuration guides for CentOS.
Redis and Memcache UNIX socket configuration guides for Ubuntu.
Note: with UNIX socket enabled, only one server user account (and presumably all sites by that user) can use object caching. So you can’t use this if you plan to have multiple server users deploying object cache.
Some background on memory-caching…
Memory-caching is the gold standard in caching, because cache runs faster from memory than than from disk. The issue is we have limited amounts of memory (most of it already used for applications) so we can’t store the entire site cache in there. It matters less nowadays anyway since server disks are so much faster now (thanks to SSD technology).
Sure memory is more abundant now too but then again, applications are bigger. You may have heard of others loading their entire site into memory…some using the cache route, others by mounting their WordPress directory into memory. It works great if your site is small enough but for most people: your memory is only big enough to store database queries, anything else you want to cache will be stored on your disk.
14. Use the latest HTTP protocol (BEG, HIGH)
HTTP/2 loads browser requests so much faster than HTTP/1 (thanks to parallelization). It feels like 3 times faster to me.
You should be using HTTP/2 or even HTTP/3 (recently released).
Avoid older web servers still on the archaic HTTP/1.
Using HTTP/2 requires HTTPS/SSL. If your site isn’t in HTTPS, do it now!
15. Content encoding (INT, HIGH)
GZIP is so 2016. Every web-server should have BROTLI compression nowadays. It’s superior to GZIP (produces smaller files AND in less time). But shockingly, BROTLI still isn’t available on all web-servers.
If using BROTLI – set static compression to 4.
If using GZIP – set dynamic compression to 1, static compression to 6.
You can push static compression levels higher if your CPU is strong (or low-usage server) and/or your static content is cached for a long time (long expiry times). If you’re using a CDN or Cloudflare, make sure you enable BROTLI compression there as well.
16. Control-panel (INT, HIGH)
This issue matters only for VPS users. Control panels used to be critiqued for the initial weight they put on the server. That’s because control panels were originally designed for large dedicated servers, but have since been optimized for smaller VPS. While it’s true that having no control panel is lighter than having one, it makes day-to-day tasks harder. Their footprint is now negligible considering how useful panels can be.
The best performing control panel is one that fits your needs.
Allows you to pick the web server of your choice – NGINX or LiteSpeed.
Easily configure redirects at server level – instead of slower PHP-level redirection plugin.
Easily configure granular caching rules – choosing what and what not to cache.
Easy to manage – for you or your sys-admin.
Can cage users – preventing resource-hogs on high-tenant servers.
Secure against hacks – as hacking attempts eat many resources.
Easy to use – for you or your clients.
17. Use external DNS service (INT, LOW)
Lower DNS latency (small benefit)
Easy to update DNS (convenience)
Will using an external DNS like Cloudflare or DNS Made Easy make a world of difference in terms of webhosting speed? I think it improves lookup time but not so noticeable unless your previous DNS server was a piece of junk by cheap webhost.
The main benefit for me is how quickly I can redirect things. Suppose you get hacked and need to redirect through a security proxy. Or maybe you’re switching certain aspects of your site to another server. In moments like this, having a DNS service is so convenient. You can switch things over with very little downtime, and even switch them back quickly if there’s an issue.
DNS services may seem like an extra hassle to setup, but once in place they allow you to integrate new services and mitigate performance issues so much faster.
18. Run WP-cron from your server (BEG, MED)
Many WordPress tasks need a trigger to function. Such as sending out system emails, run backups, release scheduled posts. By default, WordPress uses a function called WP-Cron (conveniently located at yourdomain.com/wp-cron.php). It works by checking (and executing) for any pending tasks any time someone visits the website. It’s great for small sites, but terrible if you have tons of traffic (triggering many unnecessary cron-checks). Also an obvious DDOS vulnerability.
The sensible thing is to disable WP-cron and use a real cron job whether from your server or an external cron service:
Do you have many sites or clients on the same machine? Are you unable to police them all effectively? If you’re losing control of your tenants, it’s probably time to limit their resources. I’ll start you off with a few tactics below. You look up the rest.
Cloudlinux & CageFS – limit CPU and memory usage
Server-wide bans on cache-prebuilding, broken-link checkers, and other resource hogs.
Decrease php execution time.
Global configs blocking the usual offenders, bots, etc.
Worst-case scenario, just split off some clients onto another server. Split them up by size, space usage, traffic amount, whatever you want.
20. Tracking down resource hogs (ADV, MED-HIGH)
We often run into slow server issues with no obvious clue of where to look. Today, it’s this client. Tomorrow, it’s that client. It seems any site can be the culprit on any given day. When you have so many clients, and none of them can afford switching plugins on and off, it is really really difficult to track down the problem.
Check server monitors – which users are hogging the CPU, memory, and bandwidth?
Once you know which site it is…check WordPress error log. Run Query Monitor.
Of course, it might not even happen all the time. You have to track down what users or processes were doing when the slowdown happened.
Sometimes you’ll need more of a developer mentality. What plugin was updated last? Any new themes or plugins that were custom-coded? (Check for memory-exhaustive commands.) Yes, you can use applications monitors like New Relic but for me, it’s overkill. The trickiest problems are when it seems like every site is the problem. Or also when the server load is low but the sites are still slow. Good luck!
2. Theme optimization
Most slow sites that I see can attribute up to 50% of their slowness to the theme alone. Slow themes load way too much junk, offering every fancy effect for every user. Imagine a truck with every tool in the trunk, vs loading only the tools you use. Sure…many themes advertise themselves as being “lightweight” yet still have way more processing than necessary. The worst is when their excessive CSS and JS conflict with other plugins (ecommerce, multi-lingual, sliders, caching, etc).
Ideally you’d have a theme that focuses on the design and nothing else. It loads styles ASAP so content can quickly paint down the browser. No stupid libraries for non-essential items, or endless function checks for user-selected options.
And you really don’t want a theme handling heavy functions better left to plugins. Sure, these themes with endless “extra features” seem like a convenient 1-stop shop…until you realize they don’t do as good a job as specialized plugins AND cause conflicts with other plugins.
21. Use a well-coded WordPress theme or framework (BEG, HIGH)
The lightest and best-coded WordPress theme is the one custom-coded specifically for your use. It has only the features you need and nothing else. No extra CSS/JS loaded for unused options. If coding from scratch, just be careful how you make database queries.
I like Genesis as the base framework for a custom-coded theme.
I like GeneratePress as the base framework for DIY (non-coder) theme.
Oxygen Builder is a good visual builder, but meant for developers than DIY.
Underscores, Beans, or Roots…are also ok if you know what you’re doing.
For custom layouts that need to be edited easily, use or make a Gutenberg block. For all else, make it static. 😉
Not everyone can afford a (quality) custom-coded theme. If you’re buying an off-the-shelf theme, I recommend the following:
Thinking of any themes I didn’t mention? Check out their support channels and Facebook group. What’s their level of support? What type of users are in their community? (Beginner or pro?)
22. Tips when custom-coded themes (ADV, HIGH)
Mobile-first design – cleaner code parsing and puts the redraw effort on stronger desktop processors, rather than forcing weaker mobile CPU’s to repaint.
Use WP_Query wisely – it’s powerful, but don’t abuse your database/memory.
Hard-code selectively – I like to hardcode menus, headers, footers, and as much of the homepage as possible. I let you decide what should be easy to change or not.
Clean CSS – write it from scratch at the beginning. (I think frameworks are too bloated.) Grid vs flexbox, Sass or not, choose wisely. Refactor it all over time!
No JS – if you can help it, don’t have any JS. (If needed for mobile menu and mobile search, do it cleanly!)
Choose between CPT or custom Gutenberg blocks.
Building functions in theme – avoids unnecessary micro-plugins.
23. Clean up your existing theme (BEG, MED)
Already have a theme and can’t change it? No worries, we’ll look at settings and optimize what we can.
Disable lazy loading of images – improves perceived load.
Disable unused features – effects, smooth scrolling, Google maps, etc.
Combine custom CSS – disable all custom CSS enqueued by plugins, and combine into theme custom CSS area.
CSS/JS optimizations – if your theme has any CSS/JS minification or combination options, enable them!
If your theme still runs slow, I think it’s easier to just get another theme and make it look the same. You can also recode the theme from scratch and copy the same look as well.
24. JS reduction (ADV, MED)
I love reducing JS use as much as possible to make themes leaner. My common belief is that CSS is for styling, JS is for effects/functions. And effects/functions are almost never essential for page load. Probably the only essential JS are the ones used for mobile menu, search box, or ATF sliders. All other JS are probably non-essential IMO (animations, tab-boxes, pop-ups) unless they’re loading on every page.
Convert JS effects to CSS (if possible) – this is not only lighter, but can decrease conflicts with plugins.
Remove JS dependency from mobile menus – try building it in CSS. Or even better, just avoid hamburger menus.
Combine all JS hacks into one global JS – better than having many little JS. (Only reason for splitting is if they’re loading conditionally.)
Decide whether you can build all effects with jQuery – or dequeue jquery and make your own mini-library.
All non-critical JS (if you have any) should be stuck in the footer!
25. Pagebuilder removal (INT-ADV, HIGH)
Quite often, many sites (lazily) use a bloated pagebuilder to produce custom page layouts. But there are 2 better ways:
Replace pagebuilder using Gutenberg plugins.
Hard-code the design and/or create your own Gutenberg blocks!
I promise you the effort is worth it. Just do it and you’ll be so glad later! Getting rid of pagebuilders also reduces your number of DOM elements (less work for browsers to process).
3. Plugin optimization
Plugins can cause up to 50-80% of your site’s slowness. Lean plugins load only the features you use AND make as few and as efficient database queries as possible. Bloated plugins do lots of unnecessary processing, make slow queries, and load CSS and JS even on pages not using them. The worst plugins add on endless features over the years and never rewrite from scratch, spitting out PHP errors, hogging memory, also creating security vulnerabilities.
Even better is to know what plugins you really need! Just know that plugins usually do either one of two things:
Give your site a new function (using php/database), and or
Give your site a new aesthetic (using CSS/JS effect).
Do you really need those functions or visual effects? Are there plugins that can do the same with less code/bloat? And for the plugins you do have, don’t enable every feature if you can help it. Load only what is essential to actually creating conversions.
26. Use only essential (well-coded) plugins (BEG, HIGH)
There are many guides out there trying to teach what is a “good plugin” or not. Unfortunately, you will only know with time and experience. Many plugins advertise similar things and it isn’t easy for the average user to know which plugins are coded well or not.
Consumer grade plugins – many features and styling options. Care more about ease-of-use and having more selling-points, than speed or code quality.
Developer grade plugins – do essential features really well, include helpful developer functions/filters, and not much built-in styling.
Many small specialized plugins can be leaner than one bloated kitchen sink plugin with many features you don’t use.
One big plugin can also be leaner than many small ones with overlapping functions.
Unfortunately, many people think reading the WordPress repository reviews is enough to know if a plugin is good or not but it’s sometimes misleading. High ratings there might only mean that it’s popular…doesn’t necessarily tell you if it’s popular among respected developers.
When in doubt, use the plugin with the better reputation among other developers. Ask a developer for their opinion! The pros ask each other all the time as well. We don’t have time to free trial or read reviews. We ask our friends to get quick info.
27. Avoid bloated plugins (BEG, HIGH)
I don’t hate all big plugins with many features. My problem is with bad coding and unnecessary functions. These plugins are on my shitlist for being unnecessarily heavy and slowing sites down. I can assure you there are much better alternatives:
Pagebuilders – WPBakery, DIVI, AVADA, Elementor, Beaver Builder. All of them are heavy! Use Gutenberg blocks instead.
Slider Revolution (RevSlider) – use Metaslider (lightest) or Smart Slider 3 (full-featured) instead.
UberMenu – use Max Mega Menu instead if you really need. Or custom-code it. Or go with plain simple menu.
Thrive Comments or Thrive Leads – anything made by Thrive. I don’t like Thrive Architect either.
Jetpack – eww. Avoid unless you absolutely need it (like for WooCommerce). You can also try Toolbelt which was written to be a cleaner (less spammy) version of Jetpack.
ExactMetrics – use GAinWP instead (it’s a fork of the original GADWP)
Image lightbox effects – try WP Featherlight (yes, it still works).
Image galleries – try Meow Gallery instead of Envira, NextGEN, FooGallery, etc…or even just default Gutenberg gallery with WP Featherlight.
Usual plugins suspected of bloat:
Media plugins – anything with lots of fancy image/gallery displays.
Anything with visual effects – animations or pop-ups, all require JS load.
Conditional load logic – anything that lets you decide which things and widgets to show on which pages.
Font plugins – they often add tons of autoloads.
Lots of options – any plugin with lots of options, or where you enter lots of info.
How to check for bloat? Check website frontend with developer tools and see what CSS/JS it loads. Then check Query Monitor for slow queries on frontend, and the database to see if it adds lots of autoloads. Should also to check error logs for php errors and also their changelog to see how often it’s updated.
28. Avoid unnecessary plugins (BEG-ADV, MED)
These are plugins you don’t really need. There are many other ways to get the same result that don’t require any plugin at all. Yes, I understand some of these plugins will be easier to replace than others.
Add custom CSS – can just put into your theme settings or use the Customizer > Additional CSS.
Browser cache or expiry times – just use your cache plugin.
Font plugins – please do that from your theme.
Header & footer code injector – can put the code directly into your theme files. Ask the theme developer if you need help.
HTTPS/SSL plugins – you don’t need them at all! You can set HTTPS manually.
Gallery plugins – much cleaner to use Gutenberg blocks
Performance plugins – simple ones disabling emojis/embed, or doing simple htaccess edits. The only performance plugin you need is a cache plugin.
Redirection plugins – avoid these if you can. Don’t use the redirect functions in your SEO plugin either. If your server has .htaccess, use that to do redirects! If you need to log 404’s, just check your Google Search Console.
Security plugins – many of them only add stuff to your htaccess, which you can do manually.
Unused plugins – deactivate and or delete!
Widget conditional load – instead of using widget load plugins, you can try creating a new page template in your theme with its own widget position.
29. Prevent plugins from loading globally (INT, MED-HIGH)
Many plugins load their CSS styles and JS scripts on every page, even when they’re not being used! They do that to make sure it always works but the downside is that it slows down your site. Some plugins have an option in the settings to disable global load and/or configure which pages to load on. Others can only be disabled with a filter snippet placed in your functions.php file.
Examples of plugins loading globally:
Contact Form 7 – loads CSS/JS on every page even when they don’t have a form. Sure, there are optimization hacks for CF7 but maybe you can try newer ones like Caldera or WP Fluent Forms.
Form security plugins – some captcha or forms security plugins may also run unnecessarily on pages that don’t have forms.
Pagebuilders – extremely guilty! Many load crap on pages not using them, and also for features not being used!
Slider plugins – disable “load globally” option in settings.
WooCommerce – if you don’t need it on every page (like non-shopping pages), there are functions.php snippets you can use. Some people disable the ajax cart fragments function, too.
Beware of any plugin that creates its own custom post type or content layout/styling on the frontend. Also of any plugin that creates or parses its own shortcodes.
If you don’t know which plugins are loading unnecessary, it’s easy:
Open up your browser Developer Tools and click on the “Network” tab. Then click on the CSS or JS tabs and browse around on your site.
You can also load up Query Monitor and browse around on frontend to see if the plugin is making unnecessary queries.
Oh and btw, just because you removed a plugin’s CSS/JS doesn’t mean you stopped it from loading. It still could be running php and DB queries in the background.
30. Dequeue plugin CSS & JS (ADV, HIGH)
Many plugins load their own CSS and JS which could be easily dequeued/disabled from the plugin and combined into your theme custom CSS/JS (if even needed at all).
Easy plugins – there’s a box to uncheck for “load CSS styles” from plugin settings. If you see JS options, you can disable but check if your plugin still works.
Harder plugins – you can only dequeue the CSS/JS if the plugin has a filter for developers to put into theme functions.php file.
After disabling the CSS/JS, you can copy them (if needed) to your theme custom CSS.
31. Clean up wp_option autoloads (ADV, HIGH)
Many plugins may appear to be “lean” but in fact eat up chunks of memory on every page load! They do this by abusing the WP autoload function, which loads data on every page and is intended for only critical data. But some plugin developers are jerks, hogging all the memory for themselves like your annoying neighbor hogging all the laundry machines. They do it because their bloated plugin won’t load up quick enough otherwise!
You’d be surprised how many unnecessary autoloads are in your database and how big they can get. Let’s find the biggest database memory offenders by cleaning out the autoloads.
Keep your autoloads below 1mb (good), below 500kb (best).
Many old themes/plugins leave crap in database, even when deleted!
If the name isn’t obvious what it is, try opening it up and look through the data.
When in doubt, search the database entry in Google with its name in quotation marks. (e.g. “cherry_fonts_css”)
You can also search the database entry name or plugin name on PluginTests.
You’d be surprised which plugins have lots of autoloads. Anything with lots of settings or data saved is suspect, but even small plugins can create giant autoloads.
Backup the database before deleting entries!
Careful about autoloads for existing plugins. Check with the developer first before deleting/disabling autoload for active plugins. If you want to try anyway (even though I don’t recommend it), you can edit the autoload option to “NO” and then delete after a month if you don’t have any issues. Better idea is to get rid of the plugin altogether.
32. Give feedback to plugin developers (BEG, HIGH)
Quite often, you can complain to the developer directly and they might fix performance issues right away. My advice is to tell them how much you love the plugin and just wished they could fix such-and-such so you wouldn’t have to use a competitor plugin. This is much better than a 1-star review of “THIS PLUGIN SUCKS!”
33. Custom-code your own plugins (ADV, HIGH)
Sometimes, the only way is to write some plugins yourself. You could also take an existing plugin and chop down from its code, cutting out the stuff you don’t need. If it’s simple enough, you can also enqueue it into your theme.
34. Don’t use redirect plugins (INT, MED)
Try not to do redirects from a plugin (whether redirect plugin or SEO plugin). It’s a bad idea speedwise since php-level redirects are slower than server-level redirects. Mind you, it slows down ALL traffic, not only the redirected ones.
To run redirects from your server, use htaccess (if you have Apache or LiteSpeed) and the proper rewrite rules/directives.
If you have NGINX, it’s most likely near impossible unless you have access to server-config and know how to do NGINX configs. If you’re lucky, some NGINX webhosts will have a redirect function in their control panel.
Most redirect plugins can export to htaccess rules.
If you need to monitor 404’s, use Google Search Console.
If you absolutely need a redirect plugin, use Safe Redirect Manager (not Redirection or YOAST redirect function).
This is also a good chance to clean out your redirects. Get rid of duplicates or redirects for links with no traffic. More often than not, I see hundreds of rules that could been more efficiently redirected with just a few clever rewrite directives. If you see many 404’s for Apple touch icons, create them!
Maybe some of you are concerned about the old saying that Apache is slow because of htaccess (and that you shouldn’t use it if you can help it). Yes, there’s truth to that. But htaccess is still much faster than php-redirects. Also, if you’re on LiteSpeed there’s no worry at all since LiteSpeed caches htaccess so it has zero impact.
35. Choosing highly-respected plugins (INT, HIGH)
Aside from choosing well-coded plugins with essential functionality, is to choose plugins with a good reputation. Sure you can look up their site and read the sales copy but it’s better to ask around. Ask experienced developers what they use. Why they like certain plugins.
The best plugins typically have the best features (lots of updates), best support, best compatibility with other themes/plugins, best UI (easy-to-use), easy to work with (easily-customizable for developers), scale well (don’t slow down big sites).
When I look for a plugin…
I check the development community.
I check the WordPress repository reviews.
I check their development company to see what else they’ve built.
Respected development companies love showing their success with other themes or plugins, and the people behind them!
Logical business model. One-time fee for small plugins, monthly fee for big plugins, lifetime plan for new plugins, ongoing cost for updates/support.
The worst plugins aren’t known by their developer company. They’re on ThemeForest, Code Canyon, Envato, or other crappy stores. They showcase the product more so than the company behind it (of course, they don’t show past failures). And their pricing is too cheap. Cheaply-priced plugins will get abandoned soon over time and won’t be updated often. Look at their marketing…if it’s aimed at newbie users, it probably isn’t the best one.
4. Image optimization
Images are actually very simple assets, not much complex processing required from web servers. Where they hold back your page load is in their delivery across networks and rendering in the user’s browser. Make them too big and they take longer to send and eat up the browser’s memory. More than anything, images affect your website’s perceived load time.
Below are my strategies to serving images that not only load fast but keep your website looking just as great as you designed it. Please read my MONSTER Guide to WordPress Image Optimization. It explains in fuller detail than some abbreviated explanations in this section.
36. Choose proper image format (BEG, MED)
JPEG – produces smaller files for photos or images with many colors.
PNG (aka “png-8”) – produces smaller files for images with few colors, sharp lines and contrast, and can also do transparency.
PNG 24 – higher quality version of PNG suitable for photos, but still larger file-size than JPEG, so not recommended unless you need transparency.
WEBP – combines the best of JPEG and PNG, allowing great photo quality and transparency, and better compression than JPEG (smaller filesize). Can be used in place of JPEG or PNG 24, but should have fallbacks just in case!
GIF – most common in low-quality meme animations. Useful when you want to share a video, but don’t need sharpness or sound. GIF is basically an image slideshow format masquerading as low-quality video format. Rarely used in a professional setting like a website, where you typically want high-definition images and videos. Just know that GIF’s can be optimized, too.
37. Choose proper image dimensions (BEG, MED)
Don’t use a bigger image than you need!
Resize images to fit the exact area size. (e.g. using 400px-width image for a 400px-width area.)
To make important or larger images appear better on retina screens, use an image double the area size (e.g. 800px-width image for 400px-width area.)
Less important or smaller images can be sized exactly as the area size (no need to be retina-compatible).
I believe most people don’t use retina or ultra-HD monitors in their full resolution. Many will scale at 150%, which means you can (probably) get away with only 1.5x image sizes.
Don’t upload raw photos directly from your camera. Resize, crop, and edit them first! Or use an image compression plugin to automatically optimize uploaded photos.
A big waste would be loading a 2000px width image into a 300px width space. It wastes server storage, internet bandwidth, and browser processing.
38. Set proper media sizes in theme and plugins (ADV, MED-HIGH)
Luckily, most themes set the right image sizes already since they control the layouts. The issue is more when you have frameworks or plugins using generic media sizes because they don’t know what you’ll end up using. Or you created a new layout that needs a specific media size not already set by your theme.
Finish your theme design.
Then go to WordPress Settings > Media, and set the correct sizes used throughout your site.
If you have WooCommerce…check Appearance > Customize > WooCommerce > Product Images.
If your theme or plugins create their own image sizes, check their settings and image sizes as well. (Some are hardcoded in theme files.)
What you don’t want is to have image sizes that don’t match your layouts. For example: your site has only 400px & 800px image sizes, but some image areas are 500px size…it will wastefully use the 800px one! The solution in this case is either to adjust the closest media size to 500px or create a whole new media size. (Ideally, we want to have as few media sizes as possible to save server space.)
39. Using responsive (adaptive) images for smaller devices (INT, MED)
Make sure your theme is mobile-adaptive (most themes are) and shows smaller images for smaller devices.
This feature is default with WordPress and most well-coded themes, and can also be enabled by adaptive image plugins. Obviously, it’s not good to load desktop-size images for mobile devices! The problem is that some themes don’t enable this feature properly. Either they load only the desktop-size version for all devices, or even more stupid…they load BOTH (desktop & mobile) sizes for all devices.
If your site uses large background images, you better make sure this feature is working correctly in mobile!
40. Image compression (BEG-INT, MED)
Manual JPEG compression – use an image editor (e.g. Photoshop) to decide the exact quality output you want. 60% for jpeg is safe. Can test a few percentage points up or down. Good for large or important images.
Manual PNG compress – use image editor and adjust the number of colors.
Automatic compression – use a plugin to do it. My favorite image compression plugins (in order) are ShortPixel, LiteSpeed Cache, WP Compress. You can use these for less important images or non-tech-savvy users.
41. Convert unnecessary transparent PNG to JPEG (INT, MED)
I often see large transparent PNG images sitting on a plain white background. Eating up tons of space when they could easily be half the size and even look better as JPEG.
If your transparent PNG sits on a solid background, you can easily convert that image to JPEG and match the color of the background.
You’ll save many bytes and won’t notice any difference!
If your image is simple, a solid background PNG might still be smaller than transparent PNG.
42. Redraw images or icons in CSS (ADV, LOW)
Some themes or plugins unnecessarily use image files for very simple graphics (lines, blocks, icons) that could be easily drawn using only CSS.
You can check by inspecting visual decorations around your site theme.
Redraw them in CSS and you’ll save a few unnecessary HTTP requests.
Here’s a fun collection of 512 pure-CSS icons (by CSS Icon), some even animate!
Want to be clever? You can mix images and CSS together. Using CSS to draw shapes in your images or color filters. There are so many clever uses that save space and look better.
Gradients – been a part of CSS for a while, especially during web 2.0 era.
Shadows – use CSS instead of putting edge shadows in your images!
B&W filter – great for reusing an existing color image.
Color filter – reverse of above.
43. Icon fonts vs SVG’s (ADV, MED)
There are many debates in the developer world about whether icons are better as SVG or icon fonts. Developers are free to choose because they know which fits their use and workflow. Between you and I, here are my guidelines:
Simple icons (arrows, search glass, hamburger menu) can be drawn with CSS.
Complex icons (social media icons, carts, notepads, etc) need either SVG or icon font.
If you only have 2-3 icons, SVG will be less weight (and can even be inlined).
If you have 10 or more icons, use a custom icon font service (Fontastic, Fontello, IcoMoon). Or create your own custom font.
Self-made icon font (my favorite) and locally-loaded is fastest because even a 2kb small icon-font file can load 10-20 icons, which is all you really need.
The hassle with self-made icon fonts is that they take more time to update if you want to add/edit an icon later.
The worst icon fonts are the 3rd-party ones loading externally! For example, Font Awesome is 30-200kb and loads many unused icons.
If using SVG, you can optimize them with Jake Archibald’s SVGOMG. See what you can disable or decrease in quality without affecting appearance.
Please don’t inline SVG’s unless it’s really small and only used in one place on the page.
Most people don’t have the skills to redraw in CSS or create their own icon font. All I ask is that you either use SVG’s or follow one of those custom font services. Whatever you do, please don’t load FontAwesome as that’s a good 40-75kb and costs you 100-150ms load time. Of course, many theme developers load FA as that’s the easiest/laziest way to put many icons on a theme.
44. Remove unused media sizes (ADV, LOW)
Does having a ton of image files really slow down your site? Probably not.
Does it slow down backend site functions? Maybe.
Can it affect your site speed during longer backup times? Yes!
Can it make your webhosting more expensive? Yes.
More than anything, it makes an unnecessary mess out of your website. Making it bigger and bulkier than necessary. Let’s clean this up. Go to your theme and plugin settings and uncheck/disable any media sizes you don’t need. Some of this work may require a developer to thoroughly check all your page templates, edit functions.php and manually dequeue unused media sizes.
Having a hard time finding all the media sizes that your site is using? A handy trick for me is to install one of those image compression plugins. They’ll list all the sizes in one handy place. 😉
Get rid of media sizes you don’t use.
Can also remove sizes that are too similar. (Keeping the bigger one.)
Once you’ve deleted unused media sizes, you’ll have to delete the unused images…but be careful!
There are plugins that say they can do the job. Please research and test carefully. I’m honestly unsure of which ones delete only unused media sizes and which ones delete entire unused images.
Be very wary of those newspaper/magazine themes that have many image sizes!
45. Using CSS sprites (ADV, LOW)
Css sprites is an old tactic that actually still works for some use cases. A long time ago, some developers used to combine many tiny images into one image file and then call only parts of it within CSS. It was a clever way of reducing HTTP requests. Nowadays this tactic is isn’t necessary since HTTP/2 allows you to have many more HTTP requests and most small images can be drawn in CSS, icon fonts and SVG’s. (Design coloring is much flatter as well nowadays, instead of the overly color-esque WEB 1.0 period.)
You can try CSS sprites if you have many small images that have multiple colors (and/or can’t be drawn in icon fonts or SVG’s).
46. Video compression (BEG-INT, MED-HIGH)
Compress videos as much as possible.
Output in webm or mp4 format. (I like mp4.)
Any video that’s auto-played on page load should absolutely be compressed. If you’re a pro-editor and know how to render the perfect balance between small file-size and good quality, do your thing. For everybody else, just do my easy cheat!
Upload the video to Vimeo, Youtube, Facebook, etc.
Then re-download their compressed version.
These services put out gajillions of videos everyday, I think they got the best algorithms! Youtube’s compression is the best balance of small size and good quality. If you want slightly higher quality, try Vimeo. If you want smaller size, try Facebook.
More important than compressing the video, is to decide what you need from it:
Do you even need the sound? (Remove if not.)
Do you even need it in color?
Is the video just a backdrop for text? (Can lower quality even more.)
Does it even have to be that big?
Do you even need a video? Does it even get watched? Maybe nice big images are better and cleaner to use!
5. Font optimization
You would think fonts are so small in filesize that they don’t affect performance, but they totally do. Users perceive your website load by your content and the font is what allows your text to load. Load the fonts efficiently and users see instant content.
Do it inefficiently, and users see a lot of blank space (aka FOIT, flash-of-invisible-text)…or worst, ugly unstyled text followed by a screen flash before the font loads (aka FOUT, flash-of-unstyled-text). It’s a really jarring experience. Looks like crap and makes your site appear slow (both to users and speed tests).
What makes fonts so slow nowadays is due to the abundance of free fancy fonts (Google fonts). Back in the days, you had to pay for fancy fonts so you were much more judicious about their selection. Now even a free plugin can load hundreds of Google fonts. This makes it tougher to police where fonts are loaded from and for which text.
Fonts make a visible speed impact no matter how big or small your site. And actually, one of my favorite optimization tactics for speeding up already-lightweight sites. There are many factors to consider when loading fonts, all of them affecting your content load time noticeably!
47. System font vs locally-loaded vs webfont (BEG-ADV, MED)
System-fonts – faster than locally-loaded fonts or webfonts.
Locally-loaded fonts – faster than webfonts, and can be CDN/browser-cached.
Webfonts – slowest, but can load equally fast if already cached.
System-fonts (already built into the OS) will load faster than webfonts from 3rd-party server (Google webfont, Adobe, Typekit, Typography.com, etc). Just know that some system fonts (like Arial, Helvetica) are available on both Windows & Mac, whereas other system fonts are not and must fallback to their similar equivalent (like Segoe UI for Windows, and System UI for OS X).
I use system fonts for 2 of my sites. The rest of them, like most sites today, need a nice webfont to look polished. Luckily, webfonts keep improving their load time in various ways. They’re constantly getting lighter and removing unnecessary bytes.
Webfonts are also cached in browsers so if you’re using a popular webfont, there’s a good chance your users won’t have to re-download it (since they already got it from another site). Also, I imagine popular Google webfonts will soon be natively stored in Chrome browser (if they aren’t already). But then again, mobile browsers clear their cache often. But then again, there’s also DNS prefetch which helps webfonts.
Locally-loaded fonts (meaning “locally” from your server) is somewhat seen as an outdated way of enqueuing fonts. Web designers used to buy fancy fonts from 3rd-party sites, download the whole font family package, then carefully choose and enqueue in the site. It was a tedious process and didn’t let end users (easily) switch fonts in and out. But since webfonts are kinda bloated in their deployment, locally-loading fonts is still popular among speed-conscious developers.
You can locally-load any webfont by copying it to your sever and requesting it locally instead of from a 3rd-party webfont service.
I personally use only system fonts, or locally-loaded webfonts.
48. Use fewer fonts (BEG, MED)
Using just 1 font is fastest.
If using 2 or 3 fonts, make sure you disable unused styles!
Having fewer fonts will help, obviously. It’s great if you can get away with just one font. It’s the cleanest look IMO and you can still create different styles by playing with size, weight, letter-spacing, letter case, color, etc. But if you need, you can add a second font used for headline only. Some really professionally designed sites will even have a 3rd font for subtitles, H3 header, quotes, prices, or other emphasized text areas.
Some fonts are heavier than others. Sometimes, even one font can be heavier than 2 others.
Don’t forget to disable the font load (enqueue) from your site. It’s not enough to simply stop using it.
If using more than 2 weights of the same font, you can try using variable fonts. They load the same amount of bytes no matter how many weights you have. Really cool new font technology.
49. Don’t enqueue unused font weights, styles, character sets (INT, MED)
Many people don’t notice the unused fonts styles loaded on their site! I’ve seen many sites loading all the font weights (100, 200, 300, 400, 500, 600, 700) and font styles (regular, italic), and character sets (extended latin, greek, cyrillic, etc)….when in fact they only need font weights 400 (normal) and 700 (bold), and only the basic latin character set.
Check your site for all unused font styles.
Remove their requests from theme and plugin settings.
Also remove from header and stylesheets (if manually installed).
If you don’t know which ones you’re actually using, make a list. Link to the FOUNT font finder on your browser bookmark bar and identify every font used on your site. Test on different page layouts and click on all the content bits. Title, nav, headers, content, text in footer and widgets. Don’t forget to check hidden elements like carousel, pop-ups, tabbed or collapsed content. Are you feeling overwhelmed? That only goes to show that you’re loading more than you need!
Body text usually needs regular (400), italics (400), and bold (700)
Titles and headings can re-use the regular 400 or 700, but some people want super-skinny (300) or super-heavy (900).
Most sites never use italics for titles/headings, so if you’re loading 900 for them you probably won’t need italics 900.
Anyway, most of this is common sense. Those of you manually enqueuing fonts are already aware and making sensible choices. It’s the newbies loading fonts through pagebuilders or plugins that are likely having unnecessary weights, styles, and character sets.
50. Font enqueue method (ADV, MED)
This is IMO an art and massive area of debate within the development world. There are many ways to enqueue fonts (especially webfonts), each with their own pros and cons. I’ll leave some general guidelines below:
Fonts should load before the content – I don’t care about FOIT or render-blocking, it’s better UX to load text in its proper font from the get-go.
Font should be (carefully) loaded by the theme, not a plugin. If your plugins have font/typography options, choose “inherit”.
Webfonts load faster when loaded-locally and with long cache expiry times. But that speed difference isn’t as noticeable if you’re using a common (lightweight) webfont.
The biggest problem with how webfonts are enqueued are due to developers trying to make them user-friendly. If you’re manually enqueuing just one webfont and carefully inserting it into the theme, there’s usually no issue. It’s when developers try to have endless font-choice dropdowns for newbie users that it gets messy and more stuff is loaded than needed.
Don’t get caught up in reading crazy-detailed guides like this or this. They’ll spin your head around with all kinds of preload and fallback chatter. My bottom line is this…load the font before the text. Don’t let the text load first as that creates lots of FOUT chaos for bloated WordPress sites.
51. Automated font subsetting (ADV, MED)
Font subsetting is an ingenious weight-reduction tactic of loading only the font characters actually used in your content. There are many use cases where you don’t need all the characters in a font. For some people, getting rid of unused characters made their font file-sizes 1040x times smaller!
Only basic latin characters – if you don’t need accent marks, Egyptian symbols and such.
Only uppercase – title fonts, headings.
Only numbers – for specific styled numbers?
Only currency symbols – if you use this font only for price menu?
Only certain characters – logos, headlines
Only common characters – all the ones used in 99% of websites.
Some font subsetting is easily-allowed by webfont services. Others, you can only do it manually (but there are helpful tools). Below are some tools and guides.
Webfont Generator (Font Squirrel) – awesome tool with many options. Pick “Expert”, scroll down and then Basic or Custom subsetting. I love this one.
Font Subsetter (Everything Fonts) – simpler tool to upload and subset any font you like. They have helpful basic options. You can also pick “extra characters” at the bottom.
Usually when you do this level of font optimization, your font files get so small that it only makes sense to have them locally-loaded. There’s no point in making multiple calls to Google’s font server only to get 1/3rd of a font. But hey, that’s your call to make. I think if you’re manually optimizing to this point, just go all the way.
This “locally-loaded subsetted-webfont” method gives me nice fonts AND lightweight ultra-fast load.
Yes, I lose out on the benefit of them already being cached from other websites or easily updated via font-hosting service.
But likewise, they are much lighter and can also be cached in CDN and browser at my specified intervals. (Also appears faster in page tests as well.) Overall, benefits outweigh any drawbacks.
I recommend using only WOFF2 as it’s the most compressed/lightweight and suits all modern browsers. Sometimes, font services load WOFF which is bigger but compatible with really old browsers (not important to me).
Font-subsetting can also open up creative design flexibility. Like mixing letters of one font with numbers or signs of another. Or maybe you just want a really unique “&” sign or unique letter because that’s your customized logo letter. In case you’re already doing that, at least now you know how it’s done without loading entire fonts.
Some really obsessive speed addicts (like me) will manually edit fonts to remove ALL unnecessary characters and glyphs. And I mean like… ALLLLLL! This tactic is extremely tedious and will certainly earn you the “I have no life” award from me.
The only tool of choice here is none other than the legendary FontForge, used by professional designers to create and edit new fonts. It looks like a giant photo library of every character in your font. Allows you to manually adjust each one’s shape and spacing with adjacent characters.
2 ways to work with FontForge:
Reduction – load a font and then delete unwanted characters. (Probably smarter to start with an already subsetted font.)
Build from scratch – open existing font and new font side-by-side, and copy over. This route makes sense if you only need a few characters.
Yes, you’ve got to be crazy to tweak this far but it really works to make your fonts super lightweight. I actually find it to be so much fun (despite the work). It’s one of the few tactics that can make already lightweight sites even more lightweight.
Other thoughts regarding font optimization and subsetting:
Yes, this matters even if you only use one Google font family.
When requesting webfonts, put it all into one request instead of multiple. If anything, this is a practice of loading all webfonts in one place! Do not have some fonts loaded by theme, others by plugin, and such and such.
54. Optimizing Font Awesome (ADV, MED)
I don’t like FA but maybe you like it or don’t want to re-style a theme already built for FA. Here’s how you can make it lighter, improving speed AND page scores!
If you’re thinking it’s easier to just rebuild a new iconfont or use SVG’s, it might be…only issue is replacing all the CSS calls to FA.
I swear it’s easy to load FA locally. Just download it from the site (can even match the same version you have already). Upload the FA folder to your website directory, then go into your theme or wherever FA is loaded from and change the request to load from your site instead of the FA domain.
55. Preload fonts (ADV, LOW)
Are you feeling like your content isn’t coming up super instantly? You can preload fonts in your header instead of waiting for the CSS to load. Which also makes font preloading useful for folks with giant (or combined) CSS files.
Total rookie mistake and one I see happening all the time. The theme calls a webfont (let’s say Google’s Montserrat), the pagebuilder calls the exact same one, and the pop-up plugin calls it one more time. So now, we got 3 calls and 30 requests to Google’s webfont servers to download the same damn font multiple times. How stupid!
Try to load fonts only from one place, preferably your theme.
All other font-settings places (like plugins) should use the “inherit” option instead of picking a font.
Watch out for plugins that let you select fonts (pagebuilder, slider, pop-up, mega-menu).
The common mistake is that users think they have to re-select their font in every website setting. Don’t do that!
6. Caching optimization
Caching is best defined as saving the processed requests so they can be served faster when requested again. It’s used in every aspect of computer technology since forever, and absolutely essential for speeding up your page load.
There are many kinds of caching (across different layers, protocols, and services) and many ways to configure them. Set them up right and you’ll have a fast site that reduces server load and saves money. Set them up wrong and you have a site that’s sometimes-fast and or has broken design and functions.
If you’ve ever heard of people complaining about cache, it’s a combination of them not knowing how to configure for their use case and/or using a caching solution configured for server-efficiency more so than speed.
57. Choosing the right server for caching (BEG-ADV, HIGH)
Full-page caching (aka “static caching” or just “caching”) means to prebuild the entire page, making it static like HTML so it’s ready to serve immediately when the page is visited. There is no wait for any database queries or PHP processing…the page simply appears instantly. Like a burger that was made before you order it!
Back in the days, caching was only done by the web server (therefore called “server caching”) and utilized to keep server load down. It was a tactic to help busy web servers handle lots of traffic. Somebody later realized it could help speed up today’s bloated sites so now, caching is also used from a speed point-of-view and deployed even on small webservers with little traffic.
Developers even created software-level caching mechanisms to recreate the same benefit for users without server access, or on servers without “server-caching” modules enabled. Of course, they’re not as fast as true server-caching but still massively impactful and in some cases even more useful because of having extra caching features.
The most important distinction for regular users is to know their caching limitations with each webhost or web-server. In terms of webserver…Apache, LiteSpeed, and NGINX all have different server-caching available.
In terms of webhosting…just know that some webhosts allow you the freedom to use their server-caching or any 3rd-party plugin of your choice. Other webhosts force you to use their proprietary caching solution. Of course, they will sell it as being high-tech and “best performance” but usually it’s a stripped-down caching solution that’s built for resource-efficiency rather than aggressive performance. If you try to use an outside plugin, it simply won’t work or the webhosting company will automatically disable it.
Caching is usually faster and more resource-efficient from the server rather than through software-level PHP caching.
If using LiteSpeed server, you can use built-in LiteSpeed server caching.
If using NGINX server, you can use built-in FastCGI server caching.
If using Apache (which you shouldn’t), you can use Varnish proxy or even NGINX proxy.
All web-servers can use any software-level php caching (via cache plugin). But some plugins are designed more for Apache/LiteSpeed servers, others for NGINX servers.
Careful of certain webhosts (especially “managed webhosts”) who force you to use their caching solutions and won’t let you use other cache plugins.
Just know that the webserver or webhosting company you choose will affect your caching experience and what caching plugins you can use.
58. Choosing the right cache plugins (BEG-ADV, HIGH)
I’ve tried over 50 different cache plugins. The best ones have useful features, easy-to-use, and don’t break your site. If you manage only a few sites, you might prefer aggressive plugins with many optimizations and even Facebook groups where people share tricks. If you manage dozens of clients, you’ll prefer a safer plugin with less features and less chance of issues.
Best all-around cache plugins (allowed on any webserver) are Swift Performance or WP Rocket. Swift more aggressive, Rocket more stable.
There are other good cache plugins as well (WP Fastest Cache, Breeze, WP Performance, Comet Cache, Borlabs).
W3TC sucks and very difficult to configure. Don’t use unless you’re a pro.
If using NGINX server, you can stick with NGINX helper plugins to keep it simple or a full-featured cache plugin like (Swift or WP Rocket).
Do not combine multiple cache plugins!
I don’t like combining cache plugins with other performance plugins either, but it can work if configured carefully (and not overlapping functions).
Deciding which cache plugin to use depends on your use case.
Small site with 400 pages and little traffic? – Swift or WP Rocket, with precaching enabled.
Medium site with 400-1k pages, and medium traffic? – Can go with cache plugin Swift/Rocket or server caching LiteSpeed/NGINX. Both have pros and cons.
Big site with 1k or more pages and lots of traffic? – I like custom-configured LiteSpeed Cache or native-NGINX cache and no precaching necessary since you have so much traffic.
59. Cache plugin configuration (INT-ADV, HIGH)
Cache plugins are more complicated than ever to configure now since they do so many more things than just caching. This section covers specifically only caching-related settings. Regarding other options you see in cache plugin settings, my recommendation will be in other parts of this guide.
Rewrites vs PHP – most cache plugins only give you the PHP option. If you have the option to use the rewrite method, try that as it’s faster. If it causes problems, then switch to php method.
Cache TTL – this means how long the cache should last for. You should set this about as long as your content update intervals. If you update every day, then set 24 hours. If you almost never update, can make it 1 month.
Private cache or logged-in users/pages – don’t use unless you really have that many logged-in users and you know how to prevent cache from mixing up content between users.
Separate mobile cache – don’t use unless you have AMP or a specific design or content that only shows up on mobile. Just because you have a mobile-responsive site doesn’t mean you need this.
Caching 404 pages – yes if you have many users hitting them. Better if you redirect all of them to actual pages.
Dynamic cache – great for caching urls with queries or filters, like searches or ecommerce product filters.
Exclude – absolutely critical for excluding pages that shouldn’t be cached. I typically exclude checkout, logged-in user pages, or pages with forms.
Browser cache – yes, enable it.
Heartbeat control – I usually disable for all pages except posts. Or if you need it on, you can increase its interval to every 120 seconds.
Not every caching setup or cache plugin will allow you to configure all those options. Don’t freak out if you don’t see them. In fact, there are so many possible settings.
For all other cache plugins, I think you can follow my guides above to get a general idea.
60. Configuring cache-prebuild (INT, MED-HIGH)
One of the most overlooked aspects of caching for me is the cache-prebuild process. Some plugins call it “cache-preload”, others call it “cache-warming” or “cache-crawler”. The cache-prebuild function is a mechanism that pre-caches pages so they load quickly when visited. Back in the old days, caching was only used on high traffic sites and so no cache-preload was necessary. The cache was built by the first visitor and all subsequent visitors benefitted from an already-built cache. This was fine since you had thousands of visits and only the very first person was unlucky to see a “slower” page.
But in today’s caching era, letting the “first person warm your cache” is a terrible idea if you have very little traffic. On a not-so-busy site with no cache prebuild, it might seem like all your visitors hit a cold (uncached) page. FYI: users hitting cold cache will see a slower page load than without any caching at all!
So anyway, we have cache-prebuilding now. There are very few servers that have or allow a server-wide cache prebuild function. They’re probably afraid of users abusing it. It’s in the same logic that many webhosts won’t allow you to use those broken-link checker plugins (because it eats up precious resources).
LiteSpeed servers have a built-in cache crawl function. Few webhosts allow it on shared servers though. You’ll probably only get access if you have it on your own VPS.
Anybody not on LiteSpeed….well, there are many server-level cache warming mechanism and scripts out there but not quite so user-friendly. You can search them out if you insist. It’s much easier if you’re on LiteSpeed, though.
The best server caching script I found is OCP.
The only option (for most people) is to use a cache plugin that has cache prebuild functions built-in like Swift Performance and now WP Rocket (which copied that idea from Swift).
Prebuilding improves the caching experience on your site by a whole lot. Enable it if you can!
There are a few instances where you SHOULD NOT use cache-prebuild. One is if you have many visitors, it’s useless since there’s already live traffic warming the cache. The other is when you have too many pages.
I would say 1k pages is the general threshold. If you have over 1k pages and you update your site often, I recommend NOT pre-caching since your server will use many resources and never even finish the job. If your cache gets purged before it ever finishes, it’s stuck in a perpetual cycle of constantly prebuilding cache that’s never used.
Object caching is useful for dynamic sites (constantly-refreshed data and/or can’t be cached) or any sites with lots of calculated numbers/reports in admin backend. Object caching saves the database calls in RAM so they don’t have to be looked up every time they’re queried.
Because RAM is precious (less abundant than hard drive space and necessary for running programs), object caching is not usually allowed on many shared hosting plans. Also it has to be enabled through the server…so it’s only possible if you have your own server or on a hosting plan that allows object caching.
Object caching must be enabled from the server.
Object caching can be managed through the webhosting control panel or WordPress plugin. (Plugin is better.)
It’s best if you have a cache plugin that manages both page caching and object caching (like LiteSpeed Cache). This way, they purge cache at the same time.
You can use an object cache expiry time of 5 to 10 minutes to be safe. But if your content isn’t update often, you can go higher like up to 30-60 minutes.
I recommend not to use object caching if you have just a static site. In some cases, it’s even slower than just plain page-caching. Enabling it “just in case” does not help! Of course, you can test and see for yourself.
Top reasons to use object cache:
Slow admin backend.
Slow database-heavy functions.
Don’t know if your pages are suffering from slow query? Check with Query Monitor.
This is that common tactic where people paste a bunch of lines into their htaccess so static files are browser-cached for a long time (1 week, 1 month, or even a year) so users don’t have re-download them again. Maybe it was a big deal before…well it isn’t anymore.
Many devices (like mobile) have limited space and delete their browser cache when they want, not when you want.
Browser cache only helps for returning visitors, and many sites don’t have much repeat traffic anyway. (Besides, it’s the new visitors that we care more about improving user experience.)
If you want to use browser cache, it’s more conveniently done through a cache plugin…rather than copy-pasting long commands into your htaccess file.
63. Ignore query strings on page caching (BEG, MED)
Query strings are (the extra text at the end of urls) used to send information to the server. Examples of query strings below and what they do:
search – show different search results. (e.g. search?=wordpress+tips)
ref – lets the site track who referred the user and save info within conversion tracking software. (e.g. ref?=affiliateID)
fbclid – lets the site know the user came from Facebook. (e.g. fbclid=123ABC)
(product) filter – show different products based on name, price, size or other product specifications. (e.g. filter_size?=large)
As you can see, some of these query strings actually alter the page content whereas other strings show the same page content regardless of the query string. The idea here is to exclude the query strings (that don’t change content) from caching so your cache mechanism doesn’t store those hits as a different page. This would save your server from unnecessary work recaching the same page under a different url string AND serve the page faster to visitors from existing cache.
This makes a big difference for visitors coming in from query string urls such as Facebook ads, affiliate links, email newsletter links (with conversion-tracking).
64. Private caching for logged-in users (ADV, MED)
Private caching is rarely practiced as most sites don’t need it (they don’t have many logged-in users). Caching public pages is easy since everyone sees the same page. Caching private pages is hard because of having to cache how each user sees the page differently AND (preferably) not wasting so much space resaving mostly similar pages over and over in cache.
Some private pages are easy – same content for all logged-in users, but something else for users not logged in.
Some private pages are harder – shows mostly same content but also custom data depending on the user (like their name/username).
Other private pages are tricky – shows completely different content to each user.
The easiest way to deal with private pages is to use object caching instead of page caching. To be more aggressive, you can carefully enable private caching…BUT make sure users can’t see each others info and the public can’t see private content.
There are certain mechanisms out there like LiteSpeed’s ESI feature where you can show different content and widgets depending on the users…which is nice. But ultimately at this level, you need to either hire a pro or spend lots of time to configure something that not only works but also doesn’t eat up so much resources (memory and space). Private caching is tough!
65. HTML-caching at the edge (INT, MED)
This is a relatively new technology for WordPress. There are several plugins and services out there that can cache your pages at the edge and use CDN mirrors to serve them to clients around the world. There are 3 main benefits:
Caching done on their server, not yours – reduces your server load, helps slow webhosting, decrease server costs, allow caching even if server doesn’t have it. Basically…allows you fast speeds even if your webhosting/server sucks!
HTML delivered from CDN – traditionally, CDN’s only transfer static assets like images and CSS/JS. With this new edge-caching for HTML, they can serve the HTML from the nearby pop server as well…theoretically improving page load for visitors far from your origin server.
Further DDOS protection – since less of your server is used, less of your server is exposed to DDOS attacks.
Notable edge-caching plugins and services available:
QUIC.cloud – from the makers of LiteSpeed webservers. Their Q.C service allows any website to benefit from LiteSpeed quickness even if they don’t have LiteSpeed servers.
Shifter – sold as a “static site generator for WordPress”. Seems to be a very different user experience from the usual WordPress workflow.
WP Cloudflare Super Page Cache – allows you to cache everything with the free Cloudflare plan. Something previous plugins have claimed to do but fail in one way or another.
I believe there are some more but I can’t find them now.
Do you need these services, or are they beneficial if you already have a fast server? I think not so much. I don’t use any of them as I’m happy with my server caching already. But these can be great options for those on weaker servers. Keep an eye on this segment as I’m sure it will evolve quickly.
7. Local asset optimization
Assets are any static files loading from your server. CSS stylesheets, JS scripts, images, fonts, videos. They need to be processed quickly because they often ARE the content OR they directly affect how the content is shown. Simply put, your content cannot load until your assets are loaded!
Now the trick is in how we load the assets. Some should load first, others should load later. Stuff that’s visual and near the top of the page should be prioritized. What we don’t want is less-important assets to block the critical ones. How else can we optimize the way they load?
66. Reduce asset requests. (BEG-ADV, HIGH)
The fastest request is the one not made! And the most obvious way to reduce asset requests (and overall HTML) is not to call them in the first place. Many people spend so much time trying to compress and combine junk that shouldn’t have even been there in the first place! Please reconsider everything you have on your page.
Get rid of stuff you don’t need. (Plugins, images, fonts, etc.)
Get rid of visual effects you don’t need. (Animations, mouseovers, etc.)
Disable unnecessary plugin CSS/JS.
Consider moving things to other pages. Don’t put your entire site on the homepage.
The less stuff you have loaded, the fewer assets needed.
And for the assets you still have? We have more tricks…
67. Remove unused WordPress core JS (BEG, LOW)
WordPress by default includes a couple javascripts that might not be used. You can disable them with some simple snippets in your functions.php file.
wp-embed.js – conveniently embed Youtube videos or unfurl links in the editor and content. If you literally never embed videos and all your content is just text and images, you can dequeue it.
wp-emoji-release.js – little JS that turns punctuation marks into emojis. You can disable this since modern browsers already support emojis natively.
jquery-migrate.min.js – supports older WordPress themes and plugins still running on the old jquery library. Sites using updated themes/plugins can safely disable this.
jquery.js – largish JS library used by many themes/plugins. It’s convenient since themes/plugins won’t load extra JS if they can use the default jquery JS. The issue is some themes/plugins DON’T use it and they load their own JS anyway. Disable if your theme/plugins don’t use it. If you don’t know, then disable and check everything carefully…or consult the documentation for every theme/plugin that you installed.
I’m sure you’ve seen some performance plugins that offer to disable these for you. I suggest not using them as they sometimes create their own extra load. I prefer disabling these manually in functions.php OR using the built-in functions in my caching plugin.
68. Use native CSS/JS optimizations from your theme & plugins (BEG, MED)
If your theme or plugin has built-in CSS/JS optimization features, use them as they are safer and likely won’t cause any issues.
Theme or pagebuilders allowing CSS/JS merge and minification – use it.
Plugins allowing different CSS generation options – always pick “external CSS file”, as it’s faster and safer than putting them “inline” or in “database”. Only use inline if it’s super tiny CSS (like 3 lines).
69. Combine CSS/JS for small sites only! (BEG, LOW)
There is a huge debate whether you should combine and minify your CSS/JS, aka “concatenation”. I believe it’s better (in general) if you don’t combine CSS/JS . With that said, smaller sites can benefit from combining since most of the load time for tiny CSS/JS will come from the DNS lookup rather than the code processing.
As for larger sites or larger CSS files, I definitely recommend not combining them. You can read the link above for my explanation why. Basically, it’s because HTTP/2 makes concatenation unnecessary and also that not all CSS/JS should load in one file.
If you plan to combine CSS/JS, it’s best IMO to do it only through your theme CSS options. (Of course, it only combines theme-related CSS and not plugins.)
70. Combining CSS/JS for big sites (ADV, MED)
I already said why not to combine CSS/JS, and I still stand by that. But I know some people are going to insist on it anyway because they care more about page scores or what other people on the internet said…fine, do it like this:
EASY – use the CSS/JS combine options in your cache plugin. Test your site. If some styling or functions break, then exclude the problematic ones.
ADVANCED – use a specialized CSS/JS combination plugin (Autoptimize is the best) alongside a cache plugin. This method requires more configuration but gives you more granular control over the optimizations and takes load off your caching mechanism. Can actually be nice since content changes won’t purge your CSS/JS.
NOTE: don’t use the combination features in your cache plugin if you’re doing it with another plugin. Duh!
NOTE #2: if your theme/pagebuilder has combine options as well…yes, you can use them all together. But combine the pagebuilder and plugins first and then do it overall from your cache plugin.
What to do when styling or functions break (which will happen for 95% of you). Disable the optimizations and re-enable one at a time – test each change. Do one with just CSS, then another with just JS. Sometimes, it’s only one CSS or JS that’s causing the problem. Find out which one it is and exclude it from combining:
Isolation Method #1 – with combine CSS/JS on, open your site in Chrome > Developer Tools > Network (tab), and reload the page. Click the little red error circle to see which CSS/JS are missing. Exclude them and see if things work.
Isolation Method #2 – disable combine (and also caching), and scan your site in Pingdom. Sort the waterfall items by file-type (neatly displaying all CSS/JS). Now re-enable combine but manually exclude whichever CSS/JS you think is causing the issue.
HINT: whatever’s breaking is probably related to the problem. Did a certain plugin or theme function stop working? Try disabling those CSS/JS. Yes, it takes a lot of trial and error. It could be anywhere; maybe a plugin, maybe your theme.
TIP: sick of trying to isolate the issue? How about combining only the CSS/JS for the single most bloated extension? For most people, this is either the theme or pagebuilder. So combine all the assets for one thing and exclude everything else. It’s an easy way to get most of the benefit you’re looking for without the combine conflict issues.
What if you’re still having issues? What if your site seems fast but has a small FOIT or FOUT issue? What if your site feels even slower? This is why I told you not to do it!
71. Manually combine custom CSS (INT-ADV, LOW)
Another clever way of reducing unnecessary CSS requests is to disable all custom CSS enqueued by plugins and manually adding them to your theme custom CSS area.
Yes…if you’re combining all CSS into your theme custom CSS, you probably won’t need those “Add custom CSS” plugins anymore. Get rid of them.
If you’re lucky, some plugins have an easy checkbox to disable their CSS styling. Others you can only dequeue the CSS with filter code snippet placed into your functions.php. For plugins that don’t allow either, you can manually edit out the CSS call from the plugin (but you’ll have to re-do these hacks if you update the plugin).
72. Remove unused CSS styles (ADV, MED)
You can lighten your CSS by removing all unused styles. Simply go into your theme or plugin CSS and delete anything not used. It’s common to have themes and plugins with redundant/unnecessary styling for the same elements. Probably helps to make screenshots of your site page templates in desktop and mobile before you edit.
Unused sections.
Unused blocks or elements.
Unused buttons or icons.
Unused tables.
Unused typography.
One thing to note is that if you’re removing from your theme or plugins default CSS, they might come back if you update your theme/plugin later.
Check all site templates on frontend. See which scripts they load. See which parts are obviously unused. Usually, there are many design elements of the theme/plugin that you never use. Start commenting styles out and then fully delete after a month if your site has no issues. Or make a backup and delete on the spot, up to you.
73. Remove unused JS scripts (ADV, MED)
Good luck trying to do this. It’s damn near impossible unless this JS was custom-written by you. The reason why many sites load unused JS is because it’s loading JS for all the features available in your themes/plugins (yes, even the ones you don’t use).
So sure, you can try to remove them manually but that means your theme or plugins might break if you change their settings or options later. There really isn’t any way except to do a code-refactor and how the heck are you going to do that? That’s the theme or plugin developer’s job.
What we can do is perhaps diagnose your site and see how much unused JS there is. And with that, you can find where the bloat is in your theme and plugins and which ones to replace.
If you got the skills, you can take it a step further by rewriting your entire CSS from scratch. Carefully cleaning and reorganizing the styles to make it easier to read and lighter to parse. In moments like this, you can even rethink your design to make things simpler.
75. Javascript async and defer (ADV, MED)
There’s a lot of talk behind JS async/defer tactics, but they aren’t always used for good reason. And it doesn’t help when annoying page tests make generic recommendations for users who don’t know how JS works.
Not all javascript should be async or deferred!
Any JS used for ATF items should be left alone.
Any JS not used for critical elements should be deferred if you don’t need their functionality immediately.
JS async can be used as long as you test first.
The problem with speed tests is that they try to improve page scores at all costs. They don’t know what your JS is specifically used for so they make silly blanket suggestions that might actually hurt your page load!
Deferring JS will delay the visible effects or functions reliant on them!
AJAX (autofill) search functions – defer is ok.
Conversion tracking – do you want to start tracking sooner or later? (I like later.)
Chatbox – for sales/support. Deferring makes sense.
Content-rendering – do you have special pages or content relying on JS? If that specific content is important or near the top of page, don’t defer.
Link plugins – do you have specific JS for rendering affiliate links? I think defer is ok.
Pop-ups – defer is better.
Security functions – any JS that applies captcha or prevents right-clicking, or any other security. I think deferring is ok.
Sliders or image animation – terrible idea if they’re at the top of your site! They’ll load slower if deferred!
(Probably a good rule never to defer visible elements near the top of your page.)
What’s even funnier for me is that you could just manually “defer” things yourself by putting the code in the footer instead of the header. Things like Google Analytics can be placed later and it will load later (after all HTML has been parsed). So if you really think about it, the only reason people use JS async/defer is to optimize the load for any JS automatically placed in the header. And if it’s placed there, don’t you think it probably means it should be loaded earlier???
So like I said, be careful what you async/defer! If you wanna play with it, test carefully. But in general, I prefer to leave them untouched to be safe. There’s no point in scoring higher on a page test but your certain site elements or functions loads slower. JS makes little impact on well-coded sites.
76. How to minify HTML, CSS, JS (BEG, LOW)
Code minification decreases file sizes by removing all spaces and unnecessary code comments. This results in fewer bytes sent through the internet without any loss of function. It’s a win-win all around!
Small sites don’t have much to benefit from minification.
Larger sites will benefit more (especially for slower mobile visitors), but even then minification doesn’t help much once your CSS/JS is browser-cached anyway!
My only issue is with how this code is minified.
Through a cache plugin – ok for small sites.
Through specific CSS/JS optimization plugin (Autoptimize) – better option for large sites.
Through a CDN – best and easiest method, IMO.
Most people do it through a plugin, either cache plugin or one of those “performance plugins” (Autoptimize) that specialize in combining and minifying your CSS/JS. The cache plugin is most convenient and works fine for all sites. But if your site is big with many pages, and/or lots of traffic…you’ll get better results with a dedicated CSS/JS optimization plugin. They have more feature, more control, and best of all…they save you a lot of server load when you purge cache (since your cache plugin doesn’t have to rebuild CSS/JS when page cache is rebuilt).
The extra load on cache prebuild is bad if you have a big site (and minifying with cache plugin). Every time cache purges, it completely rebuilds all pages and CSS/JS. It’s fast on a 10-20 page site but awful if you have many pages and different page layouts.
The extra load can also be bad if you have low traffic (and no cache prebuild). Since uncached visits will take longer to load (thanks to the extra task of minification).
The easiest way to minify is enable it from your CDN (so it processes on their severs) instead of slowing down your web server.
I only enable minification from Cloudflare. I don’t use it from any plugins.
Enabling it is easy. Just check the boxes.
77. Lazy loading images (INT, LOW)
I hate lazyload as a general tactic. It makes your site appear faster to page tests, but loads images slower for human visitors. This is terrible UX! If you’re going to use it, you have to know which things should be lazy loaded and which things should not.
It is SAFE to lazy load images below the fold but NOT if your site has many fast-scroll users (like shopping sites).
It is NOT RECOMMENDED to lazy load any images at the top of the site (header, banner) obviously since that makes them appear slower to visitors.
It is NOT NECESSARY to lazy load images if you don’t have many or if they’re small.
In optimizing many sites every week, I can assure you that 99% of them would look faster without lazy load. It sucks that most sites can’t control which images lazy load or not. Currently, it’s either an ON or OFF setting in cache plugins. No granular access. Native lazy load is available in recent browsers through attributes to specify “lazy” (on) or “eager” (off) or “auto” (browser determines). But if you want to make it easy on yourself, I suggest not lazy-loading.
So lazy loading doesn’t speed up page load? – nope! It delays it. Your site only gets higher page scores because those don’t trigger your images to load like real visitors will.
But doesn’t lazy loading decrease bandwidth use? – yes but that’s not much benefit unless your images are huge or you have that many of them.
Doesn’t lazy loading help by loading fewer things? – it doesn’t load fewer. It loads the same but delays them. If your user doesn’t scroll, it helps. If your user scrolls, it hurts.
There are several plugins out there (usually called “asset optimizers”, “asset organizers”, or “plugin organizers”) that can decide which pages will allow which CSS/JS to load. Some organize by plugin, disabling PLUGIN activation on the pages you choose. Others organize by CSS/JS, disabling CSS/JS load on the pages you choose.
They are a lot of work to configure and cause problems for your site if you’re not careful. You also have to be careful which ones you choose. Some are written well. Others are terrible because their plugin adds its own load overhead, which defeats the purpose! If you insist on messing with these, research them for yourself and good luck.
Don’t try to remove every little thing off every little page.
Focus on the heavier plugins and CSS/JS.
Focus on your slower pages and more important pages (like Home or Cart/Checkout).
Generally, I recommend you not to use any of these plugins and to just pick lean plugins in the first place. I don’t use these as I like to optimize manually.
79. Deploying a CDN aka “content delivery network” (INT, MED)
Do you need a CDN? If your traffic is local—NO!
Try Cloudflare for easiest free CDN. (Great for beginners and many sites.)
Want better performance than Cloudflare? Try BunnyCDN (still low cost).
Need CDN for large files? Try S3 and Cloudfront!
Want a more aggressive “push CDN”? Look it up!
Some CDNs cover certain geographical areas better than others.
Network latency time is a common area of slowdown in delivering static assets (images, css, js). Faraway visitors have to wait 1-3 secs longer to receive requested assets. But if you use a CDN service, the files load faster since they’ll come from a mirror server closer to the visitor. That’s all a CDN service really is, a company with multiple mirror servers all over the world. How they differ is in their pricing, features, and performance around the world.
If you don’t know what you’re doing, just get Cloudflare and be done with it. It’s free and works well enough. If you want to venture down the rabbit hole of CDN’s. Just know that there are 2 kinds of CDN’s:
Pull CDN – the dominant method since it’s less hassle for users. The first visitor loads the CDN (experiencing delayed page load) but all subsequent visitors get faster speeds. Sites with low traffic may feel it’s not worth it, since CDN cache expires before next visitor arrives.
Push CDN – higher performance since files are manually “pushed” to the CDN’s mirror servers by you or your CDN management plugin. With push CDN’s, no visitors will ever experience a “slow CDN pull”. Downside is it’s more management to push files and things can break or look incorrect if visitors reach a site CDN missing updated files.
Traditional CDN’s vs Cloudflare
Technically, Cloudflare is not a CDN but has CDN-like features. It’s actually a DNS service. You enable it by pointing your domain (from your registrar) to Cloudflare’s nameservers. Then manage your DNS functions from Cloudflare, pointing it back to your webhost and enabling Cloudflare’s performance/security features.
Traditional CDN’s work by supplying you with a domain zone (like “123yourdomain.maxcdn.com) where your assets are mirrored. Then you configure your site to load all static assets from this zone. You can also mask that CDN domain behind yours (like “cdn.yourdomain.com”).
Both traditional CDN’s and Cloudflare can be managed by a CDN plugin on your site. You can also manage them from your cache plugin (most convenient). This way, your cache plugin purges both server cache and CDN cache at the same time.
80. Cloudflare optimization (INT, LOW-MED)
There are many little optimizations you can do with Cloudflare aside from just enabling a CDN. There are also some settings you shouldn’t touch (because they potentially break your site or hurt performance). Please follow my guide:
Yes, I think you should use Cloudflare even if you don’t want their performance/security features. You can use them only for DNS functions. Their proxy is easily disabled from the DNS tab; just turn all the orange clouds to grey.
81. Hosting videos locally vs externally (INT, HIGH)
Don’t host videos from your server (especially if you need them to load fast) OR you have high traffic or large videos.
CDN can help serve locally-loaded videos.
Video hosts (Youtube, Vimeo) can make external-hosting cheaper.
S3 or Vimeo are great for hosting private videos.
If your video is auto-played on page load, you need the fastest load possible. I don’t recommend loading them from your server since that can quickly run up bandwidth limits and slow down your server.
CDN – less technical work as your videos still sit on the server. CDN will serve the video quickly worldwide, but can get expensive if you have big videos and/or lots of traffic.
Free video hosting (Youtube, Vimeo) – low cost, integrates with video community, but loads slow external scripts. You can get around the external scripts using iframe-lazyload but that won’t help for auto-play videos.
Paid external hosting (S3+Cloudfront, Vimeo business) – costs money but gives you more control over how your videos look and also allows you to make them private, only viewable from your sites. (Good for members-only content.) Some services like Wistia, are really expensive but come with conversion-tracking features and other junk, hahaha.
Hosting videos elsewhere is always a great idea. The only issue is making sure they load fast enough and don’t run up your bills. Storing them in S3 is handy if you like having control and flexibility over the videos.
S3 is great for integrating with other software, like ecommerce or download management, but requires more technical work and can costs money.
S3 is good for video downloads and streaming, but can be slow for overseas users. Therefore, you should always integrate S3 with Cloudfront CDN!
S3 and Cloudfront are both Amazon AWS, making them easy to integrate.
Vimeo paid plans are absolutely awesome; I love them, too. Easy to generate featured images (using plugins), easy to put into your content (it just embeds). Can control which domains it shows on. Comes with nice video reports, counting views, other user tracking.
My last note is that if this video is on your home page right at the top…it’s probably worth testing different methods to see which one loads it the fastest. Maybe from your server, maybe S3 + Cloudfront, maybe Youtube/Vimeo…who knows, test it! All other non-essential videos, their slowdown is more because of the video player than the actual video itself. And for those, I have more tactics. 🙂
82. Hosting large files (INT, MED)
Just like with videos, you should not host large files on your server at all. Even if they’re seldom accessed or downloaded. Just one person downloading a 1gb file from your server is enough to slow down your regular web-traffic. Also, it’s more sensible not to have giant files on the server when doing site backups (waste of space).
Use S3 to store the files.
Combine it with Amazon’s Cloudfront CDN feature if you need faster download speeds to visitors around the world.
Large files for me is anything above 50mb. If you have just one 200mb that rarely gets downloaded, ok fine. If you have a 1gb file or many 200mb files…probably not.
Some servers are stronger than others, right?
83. Managing a large media library (INT, MED)
Some sites have such a massive media library (tons of images) that it no longer fits on the web-server. This is a performance issue because the web-servers disk is usually the fastest and most convenient place to retrieve website files. Putting your images anywhere else is likely to be slower retrieval.
You have a few choices in moments like this, each with pros & cons:
Upgrade the server plan – easy way to get more space and better performance without changing your site much. But costs more and still might not be enough space.
Offload to S3 – using the fantastic WP Offload Media plugin. It allows Cloudfront CDN integration, too! I love this method but some people might not like the cost.
Add block storage – theoretically fast enough for application-use and also affordable ($1/month per 10gb) but I feel like it’s messy and not all that flexible. Sure you can mount it to just some directories or even the entire wp-uploads directory.
ORRR you can just delete unused media sizes if you want to quickly shrink your library. I’ve seen sites go from 100k to 10k images with no design changes!
Yes, there are alternative plugins that do what WP Offload Media does, but none of them with the same respect as its development team (Delicious Brains).
8. External asset optimization
Optimizing external assets is very difficult if not impossible. These are all the files that load from somewhere other than your web server (thus “external assets”). This can be webfonts (Google fonts) or font icons (FontAwesome), images, JS scripts for Google Analytics, JS for conversion tracking (Facebook Pixel, Hotjar), JS script for affiliate (Amazon), JS library, JS script for Youtube (or Vimeo), embeds like Facebook box or Twitter, JS for social media share counts, and on and on and on.
The hardest part about this is that their servers aren’t always the fastest (no duh, a free service is not gonna dedicate all server resources to you) and their files aren’t always the lightest. You may have seen complaints from page tests about them not being browser cached for long enough, or being too big, etc. Whatever the case may be, you have little control over files that aren’t loaded on your server!
So what can we do?
Load them locally.
Load them early (aka “prefetch”).
Load them late (aka “defer”).
84. Audit all external requests (INT, MED)
Do you even know what’s loading externally from other domains? It’s funny but I see many clients unaware of all the external calls made from their site. To check: open up your Developer Tools, click on “Sources” tab and load all your site pages.
Common (unexpected) external requests:
Absolute urls – to your own page. Technically not an external request but try to use relative urls. If you’re doing for outdated SEO tactics, stop it.
Stock theme images – default images linked from the demo site (even when they exist on your site).
Old conversion scripts (Hotjar, Pixel) – that you stopped using but forgot to remove from your theme files.
Unnecessary crap – any images, CSS, JS scripts or libraries, loading for things you don’t even use.
85. Load simple assets locally (INT, MED)
Anything simple enough for you to load locally, do it.
Images, CSS, JS…copy them to your site.
86. Load webfonts locally (BEG-ADV, HIGH)
As I’ve already explained, you can load webfonts locally to reduce their speed impact.
Best if you can do it manually (and also to subset out unnecessary stuff).
Don’t use FontAwesome! (use other ways to show icons)
Btw, Swift Performance cache plugin has a cool Critical Font option to optimize for Font Awesome.
87. Load Google Analytics locally (BEG, MED)
There are tons of hacks out there. Some of them do excessive stuff like cutting down the JS file to the bare minimum or loading the GA script from public CDN (jsDelivr). Other methods are tedious hacks liking copying the GA script to your server and running cron commands to keep it updated. I think that’s fine for totally small sites without any conversion tracking. But otherwise…keep it simple and use CAOS plugin (my favorite).
Flying Analytics plugin – built by Gijo to locally-load GA. Has 3 useful settings depending on your GA use.
88. Lazy loading videos (INT, HIGH)
You can use the “lazy load iframe” feature in your cache plugin.
Do NOT lazy load any videos at the top of your homepage!
If you’re embedding videos through Youtube, Vimeo or other iframe, there are plugins that not only lazy load it but also have extra features:
Load only on user interaction – mouse move, scroll, or mobile touch. Great idea!
Lazy load sensitivity – loads the iframe once the screen gets close. Great idea!
Pseudo image – loads an IMAGE of the video player with fake play button, and only loads the real video if clicked. Very clever! (Usually only compatible with Youtube, some can do Vimeo as well.)
(Many of these can be found in Swift Performance.)
Even if you don’t have all those fancy features in your cache plugin, just being able to lazy load iframes alone is a huge difference. Another way you can manually hack things is to show a fake image of the player which then opens up a lightbox modal with the video inside. Anyway, I’m sure more native browser lazy load is soon to come.
Regarding best plugins to do the pseduo video image effect, I suggest you test on your own. Try search the WP repo for “video lazy load“.
If there’s any concern with lazy loading, I do wonder if it affects your SEO since crawlers don’t see the video loaded. Who knows, right?
89. Google Maps optimizations (BEG, HIGH)
Don’t be one of those newbies loading the Google Maps box right on your site! It slows your site down by a lot!
Put an image of the map instead, then link to Google Maps from that image or from some text under it.
Or use “lazy load iframes” option from cache plugin to delay the Google Map load.
90. Social media integrations; Facebook, Twitter, Instagram (BEG, HIGH)
Have you ever wanted to show the Facebook like box right on your page? Just don’t! It lags like hell. Will cost you a solid 1 second. If you want, put it on a specific page but not your home page or global widget!
Same goes for Twitter box.
What about an Instagram stream? For whatever reason, those have been less laggy for me. I like the Social Feed Gallery by QuadLayers.
What about Facebook Pixel? Sorry guys, I don’t have any methods yet.
Unless these boxes are your main page content….trust me, you don’t need it. It’s not worth the tremendous slowdown they cause, especially on mobile devices.
Still insist on having a social feed on your site? Maybe this Social Feed Cloudflare app can help.
91. Comments and Gravatar (INT, LOW-MED)
Comments are a problems most people don’t have…until their blogs get popular and there’s hundreds or thousands of comments. In fact, even 100 comments on one post is enough to chip away at your page speed and start making your site less fun to visit. We have a few concerns to look at and different ways of tackling them.
Which comment system to use? And how they deal with 3rd-party assets.
The built-in WordPress comments system is fast and free but loads all at once. This can be annoying if you don’t want all 500 comments (and their Gravatar) loading on one page. It’s not only a speed issue but a design issue. Of course, there are work-arounds.
On my busiest site, I put a button to [LOAD COMMENTS] on mobile, so users aren’t intimidated by a giant scrolling page on their phone.
You can also use alternative avatar systems, or cache your Gravatars (via cache plugin or specific Gravatar cache plugin).
Or not use any comment avatar at all!
I personally prefer native WordPress comment system.
Disqus is a 3rd-party commenting system that’s no longer free, but has lots of engagement features and looks nice (styled cleanly, and only loads recent comments). The big con aside from the price is that it loads 3rd-party assets on all pages even if they don’t have any comments.
The Facebook comment is also a great option and FREE. It’s fantastic for getting tons of engagement and doesn’t show all comments at once (like Disqus). It also racks up your Facebook share count number with each comment. I only don’t like it because of the external loads.
Please, no Thrive Comments! If you’re attracted to Disqus you might consider Commento but beware (you can’t migrate there natively from WordPress, yet…you have to pass through Disqus first).
92. Deferring chatboxes (BEG, MED)
Many of you have slow page loads because of your (sales/support) chatboxes. These aren’t related to your page design and shouldn’t get in the way. Luckily, they’re easy to deal with.
Manually put the code in the footer.
Defer JS – most cache plugins have this.
Lazy load JS – Swift cache has this. It’s fantastic.
93. Speeding up email forms (INT, MED)
If you’ve got newsletter forms on your site to integrate with email marketing services (Mailchimp, MailerLite, etc), you’ll notice many of them load annoying 3rd-party scripts. Some of these JS are for form security (preventing spam registrations), others are for other functions (like conversions).
Here are my tactics for dealing with them:
Don’t load email forms globally – don’t put them on every page! I also hate them from a UX point of view (annoying users). You can try just a “SIGN UP” button or link that redirects them to the newsletter page. But yeah, that might affect your conversions and take them off the page.
Use a form that doesn’t need external JS – some email services can do it.
Load the form locally – but risky if it stops working one day!
Always manual embed – instead of automated through a plugin.
Ultimately, the service you pick will determine your options. Some have JS-free options. Others require JS no matter what.
But please don’t install a performance plugin just for DNS prefetch.
A great tactic for speeding up external asset calls is to speed up their DNS wait times. What slows down external assets is usually the network latency time to send a request to the 3rd-party server. The file itself may be very small but the network time is what delays it. By putting a DNS prefetch to external domains, your server makes the HTTP request earlier during the site load so the asset loads quicker when it’s needed.
Or to get a full list – open up your browser’s Developer Tools > Sources (tab).
You should browse several pages of your site to make sure you get all the common ones.
Only prefetch the root domain/subdomain, not the entire URL.
Also not necessary to preload all domains that you see.
Be careful of ad-related domains that change on each page load. (You shouldn’t prefetch these.)
95. DNS preconnect (INT, LOW)
“Preconnect” is the lesser known brother to “prefetch”. Arghhh, here’s comes an explanation:
preload – preloads assets for the current page.
prefetch – preloads only the DNS call for the next page.
preconnect – preloads the DNS call, TLS negotiation and TCP handshake…for the next page.
Preloading shouldn’t be used as it can eat a lot of resources and doesn’t make sense for WordPress unless you know exactly why some assets need to be loaded first (and can’t be prioritized in other ways). Prefetch aka “DNS prefetch” is a safe low-resource way to preload calls, and heavily supported by browsers. It conveniently establishes the DNS connection so assets coming from external domains will be downloaded quicker when requested.
Preconnect is like prefetch but does a little more (it establishes the TLS/TCP connection as well as the DNS) but isn’t as popular for several reasons. One is because it wasn’t supported by as many browsers. Another is because there’s a simultaneous connection limit in most browsers. Ultimately, you have to decide what’s most important to preconnect, and the rest can be prefetched.
Limit preconnect only to priority connections.
Some sites do preconnect before prefetch. Others do opposite but also prefetch the preconnect-ed ones. Some also put prefetch in the same tag as the preconnects.
I probably wouldn’t preconnect more than 4 domains. Prefetch, you can do as many as you want.
I personally don’t bother with preconnect. Only some very big sites do.
It’s relatively new and I haven’t played much with it. But it looks extremely promising! The new Cloudflare Apps allows developers to create applications and services that integrate at the EDGE-level (aka “DNS”) rather than at the SOFTWARE-level (aka WordPress, php). This opens up a wide range of possibilities because:
The applications/scripts are loaded from Cloudflare servers! (Making them faster.)
It’s less work for developers. Their app can be applied to any website (not limited to any CMS, or WordPress).
Tawk.to, Facebook (chat/like/comments), social feeds, chat boxes, forms, support, media, etc.
There are so many!!!
Really incredible stuff as they don’t load anything from your server! No plugins to install or configure. Just enable from your Cloudflare account. Amazing! (This could completely change the game not only for how future applications and services are integrated with websites, but make slow websites a thing of the past.)
9. Security optimization
Hacking and cyber attacks can cause massive server performance problems if not outright interruptions. Many people have no idea how often servers get attacked because they never see the logs. I can assure you every server will get attacked several thousand times (sometimes in one hour) every month. Your site might even be attacked right now but you just don’t know it.
Securing against these attacks requires a delicate balance. You don’t want a server that lets hackers freely bombard your ports and resources. But you also don’t want a server that’s too secure and excessively auditing all traffic that it slows your users or worse (it blocks legitimate users). Of the recommendations below, follow the ones you have access to.
Servers hosting only you and/or few tenants:
Easier to secure because there are fewer sites to invite hacking and you can safely disable many ports without affecting your sites.
Harder to secure if you’re managing it yourself and lack experience.
Servers hosting many tenants:
Easier to secure if there’s admins already monitoring the server. Many common attacks already secured against.
Harder to secure if many services need to be open for different client use cases. Therefore, more sites and open services to invite hackers.
97. Shutdown unnecessary server services (ADV, HIGH)
You can think of unused services as unused phones or email accounts. They sit around eating up resources (MEMORY) and take up your time with unwanted connections (SPAM, HACKERS). Whatever you’re not using, disable it from your server!
DNS – disable if using external DNS server. (Cloudflare, DNSME, etc.)
Email – disable if using 3rd-party email. (G-Suite, MXroute, etc.)
FTP/SFTP – disable if not using.
Other proxies – like Varnish.
Many of these services are enabled by default with your server stack or control panel. You can read their documentation to get a list. For services that need to be running, you can limit their exposure to bad traffic using firewalls.
98. Server firewall configuration (ADV, HIGH)
Most default firewall configurations are set too lax to avoid causing issues. You should jump in there and block off as much as possible. Some example logic below:
Ports used by specific people (SSH, FTP) – only you or a few others. Do an IP whitelist and block the rest.
Ports used by certain country (POP3, IMAP, FTP) – if some services are only used from within one country, you can block all other countries. Be careful though as someone traveling will lose access!
Ports attacked only by certain country – if you have many attacks coming from certain countries or regions, you can ban by country or entire IP ranges.
There are many server firewalls out there. Each with their own pros and cons and recommended for different uses cases. You can read up online how others use and configure them. It’s easiest to start with the default one that comes with your stack.
99. Server brute force protection (ADV, HIGH)
Brute-force protection is like a smart firewall. It leaves services and ports open but automatically bans the obvious offenders.
It automatically bans anyone putting in the wrong authentication, or using blacklisted generic user-names, etc.
They’re easy to set and very powerful. Just be careful that they don’t block legitimate users/traffic. You can see what brute-force or DDOS protection came with your server and enable it. Maybe don’t set it so strict if you have many users on this server.
100. Brute-force protection on wp-login.php (BEG, HIGH)
The WordPress admin login page is often bombarded by bots trying random user-names and passwords to get through. While they might not get in, their constant attempts eat up lots of resources. There are several ways to prevent them, each with their pros and cons.
Server-level brute force protection – easy and efficient but can lockout legitimate users on busy servers with sites using Cloudflare. Problem is brute-force lockouts block by IP and visitors coming in through Cloudflare all share the same (proxy) IP. Sure, you can configure to pass true client IP through Cloudflare headers but this slows down page load!
Application-level brute force protection – many WordPress security plugins can do this. They secure the login page by banning users with bad credentials.
Some plugins hide the login page – moving it to a different URL. Just make sure the standard login URL is either blocked or cached to prevent visits on it from using resources.
Other plugins protect the login form by putting a captcha and banning certain robots, crawlers, devices. This can work well but might annoy or false-flag legitimate users.
Only server I know with native brute-force protection on wp-login.php is LiteSpeed. All other servers (Apache & NGINX) will have to enable it with either a security plugin or http auth.
101. HTTP authentication (BEG, MED)
Do you have specific pages being bombarded and no convenient way of blocking access to them? HTTP AUTH is a quick-and-dirty way of locking out all users. Only problem is it’s a slight hassle for legitimate users. Most guides show you how to protect the wp-admin directory but you can protect other frequently-visited ones as well.
The XML-RPC protocol allows external apps (like mobile apps), to log into your WordPress and edit content or view WooCommerce sales. Unfortunately, it’s often exploited by hackers and bots brute-forcing their way into your site.
If you don’t use it, disabling XML-RPC prevents server slowdowns caused by the thousands of XML-RPC hack requests.
If you need to leave it on, you can whitelist your IP’s (and also for Jetpack, if you use it).
103. Security plugin configuration (BEG-INT, MED)
If you don’t have access to your server, you can use security plugins. Yes, security is more efficiently run at the server level (closer to raw computing power) than at the application level (slower PHP processing)…but sometimes, it’s hard to set global security rules when you have many clients/sites and each one needs something different.
Nonetheless a software-level security plugin like WordFence is still a useful option to block attacks that the server doesn’t, and/or prevent hacked sites from doing more damage.
Most important feature of security plugins IMO is malware scanning. Scan manually or schedule during low-traffic hours. This feature doesn’t necessarily improve website speed, it detects system exploits and prevents them from using up resources (hosting spam sites or attacking other servers).
The firewall features on security plugins probably aren’t needed if you have a server firewall already. Firewalls activated at the PHP level slow all incoming requests.
The performance problem with security plugins is due to A) over-aggressively filtering all incoming traffic, and B) scanning too often. Both eat up many resources especially on large sites with many pages and visitors. I suggest not using software firewall, and also to set your malware scans to a slower speed.
104. DNS edge-level security configuration (BEG, MED)
Remember how I said that security is more efficiently done at the server level than at the application level? Well doing it at the edge level (DNS-level) can be even more efficient than at your server level since it’s using someone else’s servers. There are some performance implications between dealing with security at the edge VS on your server. You can decide what works best for your use case.
Dealing with security on your server can be more convenient since you have more control. You can optimize for your specific use. Only downside is it uses your server resources and also that you need admin skills.
Dealing with security via another server (like DNS proxy, Cloudflare) or security service (Sucuri) saves your server precious resources but might add slight load delay issues since visitors are passing through an extra proxy before reaching your web-server.
The weaker your server and server-admin skills, the more likely a security service is more efficient at blocking DDOS requests. Then again, for a smaller site you might not have so much security problems. Whatever you do, don’t try to put overly-aggressive DDOS security at both levels (DNS & server). This can cause false-positives where legit visitors are blocked because all visitors (good and bad) share the same IP when coming through a proxy.
Most people don’t have to worry about DDOS attacks, ok?
Most lower-level DDOS attacks are easily handled by your server.
The highest-level DDOS attacks are the ones that overwhelm servers (even with good security) but they cost money and concentrated effort from hackers. Unless someone is specifically targeting you, you don’t have to worry about them.
Easiest way to deal with high-level DDOS attacks is to immediately sign up with a dedicated security company like Sucuri (when it happens).
I don’t recommend paying for fancy security services that you mostly won’t need.
105. HTTPS and HTTPS redirect (BEG, LOW)
You should absolutely be using HTTPS. (It’s the only way to get the benefits of HTTP/2 protocol.)
Put 301 HTTPS redirects on your server so visitors are quickly redirected to the proper HTTPS protocol and correct domain version of your site (with or without “www”). Without these server redirects, WordPress can still do it but it takes a little longer.
Also, don’t forget to make sure all your internal urls are using HTTPS (follow step 3). Don’t rely on SSL plugins (unnecessary) or WordPress (slow) to redirect you. Set the redirects from the server!
Bonus tip: if using Cloudflare, set a page rule to do your HTTPS 301 redirects from there as well. (Even faster than from local server!)
106. Web Application Firewalls, aka “WAF” (INT, MED)
WAF are enabled through your server security stack.
The easiest way to block bots without any performance loss is manually through htaccess or global server config. But this can be too much manual work when managing many sites. Therefore it’s safer to have WAF for them.
If you’re using ModSecurity, check out these ModSecurity performance tips from Trustwave and Packt.
You may also enable a high-performance WAF through Cloudflare security rules, or 3rd-party paid security services…like Sucuri.
Most people don’t know the difference between network firewall and web application firewall (WAF). Network firewall is for opening and closing ports. WAF is for blocking bots through open ports. You have to be careful with WAF security because it can slow down your server since it checks all incoming traffic (regardless of good or bad). Due to performance reasons, I mostly avoid WAF if I can but my style of server management might not be feasible for others.
10. Bad optimization (tactics)
All the unnecessary, illogical or outdated optimization advice passed around on the internet. Listed here (along with my thoughts) in case you were curious. Some sites are slow because of their users!
Most of these tactics are bad because:
They don’t fix the root problem.
They don’t increase speed. Some make it worse.
They are outdated/irrelevant for today’s technology.
Can break your website design or functions.
Increase your server load.
Make nearly unnoticeable benefit if any at all.
Only work in limited scenarios.
Only give you better page scores, but make the user experience worse.
Their benefits don’t outweigh the disadvantages.
Bad webhosting optimizations:
107. Horizontal-scaling (adding more servers).
Scaling will never be faster than running all services locally (off one machine). Chaining servers together means your data has more proxies to jump through.
Horizontal-scaling is meant for preventing high-traffic from slowing down your base speed. It can’t speed up a low-traffic environment.
The only scaling that increases baseline performance is vertical scaling i.e. “upgrading server resources” like CPU, memory, disks, etc.
108. Buying an expensive server.
This is a bandaid way of fixing a slow setup.
The extra money you spend on hosting could easily pay for better recoding.
If your site has little traffic yet needs a $300/month server to be tolerable, just fix the code!
Expensive servers are noticeably faster for dynamic load only (admin pages, checkouts). If your site is cached effectively, it makes no difference.
109. Optimizing for speed tests and page scores.
Did you know that optimizing for high page scores can sometimes give you a slower site? (It’s true!)
110. Deploying caging tactics for low-tenant servers.
Many people read random guides and tactics (like installing CloudLinux/CageFS) for servers and think it actually helps them.
Most of those guides were written for high-tenant busy dedicated servers. And not relevant to this new age of affordable VPS with only a few sites.
Caging tactics will slow down your sites because they limit resources.
Bad theme optimizations:
111. Using overly minimal themes.
If your theme is so empty that you have to load bloated pagebuilders and extra plugins to get the desired look, you might be defeating the purpose of a lightweight theme in the first place!
Maybe consider a nice child theme or prebuilt site design for Genesis or GeneratePress.
Maybe consider Artisan Themes.
112. Switching to static CMS (instead of WordPress).
They can’t do all the fancy designs and functions that WordPress can.
Switching to static CMS actually requires more development skills!
Bad plugin optimizations:
113. Installing multiple performance plugins.
The only one you need is a cache plugin.
Do not install multiple performance plugins! (Browser cache, disable wp-embeds, CSS combine, lazy load, etc.)
Don’t install “booster” plugins for other plugins, either. They’re likely using autoloads (memory) to speed it up…but that only speeds up the specific plugin at the expense of your entire site load.
114. Using (conditional load) plugin organizers.
If you have to tell plugins not to load on pages where they aren’t used, it’s probably not a good plugin in the first place.
It’s best if you just remove or replace those plugins.
Bad image optimizations:
115. Lazy loading images.
Yes, I’m aware my belief goes against what many people think.
Sure, it gets better page scores but slows down the user experience.
Sites always look better with it off!
116. Over-compressing images.
Don’t over-do it to the point that they look ugly.
Maybe make them smaller?
Or if you lower their quality, darken them and put text on top so it’s less noticeable.
117. Excessive inline SVG’s.
It’s fine if you have like 1 or 2.
Any more than that and you’re just making your HTML bigger.
SVG’s are almost always not critical items.
AND they’re usually loaded on every page. Let them be separated requests from the HTML so they can be browser cached.
If you really want lighter weight, create a custom icon font!
118. Leaving image compression backups on the server.
If using image compression plugins, delete their backups off your server to keep it light.
If you want to keep the originals, download them to your computer.
119. Media cloud hosting service.
Did some fancy company convince you to offload your images to S3? And use their fancy CDN service to “load your images faster?”
I can assure you it’s a dumb idea. Image assets will most likely load faster from your origin server than through a slow external storage server like S3.
S3 is basically only a last-ditch effort if you run out of space on your server and don’t want to pay for an expensive server (with fast disks) elsewhere. Let me repeat, S3 is slow storage.
And it’s because that S3 is slow that those media-cloud plugins and services feel the need to add a CDN to it. Don’t let them fool you. Loading images from a slow external storage through a CDN proxy is going to be slower than loading off your origin server.
If you can, load from your local server. And if needed, use a CDN with your local server.
The only time this external storage & CDN method is ever useful is if you have heavier video files or so many images, or you want to save money, or you have so much traffic that your CDN is always warm.
I would also add that if you’re going the external storage route, you should use a more proactive push-CDN than a pull-CDN.
Bad caching optimizations.
120. Enabling every feature on cache plugins.
Don’t be the idiot breaking their site with cache plugins.
Don’t enable separate mobile caching or AMP if you don’t have it!
Don’t cache private or logged-in users unless you have to.
Don’t cache WooCommerce cart sessions (it’s almost never needed).
If you don’t understand a feature, check the documentation or ask for help.
Use only what you need. Less is more!
121. Enabling object caching when you don’t need it.
It’s only meant for dynamic pages.
If all pages are static, using object caching can slow it down.
Unnecessary object caching can also eat up memory, improperly configured object caching can serve old data.
122. Browser caching for too long.
Browser caching is usually intended for static assets that rarely change (images, CSS, JS).
Safe settings can be 1-7 days so they’re not downloaded again if the same browsers revisits within that time period.
Aggressive settings can be up to 30 days or even 1 year.
The problem is if you change the images or CSS within that time period, some users will see the old version.
123. Preloading pages.
Clever tactic of preloading pages before you click on them! (Then they appear instantly when clicked.)
Some will preload all available links. Others guess or preload only what you hover your mouse over.
There are many technical implications regarding preloading…such as extra server requests (for items not even clicked), screwing with conversion/affiliate tracking, accidental self-DDOS, can even break page design or functions because of CSS/JS loaded at unexpected times.
My biggest detraction is that they try to speed up sites by using extra server load on a server that wasn’t fast enough in the first place. Sure, it can work on a slow server or bloated site if it doesn’t get much traffic. Anyway, be careful when you use it!
Can break site designs, delay initial response, increase server load, or even slowdown your sites. The benefits aren’t even noticeable (except for silly page tests).
The benefits are better on big bloated sites, but so are the drawbacks. Just test with it on vs off. (And test with your eyes, not via page tests.)
126. Generate Critical CSS.
Unless your site actually needs it AND you’re carefully generating the critical CSS, there won’t be much benefit.
Often slows down your site load, break styling, or create FOIT/FOUT issues.
The only effective way to generate Critical CSS is to do it manually. But most people don’t have that skill and do it via automated plugin (which often includes unnecessary styles and misses necessary ones).
What’s the problem if you don’t generate critical CSS perfectly?
A) your site doesn’t look right, suffers FOUC for a little bit and then finally loads everything.
B) doesn’t look right period
C) looks right but still loads too many unnecessary styles.
D) worst case scenario, you get some combo of multiple above.
127. Inlining CSS.
Mostly dumb idea.
Intended only for page-specific CSS, like simple 1-liners that don’t need to be an extra HTTP request.
Not intended for outputting entire CSS into the HTML. This adds extra load to each page that could have been globally cached.
Will actually slow down subsequent visits since that CSS has to be re-parsed again and probably not even cached.
This tactic is only for ultra-light pages with nearly zero styling. It’s terrible for speeding up bloated pages.
128. Removing query strings for CSS/JS assts.
Maybe some page test told you to do this.
But then what happens when you do it? CSS changes take forever to show on browsers that already saw your site (since they have the old version cached).
Good job, genius. Now you’re stuck with cache-busting issues.
This tactic is already outdated since most browsers and services (like CDN) can effectively cache assets with query strings.
If you still insist on it, at least wait until you’re absolutely done with the site design. Or else design changes will take longer to show.
129. Defer CSS or JS.
Another potentially stupid idea. (Usually done by users trying to avoid “render-blocking” warnings.)
It can delay critical CSS/JS used at the top of your page (like for sliders or other content effects).
If you’re deferring and delaying CSS/JS load for critical items, your page may get higher page scores but appear slower for visitors.
FYI: some assets need to be render-blocking for a reason. It’s because they control how the content looks. For example…do you want your carousel images to load BEFORE the carousel? Or do you want your text to load before the font? NO!…because it’ll look ugly or all jangled up!
130. Cache-all using Cloudflare.
Many have tried, many have failed.
Seems like an incredible trick until you realize some function broke.
I don’t recommend even trying this unless you have a simple site (that probably won’t need it anyway).
Rocket Loader – don’t enable this! It breaks stuff.
SSL/TLS on Full (strict) = don’t use this option as it makes your SSL handshake take longer. Just use the default option! It is fine and everything will look normal with the padlock.
HSTS – leave this off! It will prevent browsers from displaying your site if you ever have SSL problems.
Cache entire page with page rules – already mentioned above.
Completely unnecessary! Doesn’t help speed at all!
PS: Cloudflare can be used without its CDN functions. You can use it for DNS-only.
133. Using Google AMP.
The main benefit of AMP in my opinion, is better syndication and SEO through Google’s search engine results.
But I think it helps only for blog and news type of sites.
AMP is not a good solution for speed. It adds more complexity to your site and often breaks functions and design. Worst of all, it doesn’t exactly help your speed and makes your site (and server) work harder to cache things.
Brute-force security too strict – blocks legitimate users.
135. Mixing server security with Cloudflare security.
Can block legitimate users since all users coming from Cloudflare share the same IP. And if hackers trigger an IP ban, many legit users will be banned!
Be careful when using Cloudflare proxy with server security.
Not usually an issue unless you’re on your own server.
To clarify: the issue is usually for logged-in users, regular public visitors usually won’t have any problems.
135. HTTP Strict Transport Security aka “HSTS”.
Dumb idea! Very little benefit but god forbid you have any random SSL issues (SSL didn’t renew or missing after migration), your site will not load.
It’s a giant risk and always causes nightmares eventually.
Don’t you ever turn this on! I scream at all clients who do this.
What’s the secret to speeding up WordPress sites?
For me, it use to be finding endless tactics and places to optimize. And it worked. I was able to drop from 4 seconds to 1 second. Then 1 second to 500ms. Then 500ms to 380ms, then painstakingly chip off every 10-20ms. Major gains at this point were only 50ms.
…but this isn’t how the real world works.
Ain’t nobody got that kind of time.
Ain’t nobody want to spend that kind of money.
Speed optimization for the real world requires intuition. You have to be able to look at a site, smell it, and know right away what it needs. So you don’t waste a bunch of hours on tactics that make no difference.
The problem with most speed optimization tactics and speed-up services:
They use a general formula that doesn’t work for every site.
They do things the easy way, not the best way.
They don’t account for the user’s workflow and content intervals.
They don’t account for the type of webhosting (and it’s limitations).
They don’t account for the user experience.
They almost never do any manual optimizations.
They only strive for A+ page scores and lower total load times…which aren’t anywhere near as important as TTFB and content paint times.
Anyway, I hope this guide helps you. Or at the very least, helps you find people who can care for your site as much as you do. Speed optimization is a masterful art combining the skillsets of web developer, server admin, UI/UX designer, and website owner who’s actually owned a high-traffic website before.
Total blocking time is caused by long tasks (over 50ms) that block the main thread.
For WordPress sites, total blocking time is usually caused by unoptimized JavaScript and CSS (often from plugins, page builders, or third-party code) as well as fonts, animations, and images.
Optimizing JavaScript is a good place to start which you can use defer, delay, and asset unloading plugins to do. But if you want to improve TBT at the source, take a look at your JavaScript files and learn which elements on your site are causing high total blocking time.
1. Find Elements Causing High Blocking Time
GTmetrix Waterfall – brown bars represent blocking time.
Chrome Dev Tools – the Performance tab in Chrome Dev Tools shows total blocking time.
Third-Party Code – blocking time of third-party code can be directly measured in PageSpeed Insights. Often, this is from Google Fonts, Analytics, Tag Manager, advertisements, and videos.
Long Main-Thread Tasks – Google lists “minimize main-thread work” as one of the biggest factors of total blocking time. Find your worst main-thread contributors in PageSpeed Insights.
What Is A Good Total Blocking Time?
0–300
Fast
300-600
Average
Over 600
Slow
2. Defer JavaScript
Deferring JavaScript improves total blocking time by eliminating render-blocking resources.
WP Rocket and other cache plugins might let you “load JavaScript deferred” but Autoptimize and Async JavaScript do a better job (they fixed all but one render-blocking resource for me).
Install Autoptimize and enable optimize (and aggregate) CSS and JavaScript code.
Next, install the Async JavaScript plugin, head to the settings, and click “apply defer.”
This should disable “minify CSS and JavaScript” in your cache plugin and let Autoptimize handle it. Retest your website for render-blocking resources and ideally, your scores will be improved.
3. Delay JavaScript
Delaying JavaScript can also improve total blocking time.
This is usually done using the Flying Scripts plugin or WP Rocket’s delay JavaScript execution setting. It will delay JavaScript until user interaction which makes your initial load time faster.
If you’re using Flying Scripts or another method, you can copy WP Rocket’s list of scripts that are delayed and use that as a baseline. You may also consider delaying //cdnjs.cloudflare.com and other non-critical JavaScript in your PageSpeed Insights and GTmetrix Waterfall report.
4. Test Combining CSS And JavaScript
Combining CSS and JavaScript can increase or decrease total block time.
Try enabling and disabling this (usually in your cache plugin) and test the results of both. WP Johnny says that smaller websites should usually combine while larger sites usually shouldn’t.
5. Remove Unused JavaScript
Removing unused JavaScript can significantly lower total blocking time.
Choose An Asset Unloading Plugin
Asset CleanUp and Perfmatters are popular plugins for unloading assets. I use Perfmatters on my WordPress site since the UI/UX is much better. However, Asset CleanUp is free and the Pro Version lets you unload custom CSS while Perfmatters (and Asset CleanUp free version) do not.
Enable The Test Mode And Script Manager
If using Asset CleanUp, enable test mode so you can test unloading assets without breaking your site. If using Perfmatters, enable the script manager in the settings. Perfmatters doesn’t have a test mode, so create a staging site or check your site for errors after unloading assets.
Remove Unused JavaScript Where It’s Not Being Used
Edit a page or post and view all scripts (and styles) loading on the page. If a script or style is being loaded when it’s not being used on the page, you can disable it. You can disable it on the current URL, use regex, or disable it everywhere but current URL, pages, or posts. You will need to do this for multiple pages/posts on your site where different assets/plugins are being loaded.
Examples:
Disable unused CSS/JS in Elementor and other page builders.
Disable social sharing plugin everywhere but posts.
Disable slider/lightbox plugins except content where they’re used.
Disable WooCommerce scripts and styles on non-eCommerce content.
6. Minify CSS And Generate Critical CSS
Most cache plugins have an option to minify CSS, minify JavaScript, and use critical CSS (optimize CSS delivery in WP Rocket). All can help improve total blocking time in WordPress.
However, both can result in errors.
Minification errors are easy to fix (find the problematic files in your source code and exclude them from minification).
Optimize CSS delivery errors may require a few extra steps:
Search “rocket-critical-css” in your source code to make sure it’s working.
If it doesn’t appear, regenerate critical CSS in WP Rocket and page builders (if applicable).
Download the combined, purified, and minified CSS.
Paste the CSS code in the “fallback critical CSS” field.
Exclude files from CSS delivery using WP Rocket’s helper plugin.
Disable optimize CSS delivery on individual pages/posts if needed.
If neither of these work, you can try Gijo Varghese’s FlyingPress plugin.
7. Optimize Third-Party Scripts
Reducing impact of third-party code is the first thing Google recommends to improve total blocking time.
Open this report in PageSpeed Insights to see which third-party code is blocking the main thread as well as its blocking time. Third-party code is anything that loads from external websites (Google Analytics, Tag Manager, advertisements, social networks, Hotjar, others).
Once you know which scripts cause high blocking times, optimize them:
Delay JavaScript from third-party scripts.
Host Gravatars locally using WP User Avatar.
Reserve space for ads and delay the JavaScript.
Host Google Fonts and Google Analytics locally.
Use a lightweight social sharing plugin like Grow Social.
Lazy load videos and replace iframes with a preview image.
Host Facebook Pixel locally in WP Rocket’s add-on settings.
Prefetch third-party domains (here’s a list of common domains).
Take a screenshot of a Google Map and link the image to driving directions.
8. Host Fonts Locally And Preload Them
Fonts can increase total blocking time and it’s always faster to host them locally.
Host Fonts Locally – download your fonts directly from the Google Fonts website (while being minimal with families/weights), convert them to WOFF2 format using a tool like Transfonter, and add them to your CSS. Alternatively, you can also use the OMGF plugin to host fonts locally.
Preload Fonts – preloading fonts can be done manually or using WP Rocket and Perfmatters. Google may recommend preloading some fonts in your preload key requests report, or you can find your font files in the GTmetrix Waterfall “Fonts” section. Copy the URLs and preload them.
9. Fix 4xx And 5xx Errors In GTmetrix Waterfall
If you have red errors in your GTmetrix Waterfall chart, it means there’s an error loading the request. As you can see, it adds quite a bit of blocking time and wait time. Fix this immediately!
10. Remove Heavy Plugins And Page Builders
Some page builders add lots of extra CSS and JavaScript to your site.
Elementor and Divi were two of the slowest page builders in speed tests. In Facebook Groups, there is also a large trend of people moving to Gutenberg, Oxygen Builder, and GeneratePress.
If you don’t want to remove your page builder, you can still do the following:
Disable unused Elementor features using Asset CleanUp or Perfmatters (step #5).
Test your speed when adding extra plugins for page builders (Ultimate Addons, etc).
If you’re using additional plugins for page builders, disable modules you’re not using.
Enable Optimized DOM Output and Improved Asset Loading in Elementor settings.
Hard code your header, menu, footer, and blog sidebar so it doesn’t use page builders.
Avoid running heavy page builders on top of cheap, shared hosting with low CPU limits.
11. Test Total Blocking Time Without Animations
Animations can look nice, but they’re definitely not good for speed.
They can increase both total blocking time and cumulative layout shift. Google recommends using the CSS transform property which lets you use animations without causing layout shifts. Otherwise, you may want to try removing animations and retesting your total blocking time.
Compress images – ShortPixel is a solid image optimization plugin. PageSpeed Insights uses an 85% compression level in their tests – so that’s what I recommend setting it at.
Properly size images – avoid huge images and resize them to correct dimensions. For example, my blog width is 680 pixels (with) so I crop my blog images to those dimensions.
Serve images from a CDN – serve images (and other assets) from your CDN URL. Often, this isn’t enabled when setting CDNs and you’ll need a CDN rewrite (e.g. in Perfmatters).
Specify image dimensions – add a width and height attribute to the image’s HTML. Same thing as WP Rocket’s settings for “add missing image dimensions” which does it for you.
Serve important images in WebP format – next-gen format images and faster than JPEG/PNG. I would at least convert your critical images (logo, sidebar images, etc). ShortPixel and WebP Media Converter are top choices for converting images to WebP.
Once you’re ready, run your WordPress site through Lighthouse, PageSpeed Insights, or GTmetrix and check your total blocking time. Hopefully, it’s under 300ms like Google wants.
Frequently Asked Questions
How do I reduce total blocking time in WordPress?
The most effective way to reduce total blocking time in WordPress is to optimize JavaScript files (including third-party code). Defer, delay, minify, and remove unused JavaScript to cut down on your blocking times.
How do I reduce total blocking time using WP Rocket?
To reduce blocking time using WP Rocket, delay non-critical JavaScript, load JavaScript deferred, and make sure optimized CSS delivery is working properly. Minifying CSS, JavaScript, and preloading fonts can also reduce blocking time.
How do I reduce total blocking time on mobile?
Check files with long main-thread blocking times in your mobile speed report and optimize those specifically. Avoid hamburger menus and complex designs on mobile. Remove sliders and heavy plugins from mobile that aren’t absolutely needed. Keep it simple.
How can I improve total blocking time in Elementor?
Elementor adds a lot of CSS and JavaScript which can increase total block times. Try disabling Elementor assets using an asset unloading plugin. Avoid animations if possible and enable optimized DOM output and improved asset loading in your Elementor settings.
We get emails every day from website owners, telling us their site is fast but slow on mobile. Nine time out of ten they’ve tested their site on Google PageSpeed Insights (PSI) and the mobile score is low.
Long story short, a low PageSpeed Score in mobile does not mean your site is slow on a mobile device. Pagespeed Insights is not a real speed test – it’s a technical checklist test. There are some important things to understand and keep in mind when it comes to the Mobile Pagespeed Score we’ve explained below.
1. They’re testing your site on a speed limited, CPU limited connection
Mobile PageSpeed simulates at 1.6mb/second connection – that is REALLY slow in modern internet speed terms. A moderately sized page of say 1.5-2mb is going to score low on this test simply because of the amount of time that data takes to download.
The CPU limiting they do also causes sites that have even moderate amounts of javascript to be marked down heavily. The modern web runs on javascript and many WordPress themes require a javascript library called Jquery in order to render which means they automatically score lower.
They of course don’t tell you this anywhere on the report itself, it’s hidden deep in the technical documents.
2. Pagespeed Insights Isn’t a Speed Test, It’s a Technical Checklist
Pagespeed Insights is more concerned with measuring your site against a technical checklist that correlates with speed rather than the raw speed of the site itself.
The latest version of Pagespeed Insights does take into account some speed elements but it’s still largely concerned with checking boxes.
3. Geography & Location Is Ignored
PSI completely ignores geography and doesn’t take into account where your visitors are located and where your hosting is. This means its speed test is not necessarily true to the real world. If your hosting is in Australia and your customers are in Australia but the speed test elements of PSI are performed from the US then it’s not a true-to-life test.
4. Website Speed Is Not Just Your Homepage
This is something 99.9% of webmasters running speed tests completely miss – website speed is not just your homepage. Every page on your site is important when it comes to speed and testing the homepage is useful but is a bit of a 1-dimensional approach, you should probably be looking at all pages.
5. High PageSpeed Score Will Likely Not Improve Your SEO
There’s a misconception that a high PageSpeed Score means that the Google Gods will gift magical SEO rankings. This is not the case – for starters, see the previous point.
We’ve seen SEO consultants and webmasters spend days obsessing over Pagespeed score in the hope it will boost SEO. Your time would be better spent on other SEO tasks like optimizing your meta descriptions for CTR or optimizing your open graph tags to boost social CTR.
6. The Score Varies Wildly From Test to Test
Run multiple tests and you’ll see the score varies wildly often by 20-30 points. That’s partly a function of geography but these inconsistencies make it difficult to trust the tool.
That’s all folks!
Really hope this helped! If it did, drop me your new scores + load times via email 🙂
Let’s settle this “best cache plugin” thing once and for all.
Your WordPress cache plugin depends on which host you use. On a LiteSpeed server, LiteSpeed Cache is the way to go. On SiteGround, use SG Optimizer. In most other instances, I recommend WP Rocket. Otherwise, if you’re not willing to spend money on WP Rocket, W3 Total Cache or WP Fastest Cache. And I would stay away from NitroPack (blackhat), Swift, and Cloudways Breeze.
In Facebook polls, WP Rocket is usually rated #1 cache plugin. LiteSpeed Cache is usually not since LiteSpeed servers are relatively new and not enough people have moved to a LiteSpeed host like NameHero or A2 Hosting. Give it time and LiteSpeed Cache may overtake WP Rocket.
When I Googled “best WordPress cache plugins” I didn’t agree with any of the other lists. Where are LiteSpeed Cache and SG Optimizer? Why didn’t they mention NitroPack is blackhat?
Hopefully, this list gives you more clarification.
I’m putting LiteSpeed Cache as the #1 cache plugin even over WP Rocket. It uses server-level caching (faster than file-based caching by WP Rocket) and has extensive settings which allow for much better control of speed settings, but does mean it’s slightly more complicated to setup.
The catch is that you need to use a LiteSpeed server to use this plugin. That’s not a bad thing considering LiteSpeed outperforms Apache and is generally one of the fastest types of servers. But that also means you might have to move to a LiteSpeed host like NameHero or A2 Hosting.
QUIC.cloud was also developed specifically to work with LiteSpeed. It’s a free, highly performant CDN I recommend over Cloudflare, StackPath, and RocketCDN (also StackPath). QUIC.cloud is easy to setup with LiteSpeed cache once you request a domain key, activate the CDN, and set it up using a CNAME record.
2. WP Rocket
WP Rocket is the runner-up behind LiteSpeed Cache.
This is mainly because it uses file-based caching (slower than LiteSpeed Cache’s server-level caching). The settings are “easy” but they don’t give you as much control as LiteSpeed Cache since it doesn’t have as many features. I use WP Rocket on my own site only because I’m not using a LiteSpeed server (I’m using Cloudways Vultr HF). Otherwise, I would be using LiteSpeed.
FlyingPress was developed by Giji Varghese from WP Speed Matters.
Gijo has a strong following in his Facebook Group who uses this plugin as well as Gijo’s other speed plugins which are highly rated on WordPress, so people had somewhat high expectations.
During the first release, there were quite a few bugs that Gijo has been sorting out. However, tons of people reported getting even better results than WP Rocket and even LiteSpeed Cache.
The settings aren’t difficult to configure and everything is pretty straightforward: you have a setting for cache, CSS, JavaScript, fonts, images, videos, iframes, CDN, and database cleanup.
SG Optimizer is a great cache plugin, but I don’t recommend SiteGround.
Their TTFB has gotten slower and they’ve become quite the unethical company: banning accounts in countries that don’t make them enough money, becoming admins of Facebook Groups so they can moderate what people say about them, and using their TOS (section 9) to threaten affiliates who write bad reviews about them. The bad form of reputation management.
Before I left SiteGround in 2019, I gave their team tips to improve SG Optimizer which they implemented. They added things like heartbeat control, browser resource hints (prefetch, preload, preconnect), database cleanup, and other features. After the update, it made sense to remove WP Rocket (what most people were previously using) and use SG Optimizer instead.
I would only use W3 Total Cache if you’re looking for a free alternative to WP Rocket and you’re not using LiteSpeed or SiteGround.
However, it’s complicated to setup for the average user. It wasn’t actively maintained until recently which makes you question how much the developer will continue to release updates.
Even with extensive settings, W3 Total Cache lacks features like browser resource hints, database cleanup, heartbeat control, and other things most cache plugins have. So you would need to install a few extra plugins (or add them manually) if you want to get these optimizations.
I would only use W3 Total Cache if you’re looking for a free alternative to WP Rocket and you’re not using LiteSpeed or SiteGround.
However, it’s complicated to setup for the average user. It wasn’t actively maintained until recently which makes you question how much the developer will continue to release updates.
Even with extensive settings, W3 Total Cache lacks features like browser resource hints, database cleanup, heartbeat control, and other things most cache plugins have. So you would need to install a few extra plugins (or add them manually) if you want to get these optimizations.
WP Super Cache is a cache plugin developed by Automattic.
The settings are divided into 2 main sections (simple and advanced) but otherwise, there are not enough settings where I would use this plugin myself. Advanced controls are just not there.
If you currently have WP Super Cache installed and it’s giving you good performance, by all means keep it. But I would lean towards one of the other highly rated cache plugins on the list.
While I use Cloudways for hosting, I’ll admit this is not a great cache plugin. Breeze has a history of breaking websites and causing issues as reported in reviews. Most people (including myself) use WP Rocket on Cloudways. Breeze settings are somewhat minimal and they need to make some major updates if they want to get better reviews and catch up with WP Rocket/LiteSpeed.
Swift Performance is one of the last on the list because of scam reports.
Many of their customers pay for the pro version but when they cancel, they still get billed. There have been numerous complaints of this which still exist as of writing this, and the developer seems to have done little about it. For this reason alone, I don’t recommend Swift.
Swift was once a very popular plugin in Facebook Groups. But after it blew up, it stopped getting recommended just a fast. While it does have lots of settings that look promising, the scam reports + poor support from developers make this plugin belong at the bottom of the list.
NitroPack is last because it cheats PageSpeed scores by moving elements off the main thread which many tests don’t report. While tests might not show it up, other tools like Chrome Dev Tools will. It’s basically hiding things from tests just to fulfill your need of getting “great” scores.
It will likely give you amazing scores in PageSpeed Insights, but it won’t actually make your site much faster. Plus, it can result in FOUC issues and is crazy-expensive. Totally not worth it IMO.
I haven’t tested the plugin myself but have seen numerous complaints about it being blackhat. I think it’s a shame Matthew Woodward wrote a great review and mentioned nothing about this.
Which Cache Plugin Is #1 In Facebook Polls?
WP Rocket has been rated the #1 cache plugin in Facebook polls for some time, but in a recent poll, LiteSpeed Cache was #1. This goes to show that once LiteSpeed servers catch on (and they probably will), it’s possible that LiteSpeed Cache will overtake WP Rocket as the #1 plugin.
Do You Agree?
Obviously, cache plugins and their speed results can vary on each website, but I at least suggest trying a few out and seeing which one works best for you.
This is triggered when the total page size is above 1,600 KiB. To pass this test, you need to reduce page size.
Large page size is often caused by unoptimized images, videos, third-party code, or heavy CSS and JavaScript files. It can also be from slow page builders (specifically Elementor and Divi) which add extra CSS, JavaScript, and div wrappers to every single page on your WordPress site.
PageSpeed Insights shows your largest files which is where you should be focusing your attention. Once you know these, reference the solutions in this guide (which are specific to WordPress sites) and you should be able to pass the avoid enormous network payloads test.
1. Identify The Cause Of Enormous Network Payloads
Use PageSpeed Insights to identify files causing enormous network payloads.
Pay attention to the file type (image, CSS, JS) and where the file is being served from (your domain, CDN, a third-party service).
Just by glimpsing at your report, you will know which files need to be optimized so you can narrow down the solution.
2. Avoid Enormous Images
Huge images can cause enormous network payloads.
These appear in the properly size images recommendation.
This simply means you need to resize images to smaller dimensions. I created a “cheat sheet” with image dimensions for my logo, blog, sidebar, and inner pages. That way, I know the exact dimensions images should be resized to before uploading them. Some image optimization plugins have resizing options, but it’s best to upload them with correct dimensions beforehand.
Adaptive image plugins can serve smaller images to mobile devices and improve mobile speed.
Lighthouse sets the compression level to 85% and flags images that would have a savings of 4KiB or higher.
ShortPixel and TinyPNG are popular options, or you can do this in Photoshop or GIMP. Try setting the compression level to 85% and you shouldn’t have errors for this item anymore.
You can convert images to WebP using ShortPixel, Imagify, and many other image optimization plugins for WordPress. If your plugin doesn’t support it, you can also use WebP Converter For Media. When selecting the conversion method, <picture> tag is usually the preferred method.
However, many speed-related sites like Kinsta and WP Rocket use SVGs for their high quality images (logo, background image, etc). SVGs don’t get flagged in Lighthouse and still produce high quality images similar to WebP. You may need to use an SVG support plugin to avoid errors.
5. Minify CSS + JavaScript
Most cache plugins have settings to minify CSS and JavaScript which removes unnecessary characters from your code (reducing the file size).
If enabling this gives you errors, you’ll need to find the problematic file(s) in your source code and exclude them from minification. Otherwise, make sure you’re minifying CSS and JavaScript.
6. Remove Slow Page Builders
Elementor and Divi add unnecessary CSS and JavaScript.
I was previously using Elementor and hired WP Johnny for his page builder removal services and it made a huge difference. Just by hard coding my header, footer, menu, and sidebar, my entire web vitals score shot up. Then he migrated my Elementor pages to Gutenberg which made an even bigger difference. I was averaging C scores and after doing this, I’m averaging A’s.
In Facebook Groups, there is a large trend of people migrating away from Elementor/Divi. Popular alternatives are Gutenberg, Oxygen, and GeneratePress.
Asset CleanUp and Perfmatters can trim the size of CSS and JavaScript.
They essentially provide you with a script manager to disable CSS/JS on pages where they don’t need to load. So if your contact form loads across your entire site, only load it on the contact page. Plugins for social sharing, sliders, rich snippets, live chat, and others can often be disabled on certain content. Perfmatters vs. Asset CleanUp, but I use Perfmatters since the UI/UX is better. However, Asset CleanUp Pro can disable custom CSS.
As mentioned previously, Elementor and Divi can add lots of CSS and JavaScript to your site. Some files might be able to be disabled such as elementor-sticky, dialog, share-link, swiper, animations, icons, and wp-block-library if you don’t use these features. Elementor also released Optimized Dom Output and Improved Asset Loading which can help reduce network payloads.
8. Optimize Google Fonts
Use the GTmetrix Waterfall chart to see how long your fonts take to load. They can slow especially if you’re loading multiple font families, weights, and they’re not hosted locally.
Be very minimal with font families, weights, icons.
Use browser resource hints (preload, preconnect, prefetch).
Avoid font plugins and serving fonts from any type of plugin.
Add font-display: swap to ensure text remains visible during webfont load.
9. Optimize Third-Party Code
When trying to avoid enormous network payloads, you may notice files are being loaded from a third-party site.
These can flag additional PageSpeed Insights items such as reducing third-party code. Below are common examples of third-party code and common solutions to optimize them. Some items are easy to optimize (hosting fonts and analytics locally) while others (AdSense and GTM) are not.
Google Fonts – host locally instead of serving them from //fonts.gstatic.com. Also take advantage of browser resource hints (preload, preconnect, prefetch).
Google Maps – take a screenshot of the map and link it to driving directions.
Google Analytics – host locally using WP Rocket or Flying Analytics. If using Perfmatters, use a smaller tracking code (minimal, minimal inline, or analytics.js) and disable display features to prevent a second HTTP request to Doubleclick.
Google AdSense – lazy load and delay JavaScript in WP Rocket or Flying Scripts.
Google Tag Manager – delay in WP Rocket or Flying Scripts and clean up tags.
Facebook Pixel – hosting it locally using WP Rocket is the only way I know of.
YouTube – lazy load, replace iframes with preview images, and delay JavaScript.
Social Media – use Grow by Mediavine which was the fastest social sharing plugin in WP Rocket’s test, avoid social media widgets (e.g. Facebook Like boxes).
Gravatars – delay Gravatars and use a local Gravatar image with WP User Avatar (my blog comments show an example of a custom Gravatar image I use).
Each plugin works a little differently. WP Rocket delays JavaScript until user interaction (e.g. mouse scroll, click). Flying Script sets a timeout period in seconds until the JavaScript is loaded.
This won’t help avoid enormous network payloads since you’re just delaying JavaScript (not optimizing it) but it can improve your site’s initial load time and potentially, your web vital scores. This is especially true if you delay AdSense, comments, and heavy third-party code.
Below is the default list of JavaScript WP Rocket delays. If you have other non-critical JavaScript that can be delayed (check your GTmetrix Waterfall report), try delaying that too.
Query Monitor has a “queries by components” tab which shows your slowest loading plugins.
WP Hive is a Chrome Extension that adds a little section when searching the WordPress repository that shows whether a plugin has an impact on memory usage or PageSpeed Insights.
Otherwise, eliminating unnecessary plugins and replacing high CPU plugins with lightweight plugins is an ongoing process that can take time, but can prevent enormous network payloads.
12. Use An Efficient Caching Plugin
WP Rocket and LiteSpeed Cache are the gold standards for cache plugins.
If you’re using a LiteSpeed Server, use LiteSpeed Cache. Otherwise, I would personally use WP Rocket for nearly all other cases (with the exception of SG Optimizer on SiteGround, but I don’t recommend their hosting as they have a slow TTFB).
Which cache plugin you’re using and how you configure the settings has a large impact on your web vital scores. Make sure you test each setting (specifically the file optimization tab in WP Rocket) to see how each setting impacts scores and load times.
13. Avoid Enormous Payloads With WP Rocket
WP Rocket says they can help avoid enormous payloads with:
Browser caching
Minify CSS
Minify JavaScript
Delay JavaScript Execution
Lazy Load for images and iframes
You’ll want to enable these in your WP Rocket settings.
14. Take Advantage Of Server-Side Caching
Most cloud hosts have server-side caching built-in to their dashboards.
Redis, Memcached, and Varnish are all types of caching that can reduce network payloads. I use Cloudways and have Redis enabled which is a popular, efficient caching option. SiteGround has NGINX-based delivery which is available in Site Tools, and Kinsta has its own caching as well.
Server-side caching is faster than file-based caching done by the cache plugin. Take advantage of it.
15. Reduce Number Of Elements On The Page
Reducing the number of elements on your pages will reduce page size and network payloads.
Understanding Load Testing | Browser Load Testing | Stress Test of Website
What is load testing?
Load testing is bench-marking a website to see how it performs under various loads.
For example, a test may simulate an increasing number of concurrent visitors landing on your site. It will also record how your site handles them and records them for your reference.
Example – load tests at LoadStorm: Metrics measured include average response time, peak response time, and error rate (image source).
What types of “load” are tested?
Depending on the tool you choose to load test your site with, each may come with different features. The most basic will simply involve simulating an ever-increasing load and halting when your site crashes.
Other tools may be capable of generating a simulated load that mimics different user behaviour, such as performing queries, changing pages, or loading other functions. Some may even be able to map out logical flows for each individual scenario.
A load test or stress test is measuring how many visitors your site could handle. Technically Requests per second!
This guide is all about load testing WordPress sites, some tips on how to handle sudden spikes, and how I handle it.
Why you should Load Test?
What happens when your blog posts go viral? You’re going to get tons of traffic! This is what happened to me when one of my posts gets featured on Hacker News.
Well, 237 real-time users are not that great, I’ve seen bloggers with 1k-2k real-time users!
Unless you properly load test a site, you don’t know whether all users are able to open your site during these spikes.
Trust me, only a few hosting providers in this world can’t handle this! (listed at the bottom).
Before Browser Load Testing
Browser Load testing is done by sending fake users to your website/server. Here are some points that you need to consider before running a load test.
Some hosting providers charge based on the number of users/visits.
While load testing your site may become unavailable to some users based on the load capacity of your server (that’s what we’re going to test).
How to Load Test a WordPress website?
There are several tools and services that can do a load test. In this guide, we’re going to use Loader.io.
Why Loader.io?
Free (freemium)
Supports up to 10k users in the free plan
Easy to use interface
Supports incrementing users
Cloud-based
Developed by SendGrid (a leading email service)
Create a free account and verify domain
Create an account on Loader.io and verify your domain. You’ll need to download a file and upload it to the root of your WordPress directory (verification via DNS is in their paid plan).
Create a new test
Now let’s create a new test (aka load test) as follows:
Note the “Test Type”. There are multiple options like clients per test, clients per second, and maintain client load.
Maintaining client load will start sending zero users and gradually increase it second by second. In such a way we can make sure that at what point it breaks!
Analyzing Test Results
Once your test is complete, you’ll get a report like this:
The key element we’ve to look for is the ‘Response Counts’. The counts other than success means that many requests failed.
Luckily none of them failed for me! (I don’t believe in luck, learn how I did it below).
How to handle High Traffic in WordPress?
As you can see I was able to test 10k users per second with a 100% success rate. The main trick that helped to achieve this is to cache HTML pages in Cloudflare.
Even though this trick works pretty well for me, not everyone can implement it if you have a lot of dynamic content. In such caches here are some tips:
Never use shared hosting. Use a VPS server like Cloudways or managed hosting providers like Kinsta. These guys really know to handle scaling and handle traffic
Implement Redis/Varnish caching
Offload the server load using a CDN. Use Cloudflare (free) or any plaid ones like BunnyCDN or KeyCDN
Create a static version of pages. Use cache plugins like WP Rocket or WP Fastest Cache
Compress images
Minimize HTTP requests
Conclusion
It’s very important to run a load test and make sure your WordPress site is ready to handle high traffic. Otherwise, you’re going to lose some precious users!
Running a load test is pretty easy as we covered. However, achieving high RPS (requests per second) is very hard. I’ll share many more tips across this blog.
On the hunt for the fastest WordPress hosting provider to serve up your WordPress site?
You’ve probably heard about the importance of making your website load fast. It makes your visitors happier; it helps with SEO…it’s just generally really important.
And while yeah, there are all kinds of WordPress performance tips you can implement to make your site load faster, your site’s hosting is always going to play one of the biggest roles in how quickly your site loads (especially if you’ve already optimized the other stuff).
To help you find the fastest WordPress host provider that also matches your budget, we went hands-on with eight popular WordPress hosts and ran real speed tests. The end goal of this post is to help you find a host that can offer you the performance you want, at the price you want.
You’re probably here for the hard data, so we’ll start by sharing all the data in an easy-to-compare table format.
Then, we’ll dig into each host in more detail and also share some tips for finding the fastest WordPress hosting for your specific needs.
The Fastest WordPress Hosting providers: What the Data Says If you just want the absolute fastest WordPress hosts based on our testing, here are our three recommendations based on their speed, price, and features (full data and more info below):
To find the fastest WordPress hosting, we set up a real test site at every single one of the hosts on this list. Then, we ran our test sites through a duo of speed testing tools:
To collect the WebPageTest data, we used a simple desktop test from Chicago, Illinois with a native traffic connection. We collected two metrics:
Load Time (Document Complete) – this is what most people think of as a website being “fully loaded”. According to the WebPageTest documentation, it’s “the time from when the user started navigating to the page until the Document Complete event (usually when all of the page content has loaded)”.
Time to First Byte – this how long it takes for the first bit from your server to arrive. It shows how responsive a host’s server is.
We configured WebPageTest to run nine separate tests and take the median value, which should eliminate single-test variance. That is, all of the data in the table above is the median result from nine different tests.
WebPageTest data is valuable, but it only gives the load times for a single “visitor”. However, in the real world, your site will have more than one visitor at the same time.
Because of that, it’s important that your host can load your site just as fast for the 50th visitor as it does for the first one.
That’s where the BlazeMeter data comes in. BlazeMeter simulates 50 “people” visiting your site at the same time. That way, you can see how each host performs under scale.
Here are the details for our BlazeMeter tests:
Test location: Virginia, USA
Visitors: 50
Duration: 5 minutes
Ramp up steps: Visitors increase every minute, starting from zero and building up to 50 active visitors for the last minute.
We’ll share the BlazeMeter chart for each host below. One thing to keep in mind, however, is that most managed WordPress hosts implement some type of firewall/DDoS protection, so some hosts blocked some of the requests in our test.
If you see a high error rate in the BlazeMeter charts, this is the result of an overactive firewall, not necessarily poor performance.
How Our Test Site Was Set Up
To simulate a real site and create a consistent test case, we used the lightweight Airi theme and one of its importable Elementor demo sites.
So, our “full” test site includes:
The Airi theme as the base
A homepage design built with the Elementor page builder
Here’s the exact Airi demo site that we’re using.
Fastest WordPress Hosting: Compared in More Detail
Now that you have a good idea of how each host performs in objective speed tests, let’s take a deeper look at their features as well as Load Impact data to see how they stood up under scale.
Kinsta is a popular cloud-managed WordPress host that uses the Google Cloud Platform to help you host your WordPress site. Kinsta also layers on its own optimized tech stack with Nginx, server-level caching via Fast_CGI, and other enhancements.
In addition to offering stellar performance, Kinsta has one of the best looking hosting dashboards out there, as well as lots of convenient features like:
Automatic daily backups
Easy staging sites
Free SSL certificate and one-click install
Firewalls/malware scans
A free hack-fix guarantee if something gets through
You also get some nice value-adds, such as the addition of a CDN and premium DNS services at no extra cost.
Kinsta’s plans start at $30 per month for a single website.
WPX Hosting is a very interesting option if you need to host multiple WordPress sites. It’s managed WordPress hosting but, unlike most managed WordPress hosts, even the entry-level plan lets you host multiple websites (up to five). It does this for a slightly lower price than competing hosts such as Kinsta and WP Engine.
As the data shows, though, it doesn’t skimp on performance — WPX Hosting ranked second in our tests and wasn’t far behind Kinsta.
All of WPX Hosting’s plans come with:
Free/one-click SSL certificates
A built-in CDN at no extra cost
Automatic daily backups
Malware scans and free malware removal if anything shows up
Staging sites
Your choice of three data centers — USA, UK, or Australia
In terms of prices, WPX Hosting starts at $25 per month for up to five websites. Two things to note about WPX Hosting’s pricing:
They don’t bill you by visitors like many other managed WordPress hosts — you’ll only pay based on your bandwidth and storage.
Staging sites count as full websites for billing purposes. So one production site + one staging site = two websites in terms of your plan limits.
Plan Tested: $10 DigitalOcean plan – 1 GB RAM, 1 processor core
Load Time: 1.522 s
Time to First Byte: 0.115 s
Starting price/mo: $10 (depends on cloud provider)
Cloudways is not a host itself. Instead, it’s a managed hosting service that lets you choose your own cloud VPS provider from a list of options, including:
DigitalOcean
Vultr
Linode
Amazon Web Services (AWS)
Google Cloud
No matter which cloud provider you choose, you’ll get an optimized performance stack, a built-in CDN, and useful features such as:
One-click staging sites
Easy/free SSL certificates
One-click WordPress installs
Automatic backups
The one downside is that Cloudways is a little bit more complicated than your average WordPress host. However, it’s certainly still something that a non-developer can handle — I just wouldn’t recommend it if this is your first time launching a WordPress site.
The big upside is that Cloudways is able to offer exceptional performance for a lower price than all the other top-performing hosts on this list.
For reference, our test site is using the cheapest DigitalOcean droplet, which costs just $10 per month. Your exact speeds may vary depending on the cloud provider that you choose. However, all the cloud providers offer excellent performance. If you’re really obsessed with speed, you can play around with the newly released Vultr High-Frequency servers.
One neat thing is that Cloudways offers a 3-day free trial. So if you’re interested, spin up a test site and see how it works for you.
Note – Flywheel was acquired by WP Engine in 2019. While this has led to some standardization (e.g. in pricing), the two are still run separately and have a separate infrastructure.
Flywheel is a popular managed WordPress host that used to target itself mainly creatives, freelancers, and agencies. However, in recent times, they’ve moved towards a more mainstream audience, and anyone can benefit from Flywheel’s hosting services (though if you do build websites for clients, Flywheel still has tons of convenient features for that).
Like Kinsta, Flywheel uses Google Cloud Platform’s infrastructure to power its plans. Beyond that, they have tons of helpful features like:
Staging sites
Automatic backups
Free SSL certificate
Built-in CDN (extra charge on lower-tier plans)
24/7 support
Flywheel’s plans start at just $15 per month with the Tiny plan, which is the plan we tested. This plan has all the features, but a low traffic limit (just 5,000 visitors). Higher tier plans start at $30 per month. Excluding the Tiny plan, Flywheel’s prices are identical to WP Engine.
As an upshot of the WP Engine acquisition, all Flywheel customers now also get access to the Genesis Framework and StudioPress child themes at no extra cost.
WP Engine is one of the most popular managed WordPress hosts out there. All of the WP Engine plans come with staging sites, automatic updates and backups, integrated CDN, and plenty of other helpful tools.
One neat thing is that WP Engine recently acquired the Genesis Framework and all of StudioPress’ Genesis child themes. These themes are now included at no extra cost as part of every WP Engine plan.
WP Engine’s plans start at $30 per month and go up from there.
InMotion Hosting is a well-known budget host that’s recently made the jump into managed WordPress hosting with a set of affordable plans.
Their plans come with automatic WordPress updates, free SSL certificates, and free backups (automatic on all tiers except the cheapest). And on the higher tier plans, you can also get access to the premium tiers of Jetpack at no extra cost, just like DreamPress offers.
InMotion Hosting didn’t have the best performance in our tests, but its cheapest tier — the WP-1000S plan that we tested — starts at just $5.99 per month with promotional pricing, which still offers good value when you consider the price.
DreamHost is one of the oldest web hosts out there, founded all the way back in 1996. DreamPress, the hosting plan we tested, is DreamHost’s managed WordPress offering.
It comes with daily automatic backups, unmetered bandwidth, and 24/7 support. And on higher-tier plans, you’ll also get a built-in CDN, as well as access to the (normally paid) Jetpack Professional plan at no extra cost.
With plans starting at just $16.95, DreamPress is a good value option. However, you’ll need at least the $24.95 DreamPress Plus plan if you want Jetpack Professional and the included CDN.
SiteGround is a popular WordPress host that manages to combine pretty fast page load times, some managed WordPress features, and great support into one surprisingly low-priced package.
If you’re on a budget and want the best bang for your buck, SiteGround is one of your better options (though I’d still rank it behindCloudways).
While the prices are comparatively low, you still get access to:
The latest technologies, including PHP 7.4+
Automatic WordPress updates
Staging sites (excluding the entry-level plan)
A custom hosting dashboard
Great support
SiteGround’s plans start for as little as $6.99 per month, though we tested the $9.99 per month GrowBig plan. However, make sure to pay attention to the differences between promotional prices and regular prices, as the difference can be large. If you want to use SiteGround, we recommend trying to lock in three years of promotional prices. While it will cost you more upfront, it will save you a lot of money in the long run.
Tips to Choose the Fastest WordPress Hosting For Your Site
When you’re trying to choose the best hosting for your specific needs, here are some things to consider:
Data center locations – while a CDN can mitigate this issue, you still want to find a host that offers data centers near your target readers.
Think about your traffic – if your site is relatively low traffic, you might be fine with one of the budget options. However, for high-traffic sites, you want to make sure your chosen host did great in the Load Impact test. You’ll see that the higher-priced hosts usually differentiate themselves when performing under scale.
Price – finding the fastest WordPress hosting company isn’t just about the overall winner. It’s about finding the best option that fits your budget. Paying an extra $30 per month just to save a couple fractions of a second might not be worth it for you, especially if your site doesn’t get a lot of traffic.
Which Host Should You Choose?
Again, there’s no single winner here — it really depends on your needs.
However, as we indicated at the beginning, Kinsta and WPX Hosting had the best overall performance. Of the two, Kinsta stood out, but WPX Hosting will be much cheaper if you need to host multiple websites.
If you’re looking for something more on the budget end and you aren’t a super technical user, SiteGround is a great entry-level option that will still get you pretty good performance without breaking the bank, especially if you need to host multiple sites. If you just need to host a single website, InMotion Hosting is also a solid option.
Finally, if you’re a little more technical, Cloudways can be a great choice because you’ll get surprisingly good performance for as little as $10 per month. I recommend the entry-level DigitalOcean box if you want the cheapest option. Or, if you’re willing to pay a few dollars more, check out the new Vultr HF servers (high frequency).
In order to create great User Experience (UX), websites should always load fast. I mean immediately! It’s really tough to achieve instant results. AMP is one of the ways Google is trying to speed up the entire internet. But there’re simply so many steps we need to achieve in order to achieve speed. For every web design projects, loading speed is one of the top priorities for Krome.
We’ve always been crazy about pushing every single byte out of the way so that our sites can be loaded at lightning speed. Cloudflare is probably one of the coolest tools you can use to push up the speed limits.
One of the most annoying speed optimisations is Time to First Byte (TTFB). It’s really hard to reduce such stuffs. So, one of the ways is to use Cloudflare’s Worker.
For some of us, though it might sound good, it doesn’t make much sense until we see a practical example.
To be blunt, most articles on the web written about reducing waiting TTFB are complete garbage and written by content writers who have no technical or speed optimization experience and are simply parroting what everyone else says online.
In this article, we’ll share the troubleshooting steps and recommendations we’ve created after optimizing 100’s of WordPress sites.
What is TTFB?
TTFB stands for time to first byte. To put it simply, this is a measurement of how long the browser has to wait before receiving its first byte of data from the server. The longer it takes to get that data, the longer it takes to display your page. A common misconception is that this is calculated after DNS lookup times, however, the original calculation of waiting TTFB in networking always includes network latency. This involves a 3-step process and delays and latency can occur anywhere in between, adding up to your total TTFB.
Reduce server response time waiting (TTFB)
Another demo from Lighthouse Audit, the Opportunities section of your Lighthouse report reports Time to First Byte, the time that it takes for a user’s browser to receive the first byte of page content:
What Is Server Response Time?
Server response time is a broad measure of how responsive a server is. It represents the period between the user’s request and the first byte that the web browser receives from the server (time to the first byte).
Most blogs and web articles state that TTFB doesn’t really matter, but it does. Lower server response time improves website performance and therefore allows for a better user experience. Lower TTFB is always better.
What Is a Good TTFB?
Server response time highly depends on geography – for a WordPress site, we expect to see a good TTFB sit in the 0.1-0.2 second range for visitors in the country or continent the site is hosted in and 0.2-0.5 seconds internationally.
Google guidelines note that anything in the 200-600 ms range means good TTFB, but honestly, if it’s higher than 500 ms that indicates there’s some work to do.
How To Reduce TTFB or Server Response Time Step by Step Guide
1. Use Fast DNS Hosting
The speed and quality of your DNS hosting have a huge impact on your TTFB. Fast DNS hosting can help you reduce server response times.
We typically recommend Cloudflare as your DNS host. Cloudflare is usually one of the top 3 fastest DNS hosts worldwide, ranked by dnsperf.com.
If you can’t use Cloudflare, our next suggestion is the DigitalOcean DNS hosting. It’s also fast, reliable and has a simple to use interface.
If you’re DIYing a DNS hosting move be mindful that it’s absolutely critical that every single DNS record is copied from the source of the original DNS host and moved across to the new host. Missing even one record can potentially break your IT infrastructure.
2. Use Page Caching in WordPress
You pretty much can’t run a WordPress site without Page Caching. With Page Caching in place, pages are pre-built before the visitor hits the website.
All the PHP processing and database lookups required to generate the HTML file are all done in advance and stored in the page cache. When the visitor hits the website, the server provides the HTML file immediately, so the user experiences a faster site and the load on the server is dramatically reduced.
Typically, it’ll take 1-4 seconds to generate a page from scratch whereas a cached page is available in a few hundred milliseconds (0.2-0.5 seconds). Without some form of page caching the TTFB will roughly match the page generation time so you’ll see the TTFB sit in that 1-4 second range.
WP Rocket is one of the best caching plugins on the market. It includes lots of excellent speed optimization features and is the plugin we use and recommend.
Note that some hosts come with built-in caching features. In some cases, caching features are installed but they’re either not working or are simply not enabled. If you’re using a managed WordPress host then this is worth looking at as a troubleshooting step.
Object caching is another type of caching that will help improve the TTFB of busy sites or database heavy sites too.
3. Use Good Hosting Close to Your Visitors
Ideally you want your hosting as close to the bulk of your visitors as possible. For most small businesses we’ll typically recommend Cloudways or Siteground but there are several other hosts we recommend on our Fastest WordPress Hosting page.
4. Use Edge Caching
Edge caching can reduce most of the impact of geography on site speed and TTFB and if you’re serving a global audience we recommend using it.
With edge aching in place, let’s say you are hosting your site in the US, and someone from Australia visits it. Most of the site will be loaded from the CDN server. Entire pages are cached on the CDN server called edge node.
We typically recommend Cloudflare’s APO service, which is available for $5/month.
Cloudflare’s Argo service can help reduce TTFB even further.
5. Confirm if the High TTFB is only on the Homepage or on All Pages?
Check if the TTFB issues are only present on the homepage or all pages. You can do this by testing the homepage and other pages on the site from different locations a few times. Make sure that you’re testing the correct URL. Sometimes the problem is simply the use of a wrong variation of the URL. It might be missing “www” at the front, or it’s testing HTTP instead of HTTPS and it’s the redirect causing a high TTFB.
If only the homepage is problematic, the issue might be caused by some plugin, or something else running on that page that slows it down.
6. Make Sure You Are Using HTTPS for HTTP2 protocol support
HTTP2 protocol was released in 2015, but some hosts still don’t support it. HTTP2 speeds up the communication between the browser and the hosting server dramatically.
7. Make Sure There Are No Issues in Cloudflare With Your SSL Certificate
If you’re using Cloudflare, and you have an SSL certificate, make sure that the encryption setting is set to FULL under the SSL settings. Having it set to flexible will cause poor TTFB timing.
When you’re in Cloudflare, another thing to make sure is that you’re using A records in the DNS hosting settings instead of CNAME or Alias records. Using a CNAME or ALIAS record will result in the DNS system having to do a second lookup to find the IP address. Sometimes it happens that the DNS hosting is pointing to an old IP address that still works, but is routed to a new IP address. So, it’s a good call to double-check the IP address to ensure it’s correct too.
8. Check the .htaccess File For Stuff That Shouldn’t Be There
Duplicate and excessive code in your htaccess file can absolutely cause a high time to first byte.
Often when someone manually adds speed optimization code to the htaccess file AND then installs a caching plugin (such as WP Rocket) on top of that there will end up being duplicate caching code in htaccess.
This will inevitably cause issues with TTFB and overall site speed.
Also, if your htaccess file includes some weird rules or you have hundreds of thousands of lines in there that can be a problem. In a scenario where you have thousands of redirects, it’s worth looking at moving those into a redirect plugin which will eliminate the impact on TTFB. NOTE that these redirects might work slower if they are in the plugin since they would be processed by PHP and not the htaccess file.
9. Check the Server Load and the Storage Space on the Server
Another factor that might be increasing your TTFB and bringing your site speed down is a lack of storage space on your hosting plan or server. Not having enough space to curate stuff such as log files or caching files will cause things to slow down.
There are some memory issues related to that as well because if your site is using a reasonable amount of RAM and overflowing into virtual memory, lack of free space can break how virtual memory works.
General server load can be an issue too so make sure your hosting has some CPU buffer and isn’t working at 100% load all the time.
10. Disable Jetpack’s Site Accelerator Plugin (Formerly Photon)
Some optimization features, particularly the image optimization plugin called Site Accelerator by Jetpack (former Photon), definitely cause TTFB issues. We urge you to disable it and then run a few speed tests and find out if this was your issue.
There’s better image optimization plugins than Jetpack – we typically recommend ShortPixel and Cloudflare, because the combination of these two should be way faster than Jetpack’s Site Accelerator. This article breaks down how we use Shortpixel.
11. Make Sure That Page Caching Is Actually Working
Sometimes, page caching might not be working because of permission issues on the caching folder. The folder might also contain old corrupt data and garbage that could be causing problems. Deleting the cache folder is an easy way to fix this.
You’ll find the caching folder under /wp-content/cache
Simply delete the /cache folder
**MAKE SURE you DO NOT delete the WP content folder itself.
The /cache folder is auto-created by caching plugins so you should see it reappear almost immediately after deleting it.
12. Run Query Monitor to Identify Any Errors
Query Monitor is a plugin that can help identify errors and other issues such as long database lookups that hurt your TTFB.
Install the plugin and navigate to the homepage while logged in as a WordPress admin and it’ll show red or yellow in the admin toolbar if there are errors happening under the bonnet.
13. Use the Highest Version of PHP the Site Supports
Each new version of PHP is faster than the one before it. Version 8 of PHP has just been released in March of 2021. Most hosts don’t support it yet, but versions 7.4 and 7.3 are available.
Using the highest version of PHP your site supports will help your site speed. If you’re running a really old version like 5.6 this will likely hurt your TTFB.
There’s a plugin called WP Engine that serves as a compatibility checker for PHP server support. You simply install it and run the test. If something fails the test, you manually look up that plugin or theme or whatever it is and see if its developer supports PHP 7. In most cases it does, so it’s worth checking.
14. Make Sure You Don’t Have 404s on the Page
Sometimes, 404 errors can cause TTFB issues downstream especially if the file is referenced high up in the HTML or CSS. Checking and resolving 404 errors *might* in some cases fix a TTFB problem.
15. Disable Javascript and CSS Minification Combining
Content around the web almost always tells you to minify and combine CSS and JS to fix TTFB issues – this is 100% wrong and does absolutely zero for TTFB. On the contrary, combining those tools or minifying them with a plugin can even cause an increase in server response times.
We recommend that if you have CSS minified or combined with JS, try disabling them and run a speed test. In some cases, JS and CSS minification and combining can cause a TTFB problem especially if there is a 404 related to one of those files.
Database Size and Storage Engines
A lot of people online will tell you to optimize your database . If your database is too big, that’s an issue, but realistically speaking, most WordPress databases are not bigger than a few hundred MB. Databases as big as 5, 10, or 20 GB, are considered huge and indeed problematic. But let’s focus on what matters here, and that’s choosing the right storage engine for your database. WordPress uses a MySQL database, and there are two storage engines available: InnoDB and MyISAM.
To illustrate the difference between the two, we should imagine your database as a Google or Excel spreadsheet. MyISAM protocol would only enable editing of one of those sheets or tabs at a time, which means that that tab is locked while being edited. So from the database perspective: users are visiting the site and WordPress is trying to write things to the database. One of these operations has to be put on hold because only one can go on at the time. This means that the table is locked, operations start to queue up, and it all results in things slowing down.
On the other hand, InnoDB doesn’t lock tabs. Locking can only happen on a row-level, so only one person can edit a row on the sheet or table at once. This is rarely a problem since it’s not very common that multiple rows are being edited at the same time.
There are different ways to convert from MyISAM to InnoDB, but we use a plugin from ServeBolt optimizer, which changes the storage engine on all database tables.
16. Check the Server Logs- Apache & PHP
If you are still troubleshooting, then you should probably start looking at the log files and realize what’s happening under the bonnet. Query Monitor should help you solve most of the errors, but still there might be some things happening at the lower level of the hosting and causing issues.
17. Check WP-Config.php for duplicate lines or conflicting directives
One fairly common problem we see similar to the .htaccess problem is duplicate code or conflicting directives in the wp-config.php file.
Here’s a perfect example of a site that had previously used Nitropack and had asked us to switch them to WPRocket & Cloudflare APO. The site had 4 cache directives turning it off and on and off and on which was chewing up CPU cycles on the hosting. The TTFB was sitting in the 1-2 second range. Removing 3 of the lines so the last line from WPRocket was the only line in there solved the issue.
Similar issues can also occur if you duplicate other lines in this file, for example duplicate sets of cache salt keys.
What Doesn’t Work
As we said before, minifying or combining will not bring any improvement to your TTFB or site performance in general. Also, remember not to listen to nonsense tips that tell you to mess with WordPress heartbeat, because that doesn’t do anything. In fact, it can break things. We also noted before that cleaning the database will not do anything either, so just check storage engines instead.
Want It Fixed For You?
We’ve optimized over 100’s of WordPress sites and can help make yours load lightning fast too! If you’re looking for someone to do this for you, complete the form on our homepage and one of the team will review your site and tell you what’s doable in terms of site speed.
WebP is a modern format for serving images faster than ever. If you are using WordPress, you can easily serve all images in WebP with some basic tweaks.
Most Browsers support WebP
According to Caniuse data, WebP is currently supported in 91% browsers include Apple Safari,Google Chrome, Opera, Mozilla Firefox, Microsoft Edge and Android browsers.
You can still serve JPEG/PNG as fallback for unsupported browser.
Major Benefits of using WebP format Image
In comparison to the size of normal JPG or PNG image, same dimension image WebP can serve in small bytes. Hence, Images will load faster.
Serving Quality Images in few bytes, dramatically save bandwidth.
Keep your website updated with latest trend. Don’t loss conversation due to bull-cart slow loading issue.
WebP is recommended by Google Developers. Helps you in passing “serve images in next-gen format” recommendation of Google PageSpeed Insight.
This is how you can serve WebP for a WordPress site.
Use WebP Express Plugin in NGINX
Install & Activate WebP Express, free plugin. A huge thanks to Dev.
Operation mode: Varied image responses.
Scope: Upload only.
Run Bulk Convert
For Apache users, no config requires as .htaccess does all magics.
NGINX server user need to modify configuration file with root access.
For better organization of code, I would recommend placing first inside /etc/nginx/ directory with name webp.conf then include in the main server block.
Enter below command
cd /etc/nginx/ && nano webp.conf
Paste below code using right click inside nano editor in SSH Terminal.
ShortPixel plugin can help in bulk image optimization with WebP conversion and serving as per Browser support. The best part this plugin does processing on their server so it won’t slow down your site.
If you’re Apache web server user you can use .htaccess rewriting. That’s simple.
In case of NGINX you can use below rewriting rule with the help of hosting support
This plugin is supported with WP Rocket cache plugin as well.
First, add this block before the server directive:
location ~* ^(/wp-content/.+)\.(png|jpe?g)$ {
set $base $1;
set $webp_uri $base$webp_suffix;
set $webp_old_uri $base.$2$webp_suffix;
set $root "<<FULL PATH OF wp-content PARENT>>";
root $root;
add_header Vary Accept;
if ( !-f $root$webp_uri ) {
add_header X_WebP_SP_Miss $root$webp_uri;
}
try_files $webp_uri $webp_old_uri $uri =404;
}
Placement matters. So add it carefully.
Manual method
This section is for information purposes only.
Step 1 : Adding WebP format in HTML Document
First, you need to convert your all images in WebP and along with your previous image format as the fall-back. There is some plugin like Optimus which can do this job automatically. But, I will show an another easy to do this manually.
Now, Your HTML document is ready to serve images in WebP format. Step 2 : Configure server settings Just one more step, you need to configure some Apache Webserver settings via .htacccess so browser and web server can treat it properly like all other images.
Your Web Hosting server may don’t know from which mime type this kind of format images they need to serve. So must add proper mime type. Also, it would be worth to setup expiry header for caching.
# Serve Images with correct Mime Type
AddType image/webp .webp
# Setup Cache
ExpiresActive On
ExpiresByType image/webp A2592000
Kindly note: WordPress by default do not support uploading of WebP format image. You may get the error “This file type is unfortunately not allowed for security reasons” while uploading .webp images.
So, must fix this issue by adding this code in your theme functions.php It would be helpful in case if you will upload your images directly from WordPress Dashboard > Media option.
function webp_upload_mimes( $existing_mimes ) {
// add webp to the list of mime types
$existing_mimes['webp'] = 'image/webp';
// return the array back to the function with our added mime type
return $existing_mimes;
}
add_filter( 'mime_types', 'webp_upload_mimes' );
Done.
If you need any help, please write to me at prospeedguy@gmail.com. It would be my pleasure to help you.
Further readings If you are curious to learn more about WebP, please refer these links.
Many optimizations we did a few years are ago now outdated or not recommended.
Delivering Google Fonts to get maximum performance has also changed recently as browsers implemented new features. This post is specifically on why you should self-host Google Fonts.
Outdated Performance Arguments
Argument: Browsers will already have Google Fonts cached
When you embed a Google Font, it first downloads a CSS file from “fonts.googleapis.com” and then downloads font files mentioned in that CSS file from “fonts.gstatic.com”.
Only font files downloaded from “fonts.gstatic.com” has a cache period of 1 year. The main CSS file only has 24 hours of cache lifespan.
“Browsers will already have Google Fonts cached”, yes, but to serve that cached font, the browser needs to download a CSS file every 24 hours, that too is render-blocking in most websites!
If that didn’t convince you enough, here is one more 😉.
New “Cache Partitioning” in browsers for privacy
Chrome and Safari have implemented something called “Cache Partitioning” or “double key caching”.
In simple words, files cached by website A will not be available for website B. When website A downloads a resource from “example.com/script.js”, cache it, and another website B tries to download the same file, it will have to download it again.
So a Google Font downloaded by a website will not be available for another website in the browser cache.
Under the hood, the browser uses a key to cache files. Usually, the cache key is the URL of the file. But with cache partitioning, the URL of the website which requested the file is also included in the cache key.
✅ Chrome: since v86 (October 2020) ✅ Safari: since 2013 🚫 Firefox: from v85 (January 2021)
Browsers like Edge, Opera, Brave uses Chromium engine, so expect this feature in other browsers soon.
Also, note that Chrome and Safari alone has a market share of ~80% in browsers.
Argument: Google Fonts delivers optimized fonts based on device/browser
Yes, Google delivers different fonts based on the user-agent.
But as long as you deliver self-hosted Google Font in “woff2” format, you’re targeting ~96% of the browsers.
Only Internet Explorer and Opera Mini don’t support “woff2”. In that case, you can add “eot” as a fallback and still get all advantages of self-hosting.
If your website is on good hosting or has CDN and has enabled HTTP/2, self-hosting will outperform Google CDN. Because the browser doesn’t have to make extra DNS lookups, SSL handshakes etc and reuse existing HTTP/2 connections.
When you self-host and inline Google Fonts, the browser can immediately start to download the font after receiving the first HTML. You can also leverage preload functionality.
“Yes. The open-source fonts in the Google Fonts catalogue are published under licenses that allow you to use them on any website, whether it’s commercial or personal.”
Seeing “Use cookie-free domains” error at GTmetrix Yslow or Pingdom for your site?
GTmetrix report
Why use Cookie Free Domains?
When the browser requests a static element and sends cookies with the request, the server ignores the cookies. These cookies are unnecessary network traffic. It increases page load time. Therefore, it is better to avoid cookies for static resources like CSS, JS, Images, etc. files. This is why speed test tools such as GTMetrix and Pingdom recommend to serve the static resources from a domain that doesn’t set cookies.
Solutions
Use a CDN
Use Cloudflare only for DNS
#1. Use a CDN to Serve Cookie-Free Content
As unnecessary cookies can come from various sources such as Cloudflare, Analytics, top-level domain names and so on, it’s better to completely offload static resources to a CDN unique hostname.
Use BunnyCDN to serve all static resources cookies-free.
Or, use Stackpath (Formerly known as MaxCDN), they support cookie-free domains.
Strip all cookies with Stackpath CDN
This method should work for site using top level (non-www) domain or www alias.
Bonus tip: If you’re using Yoast SEO WordPress plugin, it would be best to update the image path in XML file. You can add the below snippet via Code Snippets plugin.
Generally, you can’t serve cookie-free content while using its CDN (Reverse Proxy) services together. The way Cloudflare provide services, it must add a special cookie namely _cfduid with each HTTP request over whole domain.
Solution: To eliminate __cfduid cookies, keep Cloudflare in DNS only mode or switch to Enterprise Plan that allow to remove but it would be costly. Alternatively, you can use Sucuri performance and security solution which doesn’t set cookies with each request.
#3. Switch to Static WordPress
This blog is live example a static WordPress site. It is hosted at BunnyCDN Cloud Storage. I am huge fan of their services and amazing support.
Key facts
It helps serving pages without cookies.
The process require deep technical understanding of CDN, Caching Policy and end result is worth it.
I use Cloudflare only as DNS not proxy.
My all pages score 90+ at PageSpeed Insight
I use WordPress just as CMS in backend but end user interact with HTML pages.
By converting WordPress to HTML you can make your website faster than 99% of the world.
How to check either my domain/subdomain cookiesless or not?
Check at Network Tab of Chrome Developer tool or using GTmetrix.
Final words: I have tried my best to explain this tutorial to you. If you have any questions in mind, or couldn’t understand this tutorial at any part. Please feel free to write to me at prospeedguy@gmail.com. I would be happy to reply to your queries.
Performance is not just about “my site loads under x seconds”. There are several other factors you need to look into.
Here is a list of tools and services I use to audit or test the performance of a WordPress site. Not just WordPress, these can be used for any site.
1. Your Eyes – The Eye Test
Don’t get me wrong.
Let’s take an example, Wp-Rocket WordPress plugin. It helps to prefetch inner pages in the background and loads pages instantly on user navigation. This gives a much better user experience.
I haven’t seen any tools who can measure these.
Whether your tools give you the perfect score or loads in a few hundred milliseconds, always test your site through naked eyes.
2. Chrome Developer Tools
Google Chrome Developer Tools comes with several handy tools to audit a website. Open developer tools by Ctrl+Shift+I or Ctrl+Opt+J.
2.1 Network Monitor
Network monitor gives a detailed view of what all requests are made by the browser, its response, timings etc.
Status – Easy to figure out if any resource is not available
Protocol – Checks HTTP1.1, HTTP2, Quic etc
Type – File type returned, easy to figure out WebP is working
Size – Amount of data transferred, with and without Gzip. ‘Disk Cache’ or ‘Memory Cache’ indicates browser caching is working
Priority – Priority of each file which browser requests. CSS, JS, Fonts have high priority, images – Low, SendBeacon (Google Analytics), prefetch (Wp-Rocket) have the lowest.
Waterfall – A waterfall of the data requested and received. Also, provide in-depth data of DNS lookup, TCP connection, SSL, TTFB, etc. Easy to debug lazy loading too
2.2 Audits
Test your site for performance, PWA, best practices, accessibility and SEO. You can also choose device and throttle network speed and CPU.
You can use the ‘Lighthouse’ tool which I mentioned below to get the same results.
2.3 Security
How does security relate to performance?
The version of TLS can dramatically affect the TTFB. The latest version is TLS 1.3.
3. Google PageSpeed Insights
Google PageSpeed Insights is one my favourite tool among all. What I like about it is, instead of just focussing on ‘load time’, it measures user experience up to a point.
Some people complain that it doesn’t show fully loaded time. I believe Google doesn’t show it because it’s not a good way to measure a site.
GTmetrix will analyze your site and can recommend what all things are needed to be fixed. Also, give you some scores and fully loaded time. You can also choose the region for test, device, browser etc.
GTmetrix provides a Waterfall of all the requests made from the website, which I found very useful.
Most of the time people look into scores and fully loaded time. The factors that I mainly look into are in the ‘Timings’ tab.
5. GTmetrix Monitor
GTmetrix also comes with a monitor that will periodically check your site and send you a weekly digest. I no longer have to analyze my site again and again if I update something in my site.
Their free plan (Basic plan) provides 3 URLs to monitor.
6. Pingdom Speed Test
Pingdom Speed Test is a free tool provided by the SolarWinds. It’s is very similar to GTmetrix, provide you with a report with scores and load time.
But what I like about this tool is that it shows a breakdown of size and no. of requests per domain, file type etc. This gives a quick view of where to optimize.
7. Pingdom Monitoring
What if your server is going down occasionally or your site is inaccessible to some users on heavy traffic?
Pingdom is a ‘Website Performance and Availability Monitoring’ company. Pingdom monitor will continuously monitor (say every 5 mins or 30 secs) and will alert you if something goes wrong.
There is no free plan. Paid plan starts at $14.95/month.
8. WebPageTest
WebPageTest is one of the oldest and reliable tools. Test your website multiple times from the same device. It’s very useful to see how effectively “browser caching” is working. Also provide some key metrics like TTFB, keep-alive, compression, browser caching, cdn etc.
I’m not a big fan of their UI 😉 so I don’t use it that often.
9. KeyCDN Performance Test
Most of the tools I listed above will test TTFB (time to first byte or server response time) from a single location. KeyCDN Performance Test will analyze your site from 14 locations with just a button click and provide a report of DNS lookup time, connection, TLS and TTFB.
10. Uptime Robot
Similar to Pingdom Monitoring, Uptime Robot monitors your site for the downtime and will alert you.
The free plan allows 5 mins of monitoring intervals.
It’s highly recommended to monitor your hosting/server, especially if you’re on a shared hosting
11. Google Analytics Site Speed
Google Analytics uses HTML5 Navigation Timing API to collect performance metrics from 1% of your users (configurable). You can view it under Behaviour -> Site Speed.
What’s so special about GA Site Speed is that data is collected from real-world usage. All other tools use the high-performance network or an emulated network to do the test, which might be different from real users. What if most of your users are still on 3G?
12. Loader.io
What if one of your blog posts went viral? Are you sure that your server/hosting provider could handle it? You might be losing a good amount of users and affecting SEO badly without your knowledge.
Don’t assume and believe in “unlimited” traffic. Better do a load test and figure out how many visitors you can handle.
Loader.io makes it easy to send 10k requests/second to your site and see how it performs.
13. dotcom-tools
dotcom-tools tests your site from 25 locations, both first and repeat first. I also use this tool to prebuild cache of CDN after a purge.
14. Lighthouse
Lighthouse is another tool provided by Google. It’s built inside Google Chrome.
Lighthouse tests Performance, Accessibility, Best Practices and SEO. The ‘Performance’ report will be the same as in Google PageSPeed Insights. But in a single tool, you can test all of them.
You can test it directly from your Chrome Browser’s ‘Audits’ tab in developers tools or go to https://web.dev/measure
If you’re reading this article, chances are you’ve run into an “Avoid an excessive DOM size” warning from Google Lighthouse.
Part of selecting a good theme choice in WordPress is to avoid an excessive DOM size. Before you install the theme on your website, do some research on other websites that utilize it. Verify the performance of those websites with Google PageSpeed Insights.
The loading performance of a web page is one of the factors that influence getting good SEO positioning. And this is a topic where the DOM size of a page is critical.
When a website is assessed using page speed tools such as Google Page Speed or GTmetrix, the error ‘Avoid an excessive DOM size’ displays. If you’re unfamiliar with the word and want to learn more about it, you’ve come to the correct spot. This post will cover everything you need to know about avoiding an excessive DOM size in WordPress.
What is the DOM?
Your browser creates a tree structure of the objects called DOM (Document Object Model) every time it loads a web page.
DOM is a tree diagram of objects in your HTML. It shows each HTML element such as the body or h1 with its own node.
DOM represents the hierarchical nature of different objects which may or may not depend on each other. As mentioned earlier, it displays the webpage’s HTML structure as a tree, composed of a series of tags.
Here’s how it works: when your web browser starts preparing a page to display it, it generates an object tree diagram of all the page elements according to its HTML structure.
As a result, whenever it receives an HTML file, it begins by converting it into a tree-structured form called DOM or DOM tree. You can access the DOM and modify it using JavaScript.
Here are some key terms related to DOM:
Nodes. Each element or tag in the DOM is called a node or leaf in the DOM tree.
Depth. The number of elements in a branch of a DOM is called depth.
Child element. The last node which doesn’t branch any further is called a child element.
When analyzing your site through Google PageSpeed Insights you might have seen an error like “Avoid an excessive DOM size”:
Or in GTmetrix “Reduce the number of DOM elements”:
How DOM Size Impact Performance?
Excessive DOM size can impact performance in different ways.
Higher parse and render time (FCP) – A large DOM tree and complicated style rules make a huge work for the browser. The browser has to parse the HTML, construct a render tree, etc. Every time user interacts or something in HTML changes, the browser has to compute this again.
Increases memory usage – Your JavaScript code might have functions to access DOM elements. A larger DOM tree causes JavaScript to use higher memory to process these. An example would be a query selector like document.querySelectorAll('img') which lists all images, commonly used by lazy loading libraries.
Increases TTFB – As your DOM size increases, the size of the HTML document increases (in KBs). Since more data has to be transferred over the network, this increases TTFB.
How to avoid an excessive dom size Technically?
For example, technically reducing DOM size is simple as:
Basically, get rid of every possible HTML element. You can also use Flexbox or Grid to further reduce DOM size.
But since you’re using WordPress, this isn’t gonna help you much!
How to avoid an excessive DOM size in WordPress?
Lazy Render below-fold contents
You can tell the browser to lazy render the contents (or elements) if it’s not required for the above fold. It’s just like lazy loading images, but for HTML elements.
Split large pages into multiple pages
Do you have a page with everything you got on the site? Like services, contact forms, products, blog posts, testimonials, etc?
Try to split them into multiple pages and link to them from the header/navbar.
Lazy load and Paginate everything possible
Lazy load every possible element. Some examples could be:
Paginate comments – If you have hundreds of comments, this can also affect DOM size. Paginate comments by going to Settings -> Discussion -> Break comments into pages.
Limit related posts count – Try to limit the related posts count to 3 or 4.
Note: Lazy loading images won’t reduce DOM size
Don’t hide unwanted elements using CSS
Sometimes you might need to remove elements injected by the theme/builder. For example, add to cart button in product pages, rating button, author info, published date, etc.
A quick solution is to hide them using CSS:
.cart-button {
display:none;
}
Even though this solution looks easy, you’re serving unwanted code to users (which includes both HTML markup and CSS styles).
Check your theme/plugin settings to see if there is an option to remove it. Otherwise, find the respective PHP code and remove/comment on them.
Use well-coded themes and page builders
A good theme has a major role in DOM size. Use well-coded themes like GeneratePress or Astra.
Page builders also inject too many divs. Use builders like Oxygen that doesn’t inject unwanted divs and have more control over the HTML structure.
In early 2019, Google announced that they would evaluate a website’s speed ranking by focusing on two performance metrics: First Contentful Paint (FCP) and First Input Delay (FID).
Over time, the performance scenario has evolved. For instance, Google announced the three Core Web Vitals: Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), and First Input Delay (FID).
Nonetheless, the First Contentful Paint metric has continued to play an important role as a Lighthouse (and user experience) metric. It accounts for 10% of the overall performance score.
Your website may load under 2 seconds in a speed test, but if that’s not the case for a majority of your audience, then Google will still penalize you.
In this article, you’ll learn what’s FCP and why it’s important. Next, we’ll move on to various ways you can improve FCP on your WordPress site.
Sounds exciting? Let’s dive in!
What is First Contentful Paint (FCP)?
First Contentful Paint (FCP) is a user-centric metric for measuring perceived page load speed. FCP measures how users perceive the performance of a website, rather than what a speed test tool measures.
First Contentful Paint differs from First Paint, which is a point in the page load timeline where any type of render is detected on the browser. On the other hand, FCP requires some content to be rendered. This content could be text, images (including background images, logos), or non-white <canvas> elements.
First Contentful Paint also differs from the Largest Contentful Pain (LCP), one of the Core Web Vitals measuring how long it takes for the largest element to become visible in the viewport.
To keep it simple, you can think of FCP as the time it takes for the user to see any content on their browser. Thus, a fast FCP reassures the user that something is happening and keeps them glued to the site.
Google recently made an announcement that they’re ranking websites based on FCP and FID.
They categorize websites into Slow, Moderate and Fast
“But my website loads in 2s” Why does this matter?
The Field Data is the data collected from the Chrome User Experience Report (Crux). Chrome collects data from real users.
Your testing tools might say your website loads in 2s or less. But your audience might be from different locations, with different devices and network speed.
Field Data tells the actual speed that your users are experiencing.
So if you’re trying to figure out how to reduce FCP, here are some tips:
1. Reduce TTFB
FCP = TTFB + render time.
So you’ve to reduce TTFB to reduce FCP.
There are several techniques to reduce TTFB in WordPress. The easiest one is to use a good cache plugin like WP Rocketand a good hosting provider like Cloudways.
2. Remove Render-blocking resources
Once the browser receives the HTML content, it may have to download extra resources in order to start rendering.
They’re usually CSS and JavaScript.
For JavaScript, you’ve to add a defer attribute to the script tag. The defer attribute tells the browser to only execute the script file once the HTML document has been fully parsed.
For CSS, we’ve to load them at the bottom, asynchronously.
Almost all cache plugins can do both. What I usually recommend is WP Rocket since it can generate critical CSS too.
Generate Critical CSS
When you load CSS asynchronously, the browser doesn’t have the necessary styles required. This will create Flash of Unstyled Content of FOUC.
To prevent this, we’ve to generate Critical CSS.
Critical CSS is the CSS that is required to render the above fold contents. It’s inlined in the HTML so that no resources need to be downloaded and the browser can immediately render the content.
3. Use well-coded themes and page builders
A good theme has a major role in reducing FCP. Use well-coded themes like GeneratePress or Astra.
Page builders also inject too many divs and unwanted CSS. Use builders like Oxygen that doesn’t inject unwanted divs and has more control over everything.
Anything that requires JavaScript to be executed to render can harm First Contentful Paint.
So as a thumb rule, avoid elements that require JavaScript to render in the above fold, like these:
Sliders like Revolution slider
Google Ads
Mega Menu plugins
Animations
5. Preload Pages in the Background
By preloading pages in the background, whenever a user navigates to a page, the page is loaded instantly without any delay.
Link prefetching is a browser mechanism, which utilizes browser idle time to download or prefetch documents that the user might visit in the near future.
Mozilla Docs
Note that this will not help for the initial page load, only for the inner pages.
The code looks like this:
<link rel=”prefetch” href=”URL_TO_PAGE”>
6. Exclude ‘Above Fold’ Images from Lazy Loading
Lazy loading usually requires JavaScript to be executed before displaying images. This can delay rendering images in the above fold.
Always exclude images in the above fold from lazy loading. Most of the lazy loading plugins have this feature.
7. Inline ‘Critical’ Images
Inlining images mean the browser doesn’t have to make another HTTP request to download the image. The content of the image is already inside the HTML.
A normal image in HTML:
<img src=”https://yout-site.com/logo.png”/>
A base64 image in HTML (inlined):
<img src=”data:image/png;base64,…[content]…”/>
8. Reduce DOM Size
When your browser receives an HTML document, it has to be converted to a tree-like structure which is used for rendering and painting with the help of CSS and JavaScript.
This ‘tree’ like structure is called DOM or Document Object Model.
The more elements you add into a page, render time and First Contentful Paint increases.
9. Ensure Text Remains Visible during webfont load
You may have seen an error like this in Google PageSpeed Insights:
Font files are usually added in the CSS files.
For a browser to get the fonts ready, it has to parse HTML, download CSS files, parse them, and download fonts files.
Until these all are done, the text is invisible! Also called Flash of Invisible Text (FOIT).
You can fix this by adding a display:swap to CSS (@font-face). This tells the browser to use a default font until the actual one is downloaded.
Conclusion
As Google has started to put more focus on site speed, improving FCP is no longer a ‘good to have’, it’s a ‘necessity’.
Not just Google, FCP and FMP are the metrics which says when a site is ‘visible’ to the user. Measuring fully loaded time is not always enough.
In this post, we’re going to break down and share how we optimize the WordPress database connection and database queries when working on site speed. A slow WordPress database connection or slow queries will typically manifest in areas in WordPress that aren’t cached like the WordPress backend, checkout pages in WooCommerce, or membership pages on a membership site.
How To Speed Up & Optimize WordPress Database Queries
There’s no magic when it comes to website speed optimization and speeding up the database end of WordPress is the same. Ultimately, the way in which you can speed up WordPress database connection & queries could be summarized as:
Use better hosting;
Use object caching powered by Redis or Memcached (memory based database caching);
Reduce the load on the site and database;
Configure the database in a best practices fashion.
How to Speed Up WordPress Database Connection & Queries
The recommendations below can be a bit technical, so if you have a question or need anything clarified, please post in the comments.
Use a Good Host That Ideally Has Memcached or Redis Caching Having a high quality, reliable hosting provider that supports Memcached or Redis caching is of crucial importance. Memcached and Redis are types of memory caches that can be used for Object Caching – basically WordPress database caching.
Redis is probably faster in most cases but Memcached is generally more widely available. These are applications installed on the server or hosting itself.
How To Speed Up & Optimize WordPress Database Queries 2
If you have a VPS that you’re in control of you should be able to install one of these apps on it. If you have a site that is heavy on database queries it’s worth looking at a host with object caching capability. Here’s three we regularly recommend that check this box:
Siteground – Siteground is a solid mid-range host and they support Memcached and have a tutorial on how to configure it. Cloudways – has its VPS servers located in more than 60 places worldwide. These guys offer truly affordable hosting plans starting at $10/month. Cloudways supports both Memcached and Redis. *Kinsta – is a managed WordPress host and offers Redis as an addon option.
Use Object Caching Object caching is a type of database caching that can dramatically speed up sites that have database heavy operations. Woocommerce checkout and cart operations, order management on the backend and almost everything that happens behind the logon on a membership site are all database heavy operations that will benefit from Object Caching.
The object cache sits in front of the database and can answer previous database queries (if in the cache) without talking to the database.
How To Speed Up & Optimize WordPress Database Queries 3
Your host will need to support Redis or Memcached in order to use object caching and we typically use the Redis Object Cache plugin from Till Kruss inside WordPress to power the caching.
Broadly, the steps to get this up and running are:
Install Redis or Memcached or check with your host whether they support it; Add a cache salt key in wpconfig.php (important because without this, caches may jump between sites); Install and enable the Redis Object Cache plugin.
Use the Highest Version of PHP the Site Supports PHP is the programming language WordPress is built on. New versions of PHP get released regularly (every 6-12 months), and each version is typically 10-30% faster than the previous version.
Using the highest version of PHP that your site supports can dramatically speed up database-related operations.
Reduce the Load by Using Page Caching You pretty much can’t run a WordPress site without Page Caching. With Page Caching in place, pages are pre-built before the visitor hits the website, which is a great way to speed up WordPress data queries.
All the PHP processing and database lookups required to generate the HTML file are all done in advance and stored in the page cache. When the visitor hits the website the server provides the HTML file immediately so the user experiences a faster site and the load on the server is dramatically reduced. Typically it’ll take 1-4 seconds to generate a page from scratch whereas a cached page is available in a few hundred milliseconds (0.2-0.5 seconds)
How To Speed Up & Optimize WordPress Database Queries 4
WP Rocket is one of the best caching plugins on the market. It includes lots of prominent features, so it stands out as the plugin we highly recommend to everyone who wants to speed up WordPress data queries and improve their website’s performance.
5. Reduce the Load by Using Cloudflare CDN
Even if you are using a low-quality host, Cloudflare can greatly decrease your site’s load times even on the free plan.
Cloudflare offers several speed optimizations and speed benefits such as:
How To Speed Up & Optimize WordPress Database Queries 5
Fast DNS (Domain Name System) hosting – Cloudflare is typically one of the fastest DNS hosts in the world, see https://dnsperf.com for real time rankings Security & Firewall even on the free plan Cloudflare can filter a lot of the garbage traffic hitting your site. There’s some custom rules we typically add to boost speed further, see this article. The $5/month plan includes Cloudflare’s APO service that does edge caching. With edge caching, entire pages from your site are stored on Cloudflare’s servers (aka “edge”) which removes most of the impact of geography on site speed AND can increase the volume of traffic your site can handle from 2-50x On the $20/month plan (which we recommend for bigger sites) Cloudflare also provides a full firewall, image optimization and bunch of other site speed optimizations. If you can’t use Cloudflare, at least use a CDN service (one that has image optimization built-in like Bunny CDN). CDN is very useful in speeding up the response of static assets such as CSS, JS, images, and fonts.
Make Sure Your Database Is Using the Innodb Storage Engine for All Tables InnoDB and MyISAM are “storage engines” used by MySQL – essentially the format the database stores its database. MyISAM was a default table type until MySQL 5.5.5 was introduced in 2010. Innodb tables are faster than MyISAM so ensuring the tables are using the Innodb storage engine can dramatically speed up queries.
MyISAM Table
There are several differences between the two but in simple terms, MyISAM tables will lock a database table while it’s being written to. This means that on a busy site these database write operations start to queue and cause delays in processing which manifest as slower loading to the user.
Think of the database table as an Excel spreadsheet where if one person has it open, another person can’t make any edits.
Innodb tables only lock the row in the database table that’s being written to, so there’s little to no database queuing. It’s like using a shared Google Sheet that multiple users can work on at once.
Converting from MyIsam tables to Innodb tables can give you a solid speed boost particularly in the backend and on higher traffic sites.
InnoDB Table For most affiliate sites, the database will be a few hundred megabytes at most, so we use a plugin called Servebolt Optimizer (https://wordpress.org/plugins/servebolt-optimizer/ ) to do the conversion. If your database is over 1 GB in size, you might need to run the convert operation a couple of times.
If the database is big, e.g. several GB, don’t do this during peak times, and probably not a good idea to do the conversion using this plugin as you’ll wind up knocking over the server for a reasonably long period of time. Better to do this at the database level itself in PHPMyAdmin and probably wise to get a developer to do this for you.
Disable Any Plugins and Tools You’re Not Using Unused plugins and tools might be another reason for slow WordPress database queries, especially when it comes to older websites. Go through all plugins and tools your site uses, and delete or disable those that are no longer used.
From a speed point of view, cutting the number of plugins should improve your site’s performance.
Delete Expired Transients for Your Database The transients API in WordPress makes way for developers to store temporary information in the WordPress database and assign it an expiration time, after which it will be deleted. This eases server load and improves WordPress performance.
Sometimes, transients expire or disappear before their set timeframe, or don’t have the expiring time. Old and expired transients can increase the site load and negatively influence its performance. There’s a number of different plugins that can delete expired transients, like WP Rocket as well as WP Optimize.
Use the Query Monitor Plugin to Identify Database Hogs Query Monitor is a WordPress plugin that allows debugging WordPress’ slow database queries, hooks and actions, PHP errors, editor blocks, HTTP API calls, enqueued scripts and stylesheets, and more. It also helps you to efficiently find out if plugins, themes, or functions perform poorly. Query Monitor comes with some advanced features that are extremely useful with debugging Ajax calls, REST API calls, and user capability checks.
Query monitor home page Installing the Query Monitor plugin and performing operations on the frontend and backend of the site will identify slow pages, large database queries and memory hogs.
Query Monitor is free – https://wordpress.org/plugins/query-monitor/
Update All Plugins to the Latest Versions This is yet another way to speed up WordPress data queries. Quite often older plugins have minor incompatibilities with the current WordPress version or PHP version being used. Usually these issues will appear in Query Monitor but occasionally not. Making sure all plugins are up to date can eliminate these problems.
Pay special attention here to paid plugins that come from Themeforest/Envato or a third party where there may be several updates available but the plugin itself does not show any updates available.
Analyze Server Logs to Identify Any Resources Getting Hammered Sometimes looking at server log files can help identify particular resources that are getting hammered or errors happening under the bonnet.
Again the Query Monitor plugin will usually unearth errors that would show up in the server log but occasionally not.
Often we find SEO crawlers hammer Woocommerce sites adding and removing thing to the cart and wishlist rapidly over the course of a few seconds chewing up a huge volume of server resources so blocking these crawlers can be useful. Likewise brute-force attacks on the WordPress backend login screen can have a similar effect.
Reduce Load Further by Using Wordfence or Another Security Tool As per the previous point, using security tools can help reduce the volume of scrapers, crawlers and otherwise nefarious visitors chewing up server resources.
Typically we recommend using the $20/month version of Cloudflare which has a true stateful firewall built into it so it can intelligently block traffic as well as the free version of Wordfence which will help reduce brute force attacks and anything that slips through Cloudflare.
Further help…. I hope you found this post useful. If you’re looking for help specifically with high database load, our Consult Services is probably the service that can help you. If you’re unsure, head to the homepage and submit a free site speed audit request.
Want to go faster, rank higher in Google & get more customers? Sign up now and join 1000s of other subscribers and get cutting edge tactics & techniques we’ve learnt after optimizing 4000+ websites