Recently, many users have found that Cool theme The access speed of our official website and demo website is much faster. Most of the time, we click on it every second. I would like to know how we do it. actually Cool theme It has also experienced a difficult process of slow website speed and insufficient server resources. Later, after multiple in-depth studies and repeated tests, a complete set of WordPress Performance optimization solutions.
Now let's talk about our WordPress Practical experience of performance optimization:
1. Buy website server: as a domestic website, try to choose domestic cloud servers, such as Alibaba Cloud ECS, rather than virtual hosts, or computer rooms in Hong Kong or abroad. Important note: Linux must be selected for the operating system, whether it is an ECS or a virtual host, because the Windows system runs PHP too slowly.
2. To install the visualization server management panel: Cool theme Having been a website for 10 years, if there is no visual operation panel, you will feel helpless and unable to move. It is recommended to install the pagoda panel, a simple and easy to use visual server operation panel with the first Chinese market share, which can be simply understood as the Chinese cPanel and Plesk. Using the pagoda panel allows us to easily operate our Linux server, install the server environment, manage the website, and so on.
3. Install the website server environment: use the pagoda panel to install the website running environment with one click. It is recommended to select LNMP, among which PHP is recommended to be more than 7.0, and the higher the better. Go to PHP Settings>Performance Adjustment, and change the concurrency scheme to "100 concurrency" or higher according to your server situation.
4. Install PHP cache and optimization extension: In the PHP setting option on the pagoda panel, install memcached and opcache extensions. WordPress Websites consume more memory and CPU. These two PHP extensions are very important.
5. Installation WordPress Cache and optimization plug-in: enter WordPress Background>Plug ins, search and install the following plug-ins, and refer to our settings:
(1) Autooptimize (optimize website HTML/JS/CSS code to improve website access speed)
(2) WP Super Cache (generate page cache, reduce database queries, and relieve server pressure)
(3) Memcached Is Your Friend. This plug-in can be used in WordPress The end calls the PHP Memcached extension we installed earlier.
(4)、 Cool theme Optimization master (manual download and installation are required, no additional settings are required). This plug-in can be removed WordPress Extra code in the website header.
6. Use a third-party storage service (optional): Storing website images in a third-party storage service, such as Alibaba Cloud OSS, can effectively reduce the number of website users' requests for the server. There is one WordPress The Aliyun OSS plug-in can be installed to WordPress The uploaded pictures are automatically uploaded to AliCloud OSS.
Conclusion: After the above steps, the CPU, memory and load of the server will be greatly reduced, WordPress The access speed of the website will be significantly improved.
Before optimization, even a 4-core 8GB memory server was struggling:
After optimization, even the server with 2-core 4GB memory is very easy:
The website speed is accelerated, the server pressure is reduced, and the user experience is greatly improved. If you need Cool theme To provide your website with the above set of optimization solutions, you can purchase our service package: