Skip to main content
< All Topics
Print

apache handler update to fix initial time to bite on bluehost

linardsmanymoods.com
12/8/2024

 

cpanel
apache handlers
add
application/x-httpd-ea-php74___lsphp .php .php7 .phtml

remove 8.2 version

this speeds up the initial time to load on bluehost


background:
https://alxwntr.com/bluehost-is-slow-and-heres-how-to-fix-it/

I recently built a new WordPress website for a client. They decided to maintain their own web host account as they have been using Bluehost for a number of years. I didn’t think this would be a problem until we finally launched the website and found that it took approximately 30 seconds to load each page!

The exact same website loads instantly within my staging server hosted at SiteGround so I know that the issue is not with the website itself, but likely instead something with Bluehost and their server configuration.

It turns out that there’s a known issue within Bluehost which causes a very high ‘Time to First Byte’ (TTFB). This is the measurement of time that it takes for the user’s web browser to acquire the first byte of data from the server before it can begin to load the resources from the web page itself.

This issue appears to be caused by the PHP handler that is set within the Apache .htaccess file, which is specific to cPanel’s EasyApache 4 PHP implementation. It tells the website to use php 8.2 when loading php files, which are required for WordPress to function.

That’s right. Simply changing this to PHP v7.4 is all that it takes to fix this. I can’t imagine why but I am certain that it does.

There’s a caveat to this suggested fix. It appears that Bluehost has an automated process in place which will periodically append the initial PHP 8.2 code to your htaccess file. If this happens then the issue will begin to occur again and you’ll need to repeat this process.

Tags:
Categories