How to Speed Up cPanel Hosting Website: Practical Guide
By Yoga · 23 Jun 2026 · 6 min read
Why Website Speed Matters More Than You Think
A one-second delay in page load time can reduce conversions by up to 7% and significantly hurt your search rankings. If your site runs on cPanel shared hosting, you have more performance levers to pull than most people realize. The problem is that most guides stop at vague advice like "enable caching" without telling you where to click or what to change.
This guide walks you through the most impactful, hands-on optimizations you can make directly inside cPanel — no server SSH access required for most steps.
1. Upgrade to the Latest Stable PHP Version
This is the single biggest free performance win available to any cPanel site owner. PHP 8.x is dramatically faster than PHP 7.4 or older — benchmarks consistently show 2–3× throughput improvements.
How to Change Your PHP Version in cPanel
- Log in to cPanel and navigate to Software → MultiPHP Manager.
- Check the box next to your domain.
- Select the latest stable PHP version from the dropdown (PHP 8.2 or 8.3 as of this writing).
- Click Apply.
Before you switch: Test on a staging site first. Some plugins or legacy code may use deprecated functions. Most modern WordPress themes and plugins support PHP 8.x without issues.
Check for PHP Compatibility Issues
If you are running WordPress, install the PHP Compatibility Checker plugin before upgrading. It scans your installed plugins and themes and flags any compatibility problems.
2. Enable and Configure OPcache
OPcache is a PHP bytecode cache built directly into PHP. Without it, PHP recompiles your scripts from source on every single request. With it, compiled bytecode is stored in memory and reused — dramatically cutting response times for PHP-heavy pages.
Enabling OPcache via cPanel MultiPHP INI Editor
- Go to Software → MultiPHP INI Editor.
- Select your domain from the dropdown.
- Switch to the Editor Mode tab for fine-grained control.
- Add or update the following directives:
opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.interned_strings_buffer=8
- Click Save.
What These Settings Mean
| Directive | Recommended Value | Purpose |
|---|---|---|
opcache.memory_consumption |
128 (MB) | RAM allocated to OPcache. Increase to 256 on larger sites. |
opcache.max_accelerated_files |
4000–10000 | Max files cached. Set higher for large apps. |
opcache.revalidate_freq |
60 | Seconds before OPcache checks if a file changed. |
opcache.interned_strings_buffer |
8 (MB) | Memory for interned strings. Boost to 16 on busy sites. |
Note: On shared hosting, your host may cap
memory_consumption. If your value is silently capped, contact your hosting support to confirm the actual limit.
3. Optimize MySQL / MariaDB Query Performance
Slow database queries are one of the most common causes of sluggish page loads, especially on WordPress or WooCommerce sites. While you cannot directly edit my.cnf on shared hosting, you can still take meaningful action.
Use a Persistent Object Cache (WordPress)
WordPress makes a database call for nearly every piece of dynamic data. Installing a persistent object cache stores query results in memory so they are served without hitting the database again.
The most practical option on cPanel shared hosting is to use a file-based object cache drop-in. If your host supports Redis or Memcached, even better.
- Install a caching plugin like W3 Total Cache or LiteSpeed Cache (if your server uses LiteSpeed).
- Enable Database Caching or Object Cache in the plugin settings.
- Select the appropriate backend (file, Redis, or Memcached depending on availability).
Identify and Fix Slow Queries
If you have access to phpMyAdmin via cPanel:
- Open phpMyAdmin and select your database.
- Click the Status tab → Monitor to watch live query traffic.
- Look for queries with high execution time.
- For WordPress sites, run the following query to find large, fragmented tables:
SELECT table_name, data_length, index_length, data_free
FROM information_schema.tables
WHERE table_schema = 'your_database_name'
ORDER BY data_free DESC;
- Optimize fragmented tables by selecting them in phpMyAdmin and choosing Operations → Optimize Table.
Delete Transients and Autoloaded Data
WordPress stores temporary data called transients in the wp_options table. Over time this table bloats and slows every page load.
DELETE FROM wp_options WHERE option_name LIKE '%_transient_%';
Run this in phpMyAdmin (back up first). Then use a plugin like WP-Optimize to automate regular cleanups.
4. Compress and Optimize Images
Images are typically the heaviest assets on any page. Uncompressed images uploaded directly from a camera or design tool can easily be 3–8 MB each, when they should be under 200 KB for web use.
Resize Before You Upload
Never upload a 4000×3000 pixel image just to display it at 800×600. Resize first:
- macOS: Use Preview → Tools → Adjust Size.
- Windows: Use Paint or the free tool IrfanView.
- Online: Use Squoosh.app — it also converts to WebP in the browser.
Convert to WebP Format
WebP images are 25–35% smaller than equivalent JPEG/PNG files with the same visual quality. All modern browsers support WebP.
For WordPress users:
- Install Imagify, ShortPixel, or WebP Express.
- Configure to automatically convert uploaded images to WebP.
- Enable serving WebP to supported browsers (the plugin handles fallback for older browsers automatically).
Enable Gzip/Brotli Compression for Text Assets
This is not image compression, but it is the logical next step. Text-based assets (HTML, CSS, JS) compress extremely well.
In cPanel, go to Software → Optimize Website:
- Select Compress All Content or Compress the specified MIME types.
- Add the following MIME types if not already listed:
text/htmltext/cssapplication/javascriptapplication/json
- Click Update Settings.
Alternatively, add this to your .htaccess file in the File Manager:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css
AddOutputFilterByType DEFLATE application/javascript application/json
AddOutputFilterByType DEFLATE image/svg+xml application/xml
</IfModule>
5. Leverage Browser Caching with .htaccess
Browser caching tells returning visitors' browsers to store static files locally rather than re-downloading them on every visit. This dramatically speeds up repeat visits.
Add these rules to your .htaccess (access it via cPanel File Manager → public_html → .htaccess):
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-font-woff2 "access plus 1 year"
</IfModule>
Always back up your
.htaccessbefore editing. A syntax error here will return a 500 error for your entire site. Keep a copy in a text file on your desktop.
Putting It All Together: A Quick Checklist
Here is a summary of every optimization covered in this guide:
- Upgrade PHP to 8.2 or 8.3 via MultiPHP Manager
- Enable OPcache with tuned directives in MultiPHP INI Editor
- Install a persistent object cache plugin (W3 Total Cache, LiteSpeed Cache)
- Optimize and defragment MySQL tables via phpMyAdmin
- Clean up WordPress transients and bloated
wp_options - Resize images before uploading and convert to WebP
- Enable Gzip compression via cPanel Optimize Website tool
- Add browser caching headers to
.htaccess
Work through these one at a time, testing your page load speed with GTmetrix or PageSpeed Insights after each change so you can measure the impact of each optimization individually.
Final Thoughts
Speeding up a cPanel-hosted website is not about any single magic switch — it is about stacking multiple small improvements that compound into a noticeably faster experience. PHP version upgrades and OPcache alone can cut server response times in half. Combine that with a lean database, optimized images, and proper caching headers, and you have a site that feels genuinely fast.
If you are looking for a cPanel hosting environment where these features are readily accessible and support is on hand to help you tune settings, GoCelerus offers cPanel shared hosting plans designed for exactly this kind of hands-on optimization. But regardless of your host, the techniques in this guide apply universally — start implementing them today.