WordPress

WordPress Performance Optimization

By the Domain India teamPublished 6 min read
Knowledge base article
Contents (5 sections)

A fast WordPress site comes from a few fixes done in the right order: measure, add one page-caching plugin, remove what is heavy, tidy the database and lighten the pages. This checklist gives the short version for Domain India shared hosting, where the web server is Apache and OPcache is already on.

Key takeaways

Measure a slow page first, then take a backup. Install one page-caching plugin, WP Super Cache or W3 Total Cache, because our shared hosting runs Apache, not LiteSpeed. Update WordPress and PHP, find heavy plugins with Query Monitor, clean the database, resize images and serve WebP. Compression is already handled by the server, so you don't need to set it up.

For the full guide

Every step below is explained in detail, with the reasons behind it, in Optimizing WordPress. If you don't know yet whether the server or the page is slow, start with My website is slow.

1. Measure before you change anything

Run the slow page through PageSpeed Insights or WebPageTest and write down the time to first byte (TTFB) and the Core Web Vitals. Google counts a page as good when Largest Contentful Paint is 2.5 seconds or less, Interaction to Next Paint is 200 ms or less and Cumulative Layout Shift is 0.1 or less.

A slow TTFB points to the server side: PHP, the database, plugins or your account's limits. In cPanel, Metrics › Resource Usage shows whether your account is hitting its limits; see checking hosting resource usage.

2. The checklist

  1. Back up.
    cPanel and DirectAdmin keep weekly JetBackup 5 backups, but take your own copy of files and database before you start.
  2. Update everything.
    WordPress, plugins, themes and PHP. Choose the newest PHP 8 version your site works with, then test your key pages.
  3. Add page caching.
    Install WP Super Cache or W3 Total Cache and turn page caching on. Keep only one caching plugin active.
  4. Find heavy plugins.
    Query Monitor shows the slowest queries and which plugin made them. Replace or delete the culprits.
  5. Clean the database.
    Limit post revisions, empty spam and trash, and remove expired transients with a maintained plugin such as WP-Optimize.
  6. Lighten the pages.
    Resize images, serve WebP, and cut sliders, widgets and font weights you don't need.
  7. Measure again.
    Compare with your first numbers, so you know which change helped.
LiteSpeed Cache won't cache pages here

Domain India shared hosting (cPanel, DirectAdmin and Webuzo) runs the Apache web server. LiteSpeed Cache's page cache needs a LiteSpeed server, so use WP Super Cache or W3 Total Cache instead.

3. What the server already does for you

  • OPcache keeps compiled PHP in memory. It is on for websites on our cPanel servers, and on DirectAdmin for every PHP version except 8.3. Details are in the PHP OPcache guide.
  • Compression: on cPanel, the nginx front end gzips HTML, CSS, JavaScript, JSON, XML and SVG; DirectAdmin has gzip compression on server-wide. There is no Brotli, and you don't need a plugin for compression.
  • WebP: PHP's GD library on our cPanel servers supports WebP, so WordPress can create WebP images on upload.

4. Browser caching

Browser caching tells returning visitors to reuse images, CSS and JavaScript instead of downloading them again. W3 Total Cache can set this for you. To do it by hand, add this to the .htaccess file in your site's folder (mod_expires is loaded on our cPanel and DirectAdmin servers):

apache
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/avif "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType text/javascript "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
</IfModule>

Use a long lifetime only for files whose names change when you update them, as WordPress themes and plugins usually do with version numbers.

5. When optimising is not enough

If Resource Usage still shows regular faults after caching and plugin clean-up, the site has outgrown its plan. You can upgrade and pay only the difference for the rest of your term; see upgrading your hosting package. A busy shop that needs its own server tuning suits a self-managed VPS.

cPanel Growth
₹200/mo + GST
  • 50 GB NVMe SSD Storage
  • 100 GB Monthly Bandwidth
  • 5 Websites
  • 50 Email Accounts
See plan details

Prices on the cards exclude 18% GST.

What is the best caching plugin for WordPress on Domain India hosting?

WP Super Cache or W3 Total Cache. Domain India shared hosting runs the Apache web server, not LiteSpeed, so LiteSpeed Cache cannot provide page caching there. Keep only one page-caching plugin active at a time.

Do I need a plugin to enable gzip compression?

No. On Domain India cPanel hosting the nginx front end already compresses HTML, CSS, JavaScript and other text files, and DirectAdmin has compression on server-wide.

Is OPcache enabled for WordPress on Domain India?

Yes on our cPanel servers. On DirectAdmin it is enabled for every PHP version except PHP 8.3. OPcache settings cannot be changed from a shared hosting account.

How fast should my WordPress site be?

Aim for Google's good Core Web Vitals: Largest Contentful Paint of 2.5 seconds or less, Interaction to Next Paint of 200 ms or less and Cumulative Layout Shift of 0.1 or less. PageSpeed Insights shows all three for your page.

Will a bigger hosting plan make WordPress faster?

Only if your account is really hitting its resource limits after you have added caching and removed heavy plugins. A bigger plan does not fix a plugin that runs a slow query on every page.

Ready to speed up your site? Work through Optimizing WordPress, or open a support ticket with the slow page's URL and your test results.

Still slow after the checklist?

Send the page URL, when it is slow and what you have already tried, and we will check your account's resource usage and logs with you.

Open a support ticket

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
WordPress Performance Checklist | Domain India