Home WebServer PanelaaPanel How to enable OPCache on aaPanel

How to enable OPCache on aaPanel

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

In today’s article, AZDIGI will show you how to enable OPCache on aaPanel. For the purpose of reducing CPU load and speeding up the website.

I. Overview

By default, when installing aaPanel on your VPS/Server, aaPanel will only install 1 version of PHP. If you install many new versions of PHP, there will also be a backlog problem in that all the new PHP versions you install do not have Opcache PHP Extension built-in. So what is Opcache PHP Extension? Please continue reading this article.

II. What is OPCache?

Originally called Zend Optimizer +, Zend OPcache (introduced in PHP 5.5.0) is a powerful PHP extension built to enhance PHP performance, thus increasing overall application performance. It is available as an extension through PECL for PHP versions 5.2, 5.3 and 5.4. It works by storing precompiled script-bytecode in shared memory or RAM, thus eliminating the need for PHP to load and parse the script on each request.

Benefits OPcache brings:

  • Helps reduce %CPU usage for the server.
  • Reduce TTFB of all PHP sites on the server.
  • Increase website loading speed.

So how to enable Opcache on aaPanel? Please see the following steps.

III. How to enable OPCache on aaPanel

To enable OPCache on aaPanel, we do the following 2 steps:

Step 1: Access your aaPanel admin interface

To access aaPanel, we access the path of the form http://IP:8888 (replace IP with the IP of your aaPanel server)

After accessing the aaPanel interface, we continue to step 2.

Step 2: Enable OPCache on your PHP

I use two PHP versions, 7.3 and 5.6, so I will do it with PHP 7.3 first.

At the aaPanel interface, we click on PHP 7.3.

Screen Shot 2020 11 04 at 7.18.55 PM

Next, click the Install Extensions feature as shown below:

Enable OPCache on aaPanel

Here, find OPCache and click the Install button at the end of the line.

Enable OPCache on aaPanel

Here, find OPCache and click the Install button at the end of the line.

Enable OPCache on aaPanel

You wait a moment for the installation process to complete and display the log as shown above. Similar to PHP 5.6 version, I also do the same.

Since PHP 5.6 is the default PHP version when executing PHP commands over SSH after successfully installing OPCache, check the PHP version you will see as below. The above paragraph is before installing OPCache and the following is after installing OPCache.

Enable OPCache on aaPanel

So we have completed the steps to enable OPCache on aaPanel. After installing OPCache, you notice that the CPU usage has decreased significantly, from which we can add more websites on this aaPanel server.

IV. Summary

Hopefully, through this article, you already know what OPCache is and its effects, as well as how you can enable OPCache on your aaPanel.

Hope this article will be of help to you. Wishing you success!

See more useful articles about aaPanel at the following link:

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign