Skip to content
WordPress and WooCommerce5 min read

How to speed up a WordPress site

Short answer

Measure first, then run the newest PHP version your plugins support and turn on page caching with the LiteSpeed Cache plugin on a LiteSpeed server. After that, resize images and serve them as WebP, clean the database and remove plugins you don't need. These steps fix most slowness without touching your design.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Before you start
  2. Steps
  3. Troubleshooting
  4. On ArabyHost

WordPress slowness comes from two places: the time the server takes to build the page (shown as TTFB) and the time the browser takes to download and render images and files (shown as LCP). Caching, the PHP version and the database fix the first; images and CSS/JavaScript optimisation fix the second. Work through the steps in order and measure after each one.

Before you start

  • Take a full backup (files and database) before changing anything.
  • Admin access to WordPress, and access to cPanel.
  • A baseline: test the home page and one post or product page in PageSpeed Insights on mobile, and note LCP and TTFB. Read up on Core Web Vitals if they’re new to you.

Steps

1. Run a current PHP version with OPcache

In cPanel open Software → Select PHP Version (or MultiPHP Manager) and choose 8.2 or 8.3 if your theme and plugins support it. Make sure the opcache extension is ticked on the Extensions tab. Then browse the site and the dashboard; if something breaks, switch back and update the plugin responsible. Details in choose your PHP version.

2. Install LiteSpeed Cache and turn on caching

  1. Deactivate and delete any other caching plugin, and remove its leftover rules from .htaccess.
  2. Under Plugins → Add New, search for LiteSpeed Cache, install and activate it.
  3. Under LiteSpeed Cache → Cache:
    • Enable Cache: ON.
    • Cache Logged-in Users: OFF, unless you run a membership site and know how to configure it.
    • Cache Mobile: OFF, unless your theme serves different markup to phones.
    • On the Browser tab, turn on Browser Cache.
  4. Load the site twice in a private window, then check the response header:
curl -sI https://example.com/ | grep -i x-litespeed-cache

x-litespeed-cache: hit means the page is served from cache. WooCommerce is supported out of the box: cart, checkout and my-account pages are excluded from caching.

3. Optimise CSS and JavaScript carefully

Under LiteSpeed Cache → Page Optimization, enable one option at a time and check the site after each:

  • CSS Settings: turn on CSS Minify. Try CSS Combine, then test the layout thoroughly.
  • JS Settings: turn on JS Minify and set Load JS Deferred to Deferred. Leave JS Combine off at first: it’s the option most likely to break things.
  • HTML Settings: turn on HTML Minify and Remove WordPress Emoji.

After every change, click Purge All in the LiteSpeed toolbar at the top.

4. Resize images and serve WebP

  • Resize images before uploading: an in-post image doesn’t need to be 4000 pixels wide.
  • Under Page Optimization → Media Settings, turn on Lazy Load Images and Add Missing Sizes, and exclude the main above-the-fold image from lazy loading under Media Excludes, since it’s usually the LCP element.
  • To compress images and convert them to WebP within the plugin, connect the site to QUIC.cloud from the general settings, then open Image Optimization and enable automatic requests and WebP replacement (called Next-Gen Image Format in recent versions).

More in optimize images for speed.

5. Cut heavy plugins

Install Query Monitor temporarily, open slow pages while logged in, and look at the query count and the slowest components. Then:

  • Delete plugins you don’t use: don’t just deactivate them.
  • Replace several plugins doing the same job with one.
  • Avoid running more than one page builder, or a heavy slider plugin on the home page.
  • Remove Query Monitor when you’re done.

6. Clean the database

Under LiteSpeed Cache → Database → Manage, clean old revisions, auto-drafts, trashed posts, spam comments and expired transients, then optimise the tables. Limit revisions in wp-config.php:

define( 'WP_POST_REVISIONS', 5 );

Then look for large autoloaded options in phpMyAdmin, since they load on every request:

SELECT option_name, LENGTH(option_value) AS size
FROM wp_options
WHERE autoload IN ('yes', 'on', 'auto-on', 'auto')
ORDER BY size DESC
LIMIT 20;

Replace wp_ with your table prefix. Large options left behind by deleted plugins can be removed after a backup.

7. Run WP-Cron from a real cron job

WordPress runs scheduled tasks on visitor requests, which slows some of them down. Add to wp-config.php:

define( 'DISABLE_WP_CRON', true );

Then under cPanel → Advanced → Cron Jobs, add a job every 15 minutes:

*/15 * * * * /usr/local/bin/php /home/USERNAME/public_html/wp-cron.php >/dev/null 2>&1

Replace USERNAME with your account name, and use the cron generator for a different schedule. Under LiteSpeed Cache → Toolbox → Heartbeat, also reduce the Heartbeat frequency on the front end and in the dashboard.

8. Measure again

Re-test the same pages in PageSpeed Insights and compare TTFB and LCP with your baseline. For the bigger picture, see the complete website speed guide.

Troubleshooting

  • Layout broken, or a menu or slider stopped working after optimising: turn off the last option you enabled (usually JS Combine, CSS Combine or Load JS Deferred) and click Purge All.
  • Visitors don’t see your changes: the old page is still cached. Click Purge All, and if you use Cloudflare, purge its cache too.
  • No x-litespeed-cache header: another caching plugin is active, you’re testing while logged in, or the server isn’t running LiteSpeed.
  • WooCommerce cart shows the wrong items: make sure cart and checkout are excluded under Cache → Excludes, and don’t cache logged-in users without a reason.
  • 508 Resource Limit Is Reached or heavy slowdowns under traffic: the account is hitting its resource limits, often because of a heavy plugin or bot traffic. See error 508.

On ArabyHost

ArabyHost sites run on a LiteSpeed web server, so LiteSpeed Cache’s page caching works straight away with no extra server setup. You can choose PHP 8.1 to 8.3. Each account is isolated with CageFS and has its own resource limits (LVE); if you keep hitting error 508, the site needs optimising or a larger plan. If an option you enable causes an error, the Araby AI assistant reads the error log and explains the fix, and daily backups let you roll back. See our WordPress plans.

FAQ

Can I use LiteSpeed Cache together with another caching plugin?

No. Use one caching plugin only. Running LiteSpeed Cache alongside WP Rocket, W3 Total Cache or WP Super Cache causes conflicts and stale pages. On a LiteSpeed server, LiteSpeed Cache is the natural choice.

Why is the WordPress dashboard still slow when the site is fast?

Caching speeds up pages for visitors, but the dashboard is generated fresh every time. A slow admin usually comes from heavy plugins, large autoloaded options in the database, or an old PHP version.

How many plugins is too many?

There's no fixed number. One badly written plugin can slow a site more than twenty light ones. Keep only what you really use, and measure the impact of heavy plugins with a tool like Query Monitor.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.