increase-site-speed
increase-site-speed

Solutions to increase site speed using cPanel tools

Site loading speed is one of the most important factors in improving user experience (UX) and SEO. Users who experience delays in site loading usually abandon the page and the bounce rate increases. , We will explore expert solutions to increase site speed through the settings and tools available in cPanel.
0 Shares
0
0
0
0

1. Using tools Optimize Website

One of the powerful features in cPanel is the tool Optimize Website It is.
This tool helps you compress static website files (such as HTML, CSS, and JavaScript).

How to activate:

  1. Enter the panel cPanel Dill.

  2. From the department Software Option Optimize Website Select.

  3. Option Compress all content Activate.

  4. On Update Settings Click.

🔹 Result: Reducing the size of web pages and increasing loading speed for users, especially on weak internet connections.


2. Activation Caching On the site

Cache helps browsers store duplicate files so that they don't need to be downloaded again on subsequent visits.

Activation methods:

  • Using plugins like LiteSpeed Cache (On hosts with LiteSpeed Web Server)

  • Setting Cache-Control Header In the file .htaccess

  • On hosts with cPanelYou can use the section Cache Manager Use to set the cache expiration time.

Caching It is one of the most effective ways to increase website speed and efficiency.
In fact, caching saves users from having to re-fetch the data from the server on subsequent visits by storing a copy of the processed content of the site (such as HTML pages, images, CSS files, and JavaScript) in a temporary location.

Simply put, Cache It means “temporary storage of data for faster response in the future.”.


Types of Caching on Websites

Caching can be implemented at several different layers, each offering a different level of optimization:

1. Browser Cache

The user's browser (like Chrome or Firefox) stores files like images, CSS, and JavaScript in local storage so that they don't need to be downloaded again on subsequent visits.

✅ Set in .htaccess For Apache:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "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"
ExpiresByType text/html "access plus 600 seconds"
</IfModule>

🔹 این کد به مرورگر می‌گوید تا مدت مشخصی (مثلاً یک ماه یا یک سال) از فایل‌های کش‌شده استفاده کند و نیازی به درخواست دوباره از سرور نباشد.


2. Server-Side Cache (کش سمت سرور)

در این روش، داده‌ها پس از اولین پردازش در سرور ذخیره می‌شوند تا برای درخواست‌های بعدی سریع‌تر ارائه شوند.
در cPanel، اگر سرور شما از وب‌سرورهایی مانند LiteSpeed یا Nginx استفاده کند، امکان فعال‌سازی کش در سطح سرور وجود دارد.

✅ فعال‌سازی در cPanel:

  • وارد بخش LiteSpeed Web Cache Manager شوید.

  • روی Enable Cache برای دامنه موردنظر کلیک کنید.

  • سپس افزونه LiteSpeed Cache را در CMS خود (مثلاً وردپرس) نصب و پیکربندی کنید.

🔹 در سرورهای Apache نیز می‌توانید از ماژول mod_cache یا افزونه‌های سطح نرم‌افزار مثل WP Super Cache استفاده کنید.


3. Opcode Cache (کش سطح PHP)

این نوع کش برای اسکریپت‌های PHP استفاده می‌شود. زمانی که یک اسکریپت PHP برای اولین بار اجرا می‌شود، به Opcode (کد سطح پایین قابل اجرا برای موتور PHP) تبدیل می‌شود.
ذخیره این Opcode در حافظه RAM باعث می‌شود دفعات بعدی اجرای همان کد بسیار سریع‌تر باشد.

✅ در cPanel:

  1. به بخش Select PHP Version بروید.

  2. از تب Extensions گزینه opcache را فعال کنید.

🔹 فعال‌سازی OPcache معمولاً تا ۲ تا ۳ برابر سرعت اجرای PHP را افزایش می‌دهد.


4. Object Cache (کش دیتابیس)

در این نوع، نتایج پرس‌وجوهای (Query) دیتابیس به‌صورت موقت ذخیره می‌شود. این روش برای سایت‌هایی با دیتابیس سنگین (مثل فروشگاه‌های وردپرسی) بسیار مؤثر است.

✅ ابزارهای معروف:

  • Redis

  • Memcached

🔹 در cPanel معمولاً می‌توانید Redis یا Memcached را در سطح سرور فعال کنید، یا در وردپرس از افزونه‌هایی مثل:

  • W3 Total Cache

  • LiteSpeed Cache (با Redis Integration)

  • WP Rocket (با Object Cache Support)
    استفاده نمایید.


5. Full Page Cache

در این حالت، نسخه‌ی کامل HTML صفحه (پس از پردازش PHP و دیتابیس) ذخیره می‌شود.
به‌جای پردازش مجدد محتوا در هر درخواست، همان نسخه HTML از حافظه یا دیسک به کاربر ارسال می‌شود.

🔹 در هاست‌های با LiteSpeed یا Cloudflare CDN، Full Page Cache به‌صورت خودکار قابل فعال‌سازی است.
این روش معمولاً باعث کاهش چشمگیر زمان TTFB (Time To First Byte) می‌شود.


نکات فنی برای بهینه‌سازی Cache

  1. زمان انقضا (TTL) را متناسب با نوع محتوای سایت تنظیم کنید.

    • محتواهای ثابت (CSS، JS، تصاویر): بین ۱ هفته تا ۱ سال

    • محتواهای متغیر (HTML، داده‌های پویا): کمتر از ۱ ساعت

  2. اگر از CMS مانند وردپرس استفاده می‌کنید، حتماً از پلاگین‌های Cache سازگار با سرور استفاده کنید.
    مثلاً اگر هاست شما LiteSpeed است، حتماً از پلاگین رسمی LiteSpeed Cache استفاده کنید.

  3. همیشه پس از تغییر قالب یا کدها، کش را پاک کنید (Purge Cache) تا کاربران نسخه قدیمی را مشاهده نکنند.

  4. در سایت‌های چندزبانه یا با محتوای شخصی‌سازی‌شده، از Dynamic Cache استفاده کنید تا اطلاعات کاربر اشتباه ذخیره نشود.


CDN-cPanel-DNS-Speed
CDN-cPanel-DNS-Speed

3. Use of Content Delivery Network (CDN)

By connecting the site to a CDN (e.g. Cloudflare Or BunnyCDN) Your static content is cached on global servers.
This means visitors receive content from the closest server.

How to connect in cPanel:

  1. Enter the section Zone Editor Dill.

  2. Set the DNS records according to the CDN settings.

  3. Make sure that SSL and HTTPS They are active.

🔗 For DNS and Zone Editor tutorials, see the following article:
👉 How to set up DNS and Zone Editor in cPanel


4. Use of Free SSL from Let's Encrypt

Having SSL not only increases site security, but also has a positive impact on speed and HTTP/2 optimization.
In cPanel, you can usually install free SSL automatically.

How to install:

  1. From the department SecurityOn SSL/TLS Status Click.

  2. Select the desired domain and click the option Run AutoSSL Click.

  3. After a few minutes, your SSL will be activated.

🔗 More explanation on this subject at:
👉 Technical topics and advanced cPanel tools


5. Check and remove unnecessary plugins and scripts

Extra plugins and scripts can cause excessive CPU and RAM resource consumption.
In the cPanel panel, from the section Resource Usage You can check your site's resource usage status.

Key points:

  • Disable unnecessary plugins.

  • From PHP Selector Use to select a newer, more optimized version of PHP (e.g. PHP 8.2).

  • Definitely from OPcache Use in PHP settings.


6. Using tools Metrics and AWStats

cPanel tools like Awstats and Resource Usage Provides you with a graphical view of server performance, response time, and resource usage.
By analyzing this data, you can identify and optimize high-consumption areas.


7. Enable Gzip or Brotli Compression

Server-level compression using Gzip or Brotli algorithms reduces the size of content sent to the user by up to 70%.

On LiteSpeed or Apache servers:

  • To file .htaccess Add the following command:

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

🔹 تأثیر: کاهش زمان بارگذاری و مصرف پهنای باند.


نتیجه‌گیری

بهینه‌سازی سرعت سایت یک فرایند مداوم است، نه یک کار یک‌باره.
استفاده از ابزارهای موجود در cPanel مانند Optimize Website، Cache Manager، SSL، و Zone Editor می‌تواند به‌شدت عملکرد سایت شما را بهبود دهد.

اگر می‌خواهید درباره ابزارهای پیشرفته‌تر امنیتی، DNS و بهینه‌سازی در cPanel بیشتر بدانید،
حتماً به مقاله زیر سر بزنید 👇
🔗 مباحث فنی و ابزارهای پیشرفته در cPanel

🔗 مستندات رسمی Cpanel

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like