WordPress knowledge sharing

How to set pagoda panel to optimize php server performance

In order to improve the performance of the php server, the server with the pagoda panel needs to be set. The whole setting process is very simple. Weieis Blog wrote down how to set the pagoda panel to improve the server performance, hoping to help friends who use the pagoda panel for the first time.

Too many friends in the group are new to the php environment and the pagoda panel, and many people use avada, The 7, newspaper, Enfold, Bethome, Richer and other wordpress templates that consume system resources. Without additional optimization, they really open slowly. For example, a friend uses Alibaba Cloud ECS domestic servers, 2-core 8g memory, 40g system disk, 100g data disk, and 5m bandwidth, Newspaper theme, art websites mainly focus on pictures. The home page is a big banner and N pictures, full HD and high resolution. It takes nearly 10 seconds for Unicom to open 100M optical fiber, and he is also very dissatisfied. You should know that the cost of bandwidth in China is extremely high. Nearly half of the cost of an ECS is bandwidth. The 1M bandwidth of an ordinary website started well, but he bought 5M bandwidth slowly, so I'm really sorry to let customers see it if I don't optimize it.

The pagoda panel is a domestic Linux panel that we are all familiar with. At present, it can be said that the situation is rising in China, and the number of users is rising. I have written a lot about the installation and use of the pagoda panel in the Weieis blog. To make the server run faster, we will use the functions provided by the pagoda panel to optimize the server configuration. Part of the content of this article is referenced from the @ Weiwen Blog, which Lao Wei supplements and enriches based on the problems encountered by everyone and his own experience.

For the specific operation process of this software, Lao Wei wrote Video Tutorial for Beginners of Pagoda Linux Panel , has been launched in Netease Cloud class. For students who are not familiar with the operation of pagoda panel, or who are interested in it, you can go and have a look. Video tutorials are hand in hand instructions on how to operate. They will be more intuitive and easier to understand than this picture+text format.

Lao Wei suggested that the pagoda panel is suitable for novices and Xiaobai to build a website, and supports Linux and Windows systems, Click to go directly to the pagoda website
Pagoda Linux Enterprise Edition Click Direct
Pagoda Linux Professional Click Direct
Pagoda Nginx firewall Click Direct
Pagoda Windows Enterprise Edition Click Direct
Rui Anxin DV SSL Certificate Click Direct
Recommended selection of pagoda panel Alibaba Cloud Tencent Cloud The server
For more information, see Special topic of pagoda panel
Click to view NetEase Cloud Classroom "Introduction to Pagoda Linux Panel for Novice"

Basic knowledge about pagoda panel:

1. Free memory regularly

To add a scheduled task, you can set it to be released once a day or a week. The interval is determined according to the situation of your website. The execution time is midnight, such as 1:30.

See the figure below. You can just operate in the planned task on the left side of the pagoda panel.

2. Add Swap

The importance of Swap lies in Detailed Tutorial on Creating and Enabling SWAP Partitions in lnmp It has been written in. No matter how much server memory is, Swap must be added. Find Linux Toolbox 1.4 in Software Management>>System Tools on the pagoda panel, click "Settings" on the far right to open Swap virtual memory, and set it according to the recommended values below.

Swap recommended values: servers with 2G or less of memory are set to SWAP with the same capacity as the physical memory; Above 2G, set to 2G. If the running program consumes special memory, Swap with more than 2GB of memory can also be set the same as the memory.

3. Install PHP cache extension

It is recommended to use Opcache script cache and Memcached content cache for php cache extension of personal blog. On Software Management>>the right side of the php version you are using, click "Settings" to install the extension. On the right side, click "Install" after the two extensions, and then confirm again. It will be done soon.

Only one content cache and script cache should be installed. Do not install more than one at the same time.

Other extension components can be found in Under the premise of confirming that it is not needed , are uninstalled, because it will waste system resources if it is still on.

4. PHP configuration adjustment

Similarly, in the configuration modification of php management, the memory limit of memory_limit script is changed to 256M, so that WordPress runs more smoothly; The upload_max_filesize allows the maximum size of the uploaded file. For example, the avada template may exceed this value and cannot be uploaded. It needs to be modified to a value larger than the uploaded file.

Ctrl+F in the configuration file to search memory_limit, change the default value to 256M, and save. The figure below is Lao Wei's modification.

5. PHP concurrency adjustment

The pagoda panel provides several optimized php concurrency schemes. Generally, an ECS with one core and 1G memory can be set to 30 or 50 concurrency. Please test the appropriate concurrency scheme for other configurations. It is not recommended that the concurrency exceed 300. If the concurrency is not enough, it may be more effective to optimize the database cache.

6. PHP version and MySQL database version

The performance of php7 is much better than that of the lower version. Lao Wei strongly recommends using a version above php7; MySQL 5.5 is recommended for 1-core 1G databases, while 5.6 requires at least 1G of memory, so you should know how to choose.

7. Uninstall extra extension components

If the program does not need it, uninstall ZendGuardLoader ioncube、PATH_INFO, After installation, it does not use and always occupies a part of memory.

After setting, restart the server to make the adjusted parameters take effect.

8. As mentioned at the beginning of this article, there are many high-definition pictures on the group friend website. If there are thousands of pictures and they still need to increase, it is recommended to first Click me to get it One thousand yuan voucher, and then On the basis of purchasing AliCloud ECS and AliCloud storage OSS, the pictures are diverted to the OSS storage space. ECS only places programs, so the website can be opened much faster.

9. How to optimize and improve the speed of WordPress is an eternal task. To make the website load faster, the key to optimization is to find a balance point, Click me to open The online course starts to learn, comprehensively analyze the reasons and provide a corresponding set of solutions.

The above optimization schemes are available on Alibaba Cloud servers( Click me to get it RMB 1000 voucher will be deducted from RMB 50) and passed the test on Tencent ECS.

Selected explosives area
618 Zhongshenghui Click to view the purchase
Selected preferential activities Click to view the purchase
Tencent Cloud Preferential Products Zone Click to view the purchase
Cross border e-commerce store server Lightweight application server
Tencent Cloud Animal Palu Game Server Click to view the purchase
For more Tencent Cloud content, please see Tencent Cloud

After the above efforts, your ECS should be much smoother than before. Those who have not done so should try it now. You can also leave a message below to exchange your more appropriate optimization scheme.

Like( eleven )
Article name: How to set the pagoda panel to optimize the performance of the php server
Article link: https://www.vpsss.net/6600.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.