WebPagetest Forums
Improve First byte time - Wordpress - Justhost.com - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Optimization Discussions (/forumdisplay.php?fid=5)
+--- Thread: Improve First byte time - Wordpress - Justhost.com (/showthread.php?tid=12806)



Improve First byte time - Wordpress - Justhost.com - chetanmadaan - 02-13-2014 05:40 AM

Hi -

we have a website is is apparentlly not that big... but the first byte time is really huge sometimes..

It's a wordpress website and hosted on justhost.com
Here is one of the tests we ran.
http://www.webpagetest.org/result/140212_WZ_110Z/

anything we can do to optimize it?

Thanks


RE: Improve First byte time - Wordpress - Justhost.com - robzilla - 02-20-2014 07:22 AM

Not really. You say the TTFB "is really huge sometimes". That's because you're sharing a server with hundreds, if not thousands of other websites. During peak hours, or when other sites suddenly surge in traffic, the performance of your website will suffer. Unfortunately, that's the reality of shared hosting environments. Some hosts are better than others, but it's hard to tell upfront.

What you can do is make sure your Wordpress installation is as light as possible, by disabling unnecessary plug-ins, for example.

Note that your TTFB is doubled by the slow redirect from http://www.sci-rehab.com to http://sci-rehab.com (which again suggests that your host's server is under heavy load). If you run a test without the 'www' your results will probably be a little less intimidating.


RE: Improve First byte time - Wordpress - Justhost.com - Bas-tester - 02-21-2014 11:26 PM

What I think is happening is this, you go to the site http://www.sci-rehab.com and then apache/php (starts) loads/compiles the site. The .htaccess is read and a re-direct is applied (or did you redirect from within wordpres?. I don't know/use wordpress or possible plugins. If it is in wordpress, you could also use parts of the info below.)

Then the browser does a new DNS lookup for scri-rehab.com and apache loads the website again (compiling)

Depending on how much control you have over the server/site you could seperate http://www.sci-rehab.com and sci-rehab.com to different folders, where http://www.sci-rehab.com is empty / no wordpress and in the .htaccess you specify redirect permanent / http://sci-rehab.com This would prevent PHP compiling all PHP pages.

This is something I did not test, it's theoretical. This only affects users that use the URL http://www.sci-rehab.com but at least it should cut the time in half.

From what I have seen is that the page is ok when it's initially loaded due to some caching. The main thing to speed-up would be to check if the hoster can setup something like Opcache or xcache or Zend-optimizer.

This keeps the PHP pages compiled instead of compiling each page upon request. This does not effect the output of the page, it's mererly that the php code is compiled into server readable language for processing. When you update a php file, it will be newly compiled / cached with programs like Opcache / xcache etc.


RE: Improve First byte time - Wordpress - Justhost.com - GreenGecko - 03-10-2014 09:35 AM

@Bas-tester. Not really.

The 301 redirect to sci-rehab.com - if performed in .htaccess ( or httpd.conf ) is done before any handover to php happens. However, if it's internal to PHP, then your theory is true.

Getting the optimum website performance is never a single tweak, but if you're on a shared server, then the complexity of the shared sites and the greed of the service provider are your limiting factors. If site performance is important to you, then running on a decent VPS provider ( linode is my favourite - no I'm not affiliated! ) is an imperative first step... then you have the ability to tune web server, database, server side language resources, and so on. Caching is a big part of this too...