Compressing php output with wp-cache2 WordPress Plugin PHP�̏o�͂����k�����WP - cache2 WordPress�̍�����
Wp-Cache2 is a WordPress Plugin to cache WordPress generated pages. cache2 WordPress�̍�������WP�́A WordPress�̐��������y�[�W���L���b�V������B However it doesn't work with in-built gzip compression.����������͋@�\���܂��������gzip�`���ň��k���܂��B Lets see how we can solve it.�ł́A�ǂ̂悤�ɉ������邽�߂ɎQ�Ƃ��Ă��������B
Wp-Cache 2 significantly increases performance of WordPress enabled websites. WP�B���ꏊ2 WordPress�̗L��ɂȂ��ăE�F�u�T�C�g�̃p�t�H�[�}���X��啝�Ɍ�コ����B Additionally it drastically reduces the processing load on the machine.����ɁA���̃T�[�r�X�̏������ׂ�啝�ɒጸ����Ă���}�V���ł��B It is intelligent to understand when to refresh the cache based on author / publisher activity.�m�\�𗝉����邱�Ƃ��L���b�V�����X�V����Ƃ��Ɋ�Â��Ē���/�o�ŎЂ̊����ł��B
This blog uses���̃u���O�ł́A wp-cache 2 WP�B���ꏊ2 .�ł��B
It comes with some costs.����ɂ́A�������̃R�X�g�ł��B It doesn't allow you to compress your output in gzip format, a facility provided by WordPress.���Ȃ������k���邱�Ƃ͋�����܂��ďo�͂�gzip�t�H�[�}�b�g�́A�{�݂ɂ���Ē�WordPress�̂ł��B
BTW: wp-cache-2 doesn't work on Windows based servers.�Ƃ���ŁF WP�B���ꏊ- 2 Windows�x�[�X�̃T�[�o�ł͓��삵�܂���B
The solution is to use Apache�������Apache���g�p���� mod_deflate module.���W���[���ł��B
A simple configuration (add in httpd.conf) might be:�P���ȍ\���i httpd.conf�̒lj��j��������Ȃ��F
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php addoutputfilterbytype�����ڂ܂���e�L�X�g/ HTML�e�L�X�g/�v���[���e�L�X�g/ XML�̃A�v���P�[�V����/ -��httpd - PHP�� This assumes you have mod_deflate loaded.����mod_deflate�z�肵�ēǂݍ��܂�܂��B If not load it first:���ׂĂ��Ȃ��ꍇ�͂܂��ŏ��F
LoadModule deflate_module modules/mod_deflate.so LoadModule��deflate_module���W���[��/ mod_deflate.so Let me know your experience with this.���̌o���������ĂĂ��������B
Filed under��o����� CMS Software CMS�\�t�g�E�F�A , �A Headline News�j���[�X�̌��o�� , �A How To�ǂ̂悤�� , �A Linux���i�b�N�X , �A Pro Blogging�v��Blogging , �A Tech Note�Z�p�̃m�[�g , �A Web�E�F�u , �A WordPress WordPress�� | |
| |
RSS 2.0 RSS 2.0�� | |
Trackback�g���b�N�o�b�N this Article |���̋L��|
Email this Article�d�q���[�����̋L��
You may also like to read��ǂނ悤�ɂ��邱�Ƃ��\ |





































January 31st, 2006 at 6:00 am 2006�N1��31��͌ߑO6��00��
It seems to me that the problem was that with WP�fs gzip turned on, it was caching the zipped output.����悤�Ɏ��́A WP�̖��́A gzip�`�����I���ɂ���ƁA����́A�L���b�V�����A ZIP�o�͂��܂��B I edited wp-cache-phase1.php and put in the following:����WP -�L���b�V��- phase1.php�ƕҏW�ɂ́A�ȉ��̒ʂ�ł��F
if( extension_loaded('zlib') ) ob_start('ob_gzhandler');�����i extension_loaded �i ' zlib��' �j �j����ob_start �i ' ob_gzhandler ' �j ;right above this line:�E��̂��̍s�F
foreach ($meta-»headers as $header) {foreach �i $���^- »�w�b�_�Ƃ���$�w�b�_�[�j �iAnd it seems to work beautifully.��ɓ����Ǝv���܂��B That caches the plaintext, but gzips the text before delivering on cached hits.�����ŃL���b�V�����A gzips�̃e�L�X�g��z�M����O�ɃL���b�V�����ꂽ��������܂����B Might work for people you can�ft mess with server configuration files.�d�������邱�Ƃ͂ł��܂���B��������Ȃ��l�X�Ƃ�����荇���ɂȂ�T�[�o�[�̐ݒ�t�@�C���ł��B
October 22nd, 2006 at 8:14 am 2006�N10��22���8:14�A��
[...] Compressing php output with wp-cache2 WordPress Plugin [...] [...] PHP�̏o�͂����k�����WP - cache2 WordPress�̍�����[...]
January 5th, 2007 at 9:34 am 2007�N1��5���9:34�A��
When using mod_deflate do I get the benefits of mod_gzip, ie saved bandwidth?���g�p����ꍇ�̗��_������čs����mod_deflate mod_gzip �A���Ȃ킿�ۑ��ш敝�ł����H
January 5th, 2007 at 8:56 pm 2007�N1��5��8:56 pm���e
Yes and it is faster too.�͂��A����͂��܂�ɂ������Ă��܂��B
January 6th, 2007 at 8:55 am 2007�N1��6��8:55�A��
mod_deflate is a module specific to the Apache 2.0 series, so I can�ft install it as it�fs not compatible with cpanel yet :-(. mod_deflate���W���[���́A��̓I�ɂ́A Apache 2.0�V���[�Y�́A�C���X�g�[�����邱�Ƃ͂ł��܂���̂�as it�s�Ƃ͌݊�����:-( cpanel�͂܂�����܂���B
I�fve had to turn WP-cache2 off temporarily anyway, because v2.20 isn�ft refreshing when new comments or posts are bad���͈ꎞ�I�ɃI�t��L���cache2��WP�Ƃɂ����A v2.20�ł͂Ȃ����߁A����₩�ȂƂ��ɐV�����R�����g��L��������