Discuz is one of the most popular stations in the building station source, in addition to open source also has a very powerful backstage, even if it is not built station Foundation and do not know the code of the webmaster can quickly set up a forum, or even the portal.
The loading speed of a website affects your user experience in addition to your ranking in search engines. New research shows that most users expect the site load time is 3 seconds, if the time is more than 3 seconds, the site began to lose users, so even if your site is beautiful, rich content looks like a work of art, but the load is very slow, but also futile. When you finish the Discuz section, user settings, plug-in installation and UI beautification, should you consider the speed of the website loading?
There are many ways to speed up the discuz, which is broadly divided into the following 10 articles:
1. Background performance optimization
2. Lazy Load Settings
3. Turn on gzip
4. Using CDN
5. Database optimization
6. Using Google Pagespeed
7. Template optimization
8. Plugin filtering
9. Image compression
10. Pseudo-Static
This article mainly introduces the first part of "Background performance optimization".
Discuz background performance optimizations include: Forum page cache settings, server optimization, and memory optimization
I. BACKGROUND > Global > Performance Optimization > Forum page cache Settings
Discuz background optimization, cache settings
Forum cache page settings can be divided into the following two kinds:
1. Cache Forum Home Validity: 0, Cache post validity: 0, Cache factor: 0
2. Cache Forum Home Validity: 900, cache post validity: 900, Cache factor: 40~60
The first setting is for the newly opened forum
The second setting is for a forum with a certain number of members and posts
In addition, the virtual host user recommends the use of the first setting to ease the pressure on the forum.
Second, background > Global > Performance Optimization > Server optimization
Discuz background settings, server optimization
Server optimization is also divided into two types:
1. General or small number of visits to the site settings: whether to optimize the update of the theme views: No, view on anti-refresh: No, download delay update: Yes, prohibit browser buffering: No, JS file directory: Cache directory, open image delay loading: Yes, other settings can not.
2. Access is large or very large setting method: whether to optimize the update topic Views: Yes, view number on anti-refresh: According to the actual situation, the recommended setting is No. Module Update time interval: 3-6 points best.
Third, background > Global > Performance Optimization > Memory optimization
Discuz background settings, memory optimization
Discuz background memory optimizations include Redis, Memcache, APC, Xcache, Eaccelerator, Wincache
Personal recommendation Memcache, regardless of which interface requires server support, and then through the Discuz configuration file "Config_global. PHP "Open
The config_global.php file is located in the Config directory
Open the config_global.php file to see line 18th, such as:
[CSS]View Plain Copy print?
- ———————— –config MEMORY —————————//
- $_config[' memory ' [' prefix '] = ' uqqyh2_ ';
- $_config[' memory ' [' Redis '] [' server '] = ";
- $_config[' memory ' [' Redis '] [' port '] = 6379;
- $_config[' memory ' [' Redis '] [' pconnect '] = 1;
- $_config[' memory ' [' Redis '] [' timeout '] = '0′;
- $_config[' memory ' [' Redis '] [' requirepass '] = ";
- $_config[' memory ' [' Redis '] [' serializer '] = 1;
- $_config[' memory ' [' memcache '] [' server '] = '127.0. 0.1′;
- $_config[' memory ' [' memcache '] [' port '] = 11211;
- $_config[' memory ' [' memcache '] [' pconnect '] = 1;
- $_config[' memory ' [' memcache '] [' timeout '] = 1;
- $_config[' memory ' [' APC '] = 0;
- $_config[' memory ' [' xcache '] = 0;
- $_config[' memory ' [' eaccelerator '] = 0;
- $_config[' memory ' [' wincache '] = 0;
Where $_config[' memory ' [' Redis '] [' server '] = "; and $_config[' memory ' [' memcache '] [' server '] = "; you need to add 127.0.0.1 in quotation marks, for example.
Other APC and Xchache only need to change 0 to 1.
The above settings can greatly increase the loading speed of the Discuz
Discuz Forum Speed Optimization Techniques