Enable Gzip Compress on Wordpress with WP-Cache 2.x Kích hoạt Gzip Nén trên Wordpress với WP-Cache 2.x
WP-Cache is a page caching system plugin for WP-Cache là một trang caching plugin hệ thống cho Wordpress Wordpress blog that cache Wordpress pages during the first load or after a page expired, and store each Wordpress page in a static HTML file which in turn used to serve future requests. blog mà bộ nhớ cache Wordpress trang đầu tiên trong quá tải hoặc sau khi một trang đã hết hạn, và lưu trữ từng trang Wordpress trong một tệp HTML tĩnh đó lần lượt sử dụng để phục vụ yêu cầu trong tương lai. This process of web server serving the HTML pages directly from the file rather than building the page again by loading and compiling the whole PHP code, and retrieving the necessary data from the database where there is any page request significantly reduces the resource needed to run a responsive and fast website. Quá trình này của máy chủ web phục vụ các trang HTML trực tiếp từ tập tin hơn là xây dựng trang một lần nữa bằng tải và biên dịch mã PHP cả, và lấy các dữ liệu cần thiết từ cơ sở dữ liệu các nơi có yêu cầu bất kỳ trang làm giảm đáng kể nguồn lực cần thiết để chạy một đáp ứng và nhanh chóng website. Meanwhile, Gzip compression is an option provided by Wordpress that allows web server to serve the articles in compressed format if request by supported web browser, reducing bandwidth used and improving performance. Trong khi đó, Gzip nén là một tùy chọn được cung cấp bởi Wordpress, cho phép web server để phục vụ những bài viết ở định dạng nén nếu yêu cầu bởi trình duyệt web được hỗ trợ, giảm băng thông sử dụng và cải thiện hiệu suất.
If you install WP-Cache version 2.0 or 2.1, you will be requested to turn off or disable Gzip compression in Options -> Reading tab. Nếu bạn cài đặt WP-Cache phiên bản 2.0 hoặc 2.1, bạn sẽ được yêu cầu tắt hoặc nén Gzip vô hiệu hóa trong Options -> đọc thẻ. Although WP-Cache2 is fast enough, however, you can still try to enable the Gzip compression to further speed up the web server, improve the overall performance of network and website, and save the network bandwidth, by using the following trick. Mặc dù WP-Cache2 là đủ nhanh, tuy nhiên, bạn vẫn có thể cố gắng để kích hoạt nén Gzip để tiếp tục tăng tốc độ máy chủ web, cải thiện hiệu suất tổng thể của mạng và trang web, và tiết kiệm băng thông mạng, bằng cách sử dụng lừa sau. The hack allows Gzip compression to be used with WP-Cache system, by making WP-Cache compress the page articles, instead of Wordpress. Các hack cho phép Gzip nén để được sử dụng với WP-Cache hệ thống, bằng cách làm WP-Cache nén của bài viết trang, thay vì Wordpress.
To turn on Gzip compression of web page while using WP-Cache 2, simply edit the wp-cache-phase1.php which is located in the WP-Cache plug-in folder inside the Plugins directory with text editor such as vi: Để bật Gzip nén của trang web trong khi sử dụng WP-Cache 2, chỉ cần chỉnh sửa wp-cache-phase1.php mà nằm ở WP-Cache plug-in thư mục bên trong thư mục Plugins với trình soạn thảo văn bản như vi:
Add the following line: Thêm dòng sau đây:
if ( extension_loaded('zlib') ) ob_start('ob_gzhandler'); nếu (extension_loaded ( 'zlib')) ob_start ( 'ob_gzhandler');
Before this line: Trước khi dòng này:
foreach ($meta-»headers as $header) { foreach ($ meta-headers »như là $ header) (
Note that you still should not turn on or enable the Gzip compress article in Wordpress. Lưu ý rằng bạn vẫn không nên bật hoặc cho phép các bài nén Gzip trong Wordpress. If you do so, WP-Cache will not work. Nếu bạn làm như vậy, WP-Cache sẽ không hoạt động.
IMPORTANT : The page is machine translated and provided "as is" without warranty. Quan trọng: Sửa là máy dịch và cung cấp "như là" không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể khó hiểu. Please refer to Vui lòng tham khảo original English article bản gốc tiếng Anh bài viết whenever possible. bất cứ khi nào có thể.
Related Articles Bài viết liên quan
- Unzip or Decompress or Uncompress Gzip (.gz or .gzip) Files in Windows Giải nén hoặc Decompress hoặc giải nén Gzip (gz hoặc. Gzip). Files trong Windows
- Run WordPress at Top Fast Speed by Putting Objects and Variables into XCache or eAccelerator Cache Memory (Plugin) Khởi WordPress lúc đầu nhanh tốc độ của Đưa Đối tượng và biến thành XCache hoặc eAccelerator Cache (Plugin)
- Display and View FireFox Cache Files Without Browser Cache Viewer Hiển thị và xem FireFox Cache Files Nếu không có trình duyệt Cache Viewer
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working Paginating hoặc Split WordPress Đăng hoặc Trang với NextPage trong WordPress Không phải làm việc
- Cache Busting Definition and Explaination Cache Busting Định nghĩa và Giải thích
- 3 Column Relaxation WordPress Theme comments-paged.php for Paged-Comments WordPress Plugin 3 Cột Relaxation WordPress Chủ đề ý kiến-paged.php cho paged-Bình luận WordPress Plugin
- How to List and Show WordPress Posts That Comments and Pings Off (Not Allow) Làm thế nào để hiển thị danh sách và WordPress Bài viết Đó là ý kiến và Ping Off (Không cho phép)
- How to Customize, Modify or Change WordPress Database Connection Error Page Làm thế nào để Customize, Chỉnh sửa hoặc thay đổi kết nối WordPress Cơ sở dữ liệu Lỗi Trang
- Disable and Turn Off Post Revisions Tracking in WordPress 2.6 or Above Vô hiệu hoá và Turn Off Đăng Revisions Theo dõi trong WordPress 2,6 hoặc Trên
- Using PHP-MySQL Persistent Connections to Run WordPress Blog Sử dụng PHP-MySQL Persistent Connections để Khởi WordPress Blog










































September 20th, 2008 08:32 Ngày 20 Tháng Chín 2008 08:32
Thanks this code edit really increased my page load time Nhờ sửa mã này thực sự gia tăng thời gian tải của trang của tôi