We’ve been using one and one as our web host for a good few years now, we’ve got a couple of older servers which run and host quite a few older sites that were created using PHP 5. You might know that the latest versions of WordPress require at least PHP 5 to be running on your server before it will even install. here’s how i get round it..

Pretty simple it’s just the first two lines below placed in an .htacess file and uploaded in the root folder of a site. They bump up the server install from version 5 to version 6 meaning that older sites created with PHP 4 are untouched by the sly upgrade. Obviously the best practice would be to revisit these older sites and update the code accordingly but this solution solves the problem when your’re developing numerous sites rapidly.

I also add the other 2 sections to speed the site up for Google as it likes sites to run as fast as possible. Basically it Gzips the files that your serving and also sets the expiry date of all files types. When you check this in Page speed in Firebug you should notice a marked difference in your sites score. Try it out and increase the speed of your site

[php]
AddType x-mapp-php6 .php
AddHandler x-mapp-php6 .php


<IfModule mod_gzip.c>
mod_gzip_on       Yes
mod_gzip_dechunk  Yes
mod_gzip_item_include file      \.(html?|txt|css|js|php|pl|jpg|png|gif)$
mod_gzip_item_include handler   ^cgi-script$
mod_gzip_item_include mime      ^text/.*
mod_gzip_item_include mime      ^text/css*
mod_gzip_item_include mime      ^application/text-javascript.*
mod_gzip_item_exclude mime      ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>


<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 day"
ExpiresByType image/png "access plus 30 days"
ExpiresByType image/jpeg "access plus 4 weeks"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType application/javascript "modification plus 2 weeks"
ExpiresByType text/css "modification plus 14 days"
</ifModule>
[/php]
Portal Creative in Review

Portal Creative in Review

As 2020 comes to an end, I felt it would be appropriate time to…

read more

Portal Creative Christmas Opening Times

Portal Creative Christmas Opening Times

Christmas and New Year Opening Hours With the holidays fast approaching, we want to…

read more

Portal Creative move to Stirling

Portal Creative move to Stirling

Portal Creative is moving to the city of Stirling. As Steve Clarke was providing…

read more

WordPress 5.4 Adderley Update

WordPress 5.4 Adderley Update

New exciting features coming in Adderley: Highlights This new update to WordPress sees more…

read more

What is Content Marketing?

What is Content Marketing?

What is Content Marketing? This is content marketing! By creating a blog and giving…

read more

© 2021 Portal Creative