The ultimate guide to boost WordPress speed and performance
To speed up WordPress, measure first with PageSpeed Insights, then fix things in this order: hosting and PHP 8.3 or newer, a page cache, image size and format, and plugin and script bloat. Aim for Google's Core Web Vitals targets: Largest Contentful Paint within 2.5 seconds, Interaction to Next Paint of 200 milliseconds or less, and Cumulative Layout Shift of 0.1 or less.
Updated · By THTheme Editorial Team
Key facts
- Good Core Web Vitals: LCP within 2.5 s, INP of 200 ms or less, CLS of 0.1 or less, at the 75th percentile of visits
- INP replaced First Input Delay as a Core Web Vital on March 12, 2024
- WordPress.org recommends PHP 8.3 or greater
- WordPress has lazy-loaded images by default since version 5.5 and accepted AVIF uploads since 6.5
| Metric | Good | Common WordPress causes |
|---|---|---|
| Largest Contentful Paint (LCP) | 2.5 seconds or less | Slow server response, oversized hero image, render-blocking CSS |
| Interaction to Next Paint (INP) | 200 milliseconds or less | Heavy JavaScript from sliders, chat widgets and builder add-ons |
| Cumulative Layout Shift (CLS) | 0.1 or less | Images without dimensions, late banners, font swaps |
Free tools used in this guide
1. PageSpeed Insights
Google's free test. Shows real-visitor Core Web Vitals when your site has enough traffic, plus a lab test with specific fixes.
2. Performance Lab
From the WordPress Performance Team. Installs feature plugins such as Modern Image Formats, Image Prioritizer and Speculative Loading, some of which later move into WordPress itself, as Speculative Loading did in 6.8.
3. Query Monitor
A developer panel that flags slow, duplicate and failing database queries and shows which plugin or theme caused them.
Measure before you change anything
Test three pages, not just the home page: the home page, a typical post or service page, and your heaviest page (often a product or a page with a slider). Use mobile results, because that is where most sites fail. In PageSpeed Insights, the field data at the top is what real visitors experienced; the lab score below is a single simulated run that changes from test to test. Write the numbers down so you can tell which fix actually helped.
Fix the server first: hosting, PHP and caching
- Hosting: if the server takes more than about a second to start responding, no plugin will fix it. Move cheap shared hosting to a managed WordPress host or a small VPS.
- PHP: run PHP 8.3 or newer, the version WordPress.org recommends. Check Tools > Site Health > Info > Server.
- Page cache: serve saved HTML instead of building each page. See the caching plugin roundup, and the WooCommerce caching guide if you run a store.
- Object cache: Redis or Memcached helps logged-in users and stores. Many hosts offer it with one click.
Images: the biggest easy win
- Upload images close to the size they display. A 4,000 pixel photo in an 800 pixel column wastes bandwidth even after compression.
- Serve WebP or AVIF. WordPress accepts AVIF uploads since 6.5, and optimizers such as Imagify, ShortPixel and EWWW convert existing libraries.
- WordPress lazy-loads images by default, but the main image at the top of a page should load right away. If your LCP element is lazy-loaded, exclude it in your cache or image plugin.
- Always keep width and height on images so the layout does not jump.
Cut plugins, scripts and database weight
Count what loads on the front end, not how many plugins you have. One chat widget or slider can cost more than ten small plugins. Use Query Monitor to see slow queries, then remove or replace the worst offenders. Limit third-party scripts such as chat, heatmaps and extra ad pixels to the pages that need them.
Then trim the database. Cap stored revisions with define( 'WP_POST_REVISIONS', 3 ); in wp-config.php, and clean old revisions, drafts and spam with a tool such as WP-Optimize. Make a backup first.
A one-hour speed checklist
- Record PageSpeed Insights results for three pages on mobile.
- Update WordPress, the theme and plugins, and switch to PHP 8.3 or newer on staging first.
- Delete plugins you do not use and remove front-end scripts you do not need.
- Install one page cache and set it up. Exclude cart and checkout on stores.
- Compress and convert images, and make sure the top image is not lazy-loaded.
- Add a CDN if your visitors are far from your server.
- Clean the database and cap revisions.
- Test the same three pages again and keep only the changes that helped.
Builders add weight too. If you use Elementor, our Elementor workflow tips include Element Caching for static widgets.
FAQ
What is a good page speed for WordPress?
Use Core Web Vitals rather than a single score: Largest Contentful Paint within 2.5 seconds, Interaction to Next Paint of 200 milliseconds or less and Cumulative Layout Shift of 0.1 or less.
Why is my WordPress site slow?
The usual causes are slow hosting, no page cache, oversized images and heavy plugins or third-party scripts. Measure first so you fix the real cause.
Does the number of plugins slow WordPress down?
What matters is what each plugin loads and runs. A few heavy plugins slow a site more than many light ones.
Which PHP version should WordPress use?
WordPress.org recommends PHP 8.3 or greater. Test the switch on a staging copy first in case an old plugin is not compatible.
Sources
- web.dev: Web Vitals
- web.dev: INP becomes a Core Web Vital on March 12
- WordPress.org: Requirements
- Make WordPress Core: WordPress 6.5 adds AVIF support
- WordPress Developer Resources: wp-config.php