• Got 54/100 on mobile speed and 56/100 on desktop when I ran Google’s testmysite.thinkwithgoogle.com test.

    My htaccess is currently the below, so I’m baffled.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    <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_include mime ^text/.*
    mod_gzip_item_include mime ^application/x-javascript.*
    mod_gzip_item_exclude mime ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
    </IfModule>
    
    ## BEGIN GZIP Compression ##
    <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    AddOutputFilterByType DEFLATE application/x-httpd-fastphp
    AddOutputFilterByType DEFLATE image/svg+xml
    SetOutputFilter DEFLATE
    </IfModule>
    ## END GZIP Compression ##
    
    ## BEGIN Leverage Browser Caching (Expires Caching) ##
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "access 1 month"
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType application/javascript "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresDefault "access 1 month"
    </IfModule>
    ## END Leverage Browser Caching (Expires Caching) ##
    
    ## BEGIN Disable ETag header ##
    Header unset Pragma
    Header unset ETag
    FileETag None
    ## END Disable ETag header ##
    
    ## BEGIN Vary: Accept-Encoding Header ##
    <IfModule mod_headers.c>
    <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
    </FilesMatch>
    </IfModule>
    ## END Vary: Accept-Encoding Header ##
    

    Errors from Results:

    Enable compression
    Eliminate render-blocking JavaScript and CSS in above-the-fold content
    Leverage browser caching
    Optimize images
    Minify CSS
    • This topic was modified 8 years, 11 months ago by Chad.
Viewing 3 replies - 1 through 3 (of 3 total)
  • I am no Apache expert though i can speak general approach about Google Page test.

    A caching plugin and lazyloading deferring methods would help with first 3.

    for images: you probably use wrong dimensions of your images and this affects your page loading time and your score.

    for css: you can use a plugin to minify CSS though you need to be careful because it can break the look of site.

    So the same site also creates optimized version of the images and css files. if you are expert those will help.

    if you are not expert, look at the plugins autoptimize (css part) and Wp smush (image part) which could help.

    Thread Starter Chad

    (@chadi)

    I installed the below plugins prior and no noticeable changes in pagespeed score.

    Autoptimize
    W3 Total Cache

    no noticeable changes in pagespeed score.

    the overall pagescore is a way to try to quantify how much you adhere to the best practices, it’s pretty useless when taken out of context. the interesting things are the recommendations you see there. W3TC & AO will be able to help with some of those reco’s (some configuration might be required, see AO’s FAQ for pointers about e.g. render blocking CSS), but for other you might need other solutions (plugins).

    happy optimizig,
    frank (ao dev)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Google Website Speed Test Issues’ is closed to new replies.