Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   page-speed-how-to-improve (http://forum.bytesforall.com/showthread.php?t=18846)

drashok Nov 5, 2012 10:48 PM

page-speed-how-to-improve
 
Hello,
Greetings of love.
1.
My site was "Account Suspended" for high CPU usage.
I have chosen Montezuma version 1.1.3
on my wordpress 3.4.1, which is on shared hosting.

I am using w3 supercache. Shall I change it to w3 Total cache?
I have kept only few plugins.

Leverage browser caching and Enable Keep-Alive are the things I have to work on.

Gtmetrix
RECOMMENDATION
Leverage browser caching
GRADE
F (33)
55%
TYPE PRIORITY
Server High
Enable Keep-Alive
GRADE
C (71)
95%
TYPE PRIORITY
Server High
2.
How can I get two sidebars?
3.
How can I have a dropdown list on mouseover on menu in the header like shown in preview of montezuma?
4.
I wish to know if I can add devanagari font (Indian language kiranfonts.com) to the list of fonts.
Kindly tell me how to improve as per the recommendation of Gtmetrix google page speed.
5. Important:
Ton of thanks for the magnificent theme you have provided.
I truly appreciate.

Best wishes,
Dr. Ashok Koparday
Consultant Sexual Medicine

preview Nov 6, 2012 05:18 AM

Hi, for Leverage Browser Caching you can add this code to your .htaccess:

Code:

# Expire headers 5184000 seconds = 2 months
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/x-icon "access plus 5184000 seconds"
ExpiresByType image/gif "access plus 5184000 seconds" 
ExpiresByType image/jpg "access plus 5184000 seconds" 
ExpiresByType image/png "access plus 5184000 seconds"
ExpiresByType text/css "access plus 5184000 seconds"
ExpiresByType text/javascript "access plus 5184000 seconds"
ExpiresByType application/javascript "access plus 5184000 seconds"
ExpiresByType application/x-javascript "access plus 5184000 seconds"
</IfModule>

This code sets an Expires Header with a value of 2 months.

To enable Keep-Alive you can add this code to your .htaccess:

Quote:

# BEGIN Keep-Alive

<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>

# END Keep-Alive
This should work fine for you :) If you like, you can send me a pm with your siteurl and I have a look on it in the next days.

drashok Nov 11, 2012 05:58 AM

Hi Preview,

Greetings of love.

Page Speed Grade and YSlow improved remarkably by doing exactly as you said.

I installed W3TotalCache today.
The Page Speed Grade is lesser now.

Where am I going wrong?

Best wishes,
Dr. Ashok Koparday
Consultant Sexual Medicine.

drashok Nov 13, 2012 08:27 PM

Hi,

I reinstalled W3TotalCache and the YSlow Grade shot up to A.
Page Speed Grade also improved.

Then my theme montezuma collapsed after clicking 'reset' in the header on dashboard montezua menu.

I reinstalled 'montezuma' deleted and uploaded fresh wp admin and wp includes. I uploaded and activated W3TotalCache and WP Minify. The Page Speed and YSlow are abominably low.

I guess I will have to deactivate the cache plugins and once again edit .htaccess as you suggested.

Thanks for being,

Best wishes,
Dr. Ashok Koparday

preview Nov 14, 2012 08:08 AM

Hi,

I wrote you in a private message that I don't use cache plugins because you can do most of it on your own. It is really hard to achieve 100% there, about 80% is a really good mark and you should not worry about little details if you once have this score. Then you should better think about less plugins, optimized images and a long-term strategy to keep up that score.


So here we go for a detailed analysis for your site based on what gtmetrix told me.

Add Expires Header and Leverage Browser Caching you can add the two codes to your .htaccess file

Combine Images using CSS Sprites:

You can do it by yourself via Photoshop or some other programs and scripts. I don't recommend it to you, because gtmetrix suggests only images in plugins. So you have to recode the sprites positions in the plugin and when you do an update everything is gone.

Remove query strings from static resources:

This means that some of your urls look like: example.com/wp-options/plugins/exampleplugin/javscript.js?ver=0.0.1

You can remove this by adding the following script at the end of your theme's function.php. Go to Appereance -> Editor -> functions.php

Code:

function _remove_script_version( $src ){
        $parts = explode( '?', $src );
        return $parts[0];
}
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );

Don't forget to make the closing php-tag (?>) afterwards! I forgot it a couple minutes before and my site crashed, but with the closing php-tag it works fine!

Try this out and re-test your page. If you then want to have some more speed advise please contact me per private message and we discuss details.

drashok Nov 14, 2012 11:00 AM

I just sent you PM.
Soon I will begin work on what you suggested.
I appreciate your support.

joshuamu Nov 14, 2012 03:59 PM

Hi! Let me know your host and i will help you. You can first check on my site speed
http://www.christiantruthcenter.com/

viktor.helwer Nov 15, 2012 10:46 AM

You can add mod_pagespeed from Google to your Server

drashok Nov 18, 2012 02:53 AM

Hi,
How does one do add mod_pagespeed from Google to your Server?
Regards,
Dr. Ashok Koparday

drashok Nov 18, 2012 09:58 PM

Hi viktor.helwer,
I read about mod_pagespeed that you suggested. It is beyond my limited knowledge.
Thank you all the same for your suggestion.

Best regards,
Ashok Koparday

fabvincent Dec 3, 2012 10:16 AM

Hi to all,
not sure this is the right place for my concern, but we try to improve pagespeed, right?
So I've been working on my htaccess file lately with some quite rewarding scores (from very bad to quite ok). One thing keeps on bugging me though : Eventhough my keepAlive is set on the server and the google pagespeed tool agrees, my gtmetrix Page Speed only rates a 75% just because "The host studio-449.com should enable Keep-Alive. It serves the following resources.".
Below my code in .htaccess :
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>

I've een looking throuroughly the web and forums to my dismay so far, everything I try does not change anything. Even my host (websiteout) does not have a clue what to do.

Thanks so much,
any insight is welcome.




Below my complete htacess just in case
AddCharset UTF-8 .html
AddDefaultCharset UTF-8

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

# les proxies ne doivent pas décompresser le contenu à la place de l'internaute
Header append Vary "User-Agent env=!dont-vary"


<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/x-javascript "access plus 604800 seconds"
</ifModule>

<ifModule mod_headers.c>
<filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>
<filesMatch "\\.(css)$">
Header set Cache-Control "max-age=604800, public"
Header append Vary: Accept-Encoding
</filesMatch>
<filesMatch "\\.(js)$">
Header set Cache-Control "max-age=604800, private"
Header append Vary: Accept-Encoding
</filesMatch>
<filesMatch "\\.(xml|txt)$">
Header set Cache-Control "max-age=216000, public, must-revalidate"
</filesMatch>
<filesMatch "\\.(html|htm|php)$">
Header set Cache-Control "max-age=1, private, must-revalidate"
</filesMatch>
</ifModule>

<ifModule mod_headers.c>
Header unset ETag
</ifModule>
FileETag None

<ifModule mod_headers.c>
Header unset Last-Modified
</ifModule>

<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>

joshuamu Dec 4, 2012 03:08 PM

If you are in hostgator i can help you

genuwine4532 Dec 11, 2012 11:30 PM

My resolution for Page Speed is W3 Total Cache plugin + Cloudflare, a free CDN servie and traffic accelerator. (https://www.cloudflare.com)

I get 80-100% speed grade from ySlow & G Page Speed using the GT Metrix testing tool - http://gtmetrix.com/ on all of my 20 sites using Ata 3.6 + themes

I have over 30 plugins, tons of images on most sites and lots of content.

joshuamu Dec 12, 2012 04:33 AM

If you are using hostgator, just turn on cloudfare from your cpanel and sleep

Shama Dec 26, 2012 02:52 AM

When I turned on cloudflare in hostgater Cpanel, I could not log into my wp-admin panel anymore. And suddenly my website url changed from http://thaihealingmassage.com to http://www.thaihealingmassage.com/wp...ndex.html_gzip
There is something not quite working right. At least for me it has not been working right out of the box.

Wmaster Nov 10, 2014 08:25 AM

You can enable keepalive via two methods:
- Through server access
For example, when you run a Apache server you can edit the config file of Apache to enable keepalive and to tweak its settings. Start with these settings:
KeepAlive: on
MaxKeepAliveRequests: 60
KeepAliveTimeout: 3 seconds

You should change the settings to suit your server needs.
- By adding a few lines of code to your .htaccess file
Code:

<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>

(source: http://www.giftofspeed.com/enable-keep-alive/ )

By the way, it's not always the most beneficial (when it comes to page speed) to enable keep alive. Sometimes it's better to just keep it off. You should experiment with this to see which gives you the best page speed.


All times are GMT -6. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.