ThemeAwesome / WP-Forge

WP-Forge - A Foundation for Sites WordPress Theme
https://themeawesome.com/wp-forge-wordpress-foundation-for-sites-theme/
85 stars 28 forks source link

Really slow to load on Wordpress 4.1 #27

Closed Freelancealot closed 9 years ago

Freelancealot commented 9 years ago

Hi,

Just done a new installation of WP and loaded WP-Forge theme and the Starter Theme, which I've renamed for my client. The site loads, but is really slow, blank white page for several seconds before any content appears on the home page.

The site is at http://client. bizharbour. net

The only thing I have done is rename the Starter theme using lower case and no spaces. I've corrected the call in the stylesheet to wp-forge-master. Is there anything else I need to do?

Jetpack plugin was included but I have not activated it. I deactivated WP Super Cache. The only active plugin is Smart Slider 2 (free version).

I don't get the lag when using the WP 2015 theme. I have included the Smart Slider 2 but in the page content with a shortcode rather than via a php call in the header.php as with the wp-forge theme---only because I can't see where to put it in the header.php in Fifteen!

Any idea what could be causing it? Do you experience a delay, slow loading when you visit the site?

Cheers, Tracy

tsquez commented 9 years ago

Hi Tracy,

I just realized that I had never answered you about this. Yes that site does load slow, but I did notice that the stylesheet for the child theme has been moved to just after the customizer css css_moved

This tells me that the theme was modified in some way, maybe this is the reason it loads extremely slow?

Freelancealot commented 9 years ago

Hi,

Thanks for getting back to me.

The theme has been slow since the moment I loaded it, before any adjustments and before I moved the child-theme css call.

I moved the child css to after the customiser css on the header because I needed to add some opacity to the backgrounds and this was not an option in the customiser within the dashboard.

I'm enjoying using the theme, so can you think of anything other reason?

Cheers,

Tracy Partner Freelancealot.co.uk

Tel: 01283 80 80 77

Website: www.freelancealot.co.uk Twitter: @Freelancealot Facebook: www.facebook.com/Freelancealot/

From: Thomas Vasquez notifications@github.com Reply-To: tsquez/wp-forge <reply+009e4fa5550e0e7fc28060eb0ccb1fbf466f46b58a04ef9292cf0000000110c4c52c9 2a169ce032ce9cd@reply.github.com> Date: Wed, 07 Jan 2015 01:58:04 -0800 To: tsquez/wp-forge wp-forge@noreply.github.com Cc: Tracy Shorrock info@freelancealot.co.uk Subject: Re: [wp-forge] Really slow to load on Wordpress 4.1 (#27)

Hi Tracy,

I just realized that I had never answered you about this. Yes that site does load slow, but I did notice that the stylesheet for the child theme has been moved to just after the customizer css https://cloud.githubusercontent.com/assets/1976117/5643708/dcc94f02-9618-1 1e4-9e8e-06c70a33be46.jpg

This tells me that the theme was modified in some way, maybe this is the reason it loads extremely slow?

‹ Reply to this email directly or view it on GitHub https://github.com/tsquez/wp-forge/issues/27#issuecomment-69000634 .

Freelancealot commented 9 years ago

Had no idea all that stuff would be posted to the forum, sorry about that!

I checked on Google PageSpeed Insights and got the following:

"Your page has 6 blocking script resources and 10 blocking CSS resources. This causes a delay in rendering your page."

It also said 'In our test, your server responded in 1 second.' (but I'll address that issue with the host)

I'm not sure this is specific to wp-forge or Wordpress 4.1, but it also said:

"Your page requires additional network round trips to render the above-the-fold content. ... Only about 3% of the final above-the-fold content could be rendered with the full HTML response."

https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fclient.bizharbour.net&tab=desktop

I will try with the default 2015 theme with all plugins deactivated and see what happens. I will report the results. Thanks for helping me with this issue.

Cheers, Tracy

tsquez commented 9 years ago

No worries about it showing in the forum, that's what it's for.

You have to understand in order for you to test Twenty Fifteen, you have to take everything you added to your child theme and add it to that theme and then run the tests.

You can't create a child theme with modifications and compare it against another them that doesn't have the same modifications. I hope that makes sense.

Another way to test is to activate WP-Forge by itself and see if you experience a delay. If not, then activate 2015 and run your test, then activate your child theme.

You may also want to rename WP-Forge, from wp-forge-master to wp-forge and in the child theme, rename the call to wp-forge.

However, I believe the delay you are experiencing is due to the modifications you added to your child theme and I cannot determin what those modifications are.

So try those recommendations above and see what happens. On Jan 7, 2015 3:01 PM, "Freelancealot" notifications@github.com wrote:

Had no idea all that stuff would be posted to the forum, sorry about that!

I checked on Google PageSpeed Insights and got the following:

"Your page has 6 blocking script resources and 10 blocking CSS resources. This causes a delay in rendering your page."

It also said 'In our test, your server responded in 1 second.' (but I'll address that issue with the host)

I'm not sure this is specific to wp-forge or Wordpress 4.1, but it also said:

"Your page requires additional network round trips to render the above-the-fold content. ... Only about 3% of the final above-the-fold content could be rendered with the full HTML response."

https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fclient.bizharbour.net&tab=desktop

I will try with the default 2015 theme with all plugins deactivated and see what happens. I will report the results. Thanks for helping me with this issue.

Cheers, Tracy

— Reply to this email directly or view it on GitHub https://github.com/tsquez/wp-forge/issues/27#issuecomment-69100302.

tsquez commented 9 years ago

I also forgot to mention that you could have easily added the css for your opacity settings in your child themes style sheet, this would have been more efficient than moving the css to where it is now.

Essentially what you did was caused all of your themes styles to load last, when they should be loaded first. Just a thought for your consideration. On Jan 7, 2015 3:51 PM, "Thomas Vasquez" tsquez@gmail.com wrote:

No worries about it showing in the forum, that's what it's for.

You have to understand in order for you to test Twenty Fifteen, you have to take everything you added to your child theme and add it to that theme and then run the tests.

You can't create a child theme with modifications and compare it against another them that doesn't have the same modifications. I hope that makes sense.

Another way to test is to activate WP-Forge by itself and see if you experience a delay. If not, then activate 2015 and run your test, then activate your child theme.

You may also want to rename WP-Forge, from wp-forge-master to wp-forge and in the child theme, rename the call to wp-forge.

However, I believe the delay you are experiencing is due to the modifications you added to your child theme and I cannot determin what those modifications are.

So try those recommendations above and see what happens. On Jan 7, 2015 3:01 PM, "Freelancealot" notifications@github.com wrote:

Had no idea all that stuff would be posted to the forum, sorry about that!

I checked on Google PageSpeed Insights and got the following:

"Your page has 6 blocking script resources and 10 blocking CSS resources. This causes a delay in rendering your page."

It also said 'In our test, your server responded in 1 second.' (but I'll address that issue with the host)

I'm not sure this is specific to wp-forge or Wordpress 4.1, but it also said:

"Your page requires additional network round trips to render the above-the-fold content. ... Only about 3% of the final above-the-fold content could be rendered with the full HTML response."

https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fclient.bizharbour.net&tab=desktop

I will try with the default 2015 theme with all plugins deactivated and see what happens. I will report the results. Thanks for helping me with this issue.

Cheers, Tracy

— Reply to this email directly or view it on GitHub https://github.com/tsquez/wp-forge/issues/27#issuecomment-69100302.

Freelancealot commented 9 years ago

Hi tsquez,

So mystery is solved. I just had a chat with Hostgator, I had to add the following into my .htaccess file.

<FilesMatch "\.(js)$">
AddHandler application/x-httpd-php .js
</FilesMatch>

<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/javascript "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|xml|gz)$">
    Header append Vary: Accept-Encoding
  </FilesMatch>
</IfModule>

That has sped things up considerably! Never had to do this before for a Wordpress installation so I didn't even look in this direction.

This may be helpful for someone, but it's not specific to wp-forge, so I'll close the issue.

Cheers, Tracy

tsquez commented 9 years ago

Hey that's awesome and yep I didn't even think of that but it is strange.

Oh well at least it's solved On Jan 7, 2015 4:13 PM, "Freelancealot" notifications@github.com wrote:

Hi tsquez,

So mystery is solved. I just had a chat with Hostgator, I had to add the following into my .htaccess file.

<FilesMatch ".(js)$"> AddHandler application/x-httpd-php .js

SetOutputFilter DEFLATE BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4.0[678] no-gzip BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI \ .(?:gif|jpe?g|png)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary ExpiresActive On ExpiresDefault "access plus 1 month" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType text/css "access 1 month" ExpiresByType application/javascript "access plus 1 year" Header append Vary: Accept-Encoding

That has sped things up considerably! Never had to do this before for a Wordpress installation so I didn't even look in this direction.

This may be helpful for someone, but it's not specific to wp-forge, so I'll close the issue.

Cheers, Tracy

— Reply to this email directly or view it on GitHub https://github.com/tsquez/wp-forge/issues/27#issuecomment-69109947.