homepage Welcome to WebmasterWorld Guest from 54.166.123.2
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

    
What's the Best WordPress plugin(s) to optimize site speed?
wordpress plugin for speed optimization
SRegal




msg:4609556
 2:57 pm on Sep 13, 2013 (gmt 0)

Our company's site is painfully slow. Using google developers page speed insights, our site was getting a score of 51/100 with suggestions to enable compression, minify js/css, as well as to eliminate render blocking js.

I searched and installed the W3 Super Cache plugin which increased the score to 84/100, which was a nice improvement but then crashed the site. So I'm back to trying other plugins, but am seeing very little improvements.

I did edit my .htaccess file to include, " AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css" which improved my score to 65/100.

I've also added these other plugins, " WP-HTML-Compression, & Quick Cache" which seemed to have no affect on score. I've also tried "Dependency Minification" plugin, but it has a conflict with my "tab slider", and "gravity forms placeholder" plugins.

What do you guys use that is effective and stable?

 

SRegal




msg:4609574
 4:05 pm on Sep 13, 2013 (gmt 0)

Ok, so I did some more searching and found a better way to deliver the site quickly.
I had to modify my .htaccess file to include output compression by adding the following:

<IfModule mod_deflate.c>
# Insert filters
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

# Drop problematic browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>

This increased my score to 85/100 which is acceptable. I hope someone finds this helpful. If you guys see a better way to achieve results please share. Thanks

phranque




msg:4609671
 11:38 pm on Sep 13, 2013 (gmt 0)

welcome to WebmasterWorld, SRegal!


How To Speed Up WordPress - Apache Web Server forum:
http://www.webmasterworld.com/apache/4502109.htm [webmasterworld.com]

lorax




msg:4609686
 1:35 am on Sep 14, 2013 (gmt 0)

Welcome to WebmasterWorld!
Try not using plugins - or at least using less. :) Seriously.

To add to the thread phranque pointed you to, keep your database trim and lean. Despite caching, sooner or later the db needs to be queried to get the latest content. Optimize it, get rid of post revisions, and look for errors.

Also, reduce the http calls - use one style sheet instead of two or three. Use a sprite instead of two images to create a rollover effect. Each time the page has to make an http call to a resource or each time it queries the database, is another few moments the user has to wait.

Swanny007




msg:4609707
 3:29 am on Sep 14, 2013 (gmt 0)

Yes, less plugins is a great recommendation. FYI another fantastic site checker is [gtmetrix.com...] - I actually use the Google Page Speed Analyzer tool, GT Metrix, and Web Page Test .org as they all give a little different results.

onlineleben




msg:4609820
 9:54 pm on Sep 14, 2013 (gmt 0)

Altough they offer a paid Version (with more detail), you can try the free Report at zoompf com. The free Report is quite detailed and gives many tips and hints what to improve so loadtimes decrease.

SRegal




msg:4610074
 2:03 pm on Sep 16, 2013 (gmt 0)

Thanks guys. Please forgive me for these goofy questions. I'm more of a designer and am pretty new to this development stuff. So correct me if I'm doing something wrong. My .htaccess file now looks like this:

Options -Indexes

# BEGIN WordPress

RewriteCond $1 \.gif$ [NC,OR]
RewriteCond $1 \.jpg$ [NC,OR]
RewriteCond $1 \.ico$ [NC,OR]
RewriteCond $1 \.css$ [NC,OR]
RewriteCond $1 \.js$ [NC,OR]
RewriteCond $1 \.mp3$ [NC,OR]
RewriteCond $1 \.wav$ [NC,OR]
RewriteCond $1 \.pdf$ [NC,OR]
# or if URL resolves to existing file
RewriteCond %{REQUEST_FILENAME} -f [OR]
# or if URL resolves to existing directory
RewriteCond %{REQUEST_FILENAME} -d
# then skip the rewrite to WP
RewriteRule ^(.*)$ - [S=1]
# else rewrite the request to WP
RewriteRule . /index.php [L]

# Insert filters
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

# Drop problematic browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

# END WordPress

SRegal




msg:4610175
 8:58 pm on Sep 16, 2013 (gmt 0)

ok, so I tried that, then I added the envelopes back in.... then my site didn't render. I wish I had a better understanding of this stuff :-/
So now I'm back to:
Options -Indexes

# 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>

<IfModule mod_deflate.c>
# Insert filters
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

# Drop problematic browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
# END WordPress

phranque




msg:4610256
 6:55 am on Sep 17, 2013 (gmt 0)

ok, so I tried that, then I added the envelopes back in....

by "envelopes" i assume you mean the IfModule containers.
you only need those container directives if you are moving this .htaccess between configurations which may or may not have the module in question.
if you know your configuration(s) will always have the module active then you can omit the IfModule directive.

then my site didn't render.

i assume that was an intermediate version we haven't seen?
what was the response?

So now I'm back to:

and i assume this works (the latest version)?

the mod_rewrite section could probably be improved by combining some of the last 2 attempts into a single RewriteCond.
RewriteCond $1 \.gif$ [NC,OR]
RewriteCond $1 \.jpg$ [NC,OR]
RewriteCond $1 \.ico$ [NC,OR]
RewriteCond $1 \.css$ [NC,OR]
RewriteCond $1 \.js$ [NC,OR]
RewriteCond $1 \.mp3$ [NC,OR]
RewriteCond $1 \.wav$ [NC,OR]
RewriteCond $1 \.pdf$ [NC,OR]

RewriteRule ^index\.php$ - [L]


maybe something more like this:
RewriteCond %{REQUEST_URI} !(^index\.php|\.gif|\.jpg| ... |\.pdf)$
i wouldn't use the [NC] unless you are actually serving files with upper case used in the filename extension.

SRegal




msg:4610358
 5:57 pm on Sep 17, 2013 (gmt 0)

Thanks Phranque.
The latest version does work. Comcast ISP wouldn't serve the site with the .htaccess code from my post msg:4610074. I'm not sure why... maybe a security setting or something?
If I understand correctly what you're suggesting my .htaccess would look like this:

Options -Indexes
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !(^index\.php|\.gif|\.jpg|\.ico|\.css|\.js|\.mp3|\.wav|\.pdf)$
RewriteRule . /index.php [L]
</IfModule>
<IfModule mod_deflate.c>
# Insert filters
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript application/x-httpd-php application/x-httpd-fastphp image/svg+xml

# Drop problematic browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
# END WordPress

phranque




msg:4610361
 6:15 pm on Sep 17, 2013 (gmt 0)

more like this:
Options -Indexes

# BEGIN WordPress

RewriteEngine On
RewriteCond %{REQUEST_URI} !(^index\.php|\.gif|\.jpg|\.ico|\.css|\.js|\.mp3|\.wav|\.pdf)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# Insert filters
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript application/x-httpd-php application/x-httpd-fastphp image/svg+xml

# Drop problematic browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html

# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary

# END WordPress



also note:
http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule
To enable the rewrite engine in this context, you need to set "RewriteEngine On" and "Options FollowSymLinks" must be enabled. If your administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewrite engine. This restriction is required for security reasons.


(so make sure that is enabled in the apache config since it's not specified in your .htaccess)

alfredmarshall




msg:4629981
 9:09 am on Dec 12, 2013 (gmt 0)

Hello, the best Wordpress plugin is "W3 Total Cache" it has all the features and is extremely easy to install and use.And for optimizing the site speed you have to focus on some aspects.First of all choose a good host then start up with a solid framework or theme and use a content delivery network also optimize your homepage to load quickly.With the help of these things you will be able to optimize the site speed

jpch




msg:4632145
 1:39 pm on Dec 19, 2013 (gmt 0)

Where is the site hosted? Perhaps consider a Managed WordPress Host like WP Engine.

SRegal




msg:4632165
 2:33 pm on Dec 19, 2013 (gmt 0)

Thanks Phranque! That code worked awesome! It was very affective in helping speed up the site speed. Using the google page speed insights our score went from a 50 to an 87.

I also modified my functions.wp-scripts.php to load my scripts in the footer.
I've tried W3 Total Cache before and it crashed my site... so that's no longer an option.

We are considering moving the site to a WP friendly host such as WP Engine.

jpch




msg:4632181
 2:57 pm on Dec 19, 2013 (gmt 0)

I moved mine to WP Engine and have no regrets...great support and fast page loads. One thing to consider if you do a lot of testing on your site is they have a "Staging" feature. Pretty cool and easy way to be able to test things before deploying them.

SRegal




msg:4632182
 3:03 pm on Dec 19, 2013 (gmt 0)

Thanks jpch. The "staging" feature is a definite "must have". We're not very happy with our current host provider. They're slow and seem to have problems on a regular basis.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved