DreamHost supports several PHP versions on the web hosting servers. Besides, It allows you to set your preferred PHP version via the hosting control panel. We’re reviewing the steps to update the PHP version on DreamHost.
When you upload a website on your DreamHost account, there is an option to pick out which PHP version you want to use. And you still can tweak and alter this choice at any time.
PHP 7.4 is the latest PHP version. The versions are also supported on the DreamHost panel. PHP 7 versions give numerous benefits over the previous versions. These benefits include the new Zend Engine.
In this article, we’re reviewing the benefits of upgrading to PHP 7. And how to update PHP version on DreamHost hosting account. This little change will dramatically boost your website performance.
Ready to Signup? Get 47% Discount
If you’ve already bought web hosting from DreamHost, then you can skip this step and proceed to the technical steps below and start applying on your website.
If you’ve not yet purchased web hosting, then let’s do it with a 47% exclusive discount (for a limited time). To grab your discount, You will need to use our promo link. This is an exclusive discount for our blog readers. I’m sure you don’t want to miss it.
After visiting our promo link, Clik on “Get Started” to get your hosting account. You’ll get an instant 47% discount along with advertising credits to use for your website.
PHP 7 Benefits:
PHP 7 has removed several deprecated capabilities from the previous variations. Because of this, users must not upgrade their websites until they are sure everything is fully matched with the new PHP edition.
Besides, PHP 7 will significantly boost your website speed and performance. The newer versions also are well secured against common hacking maneuvers.
Here’re some of the benefits for the PHP 7:
- Improved speed & performance
- Significantly reduced reminiscence usage
- Abstract Syntax Tree
- Consistent 64-bit support
- Improved Exception hierarchy
- The null coalescing operator (??)
- Return and Scalar Type Declarations
- Anonymous Classes
- Zero fee asserts
A major difficulty with PHP 5.6 was that it consumes more memory than necessary. Accordingly, your website loads slower than it could be.
If you’re currently on PHP 5.6 and you’re into upgrading to PHP 7, you’ll notice a significant boost in your website speed. This boost is even doubled if you’re using WordPress.
The brand new WordPress core software program releases have been well suited with PHP 7. Upgrading to PHP 7 is a short and easy way to get more overall performance on your WordPress website.
DreamHost PHP Version:
It’s highly advocated to upgrade your website PHP version to the latest version. This will indeed boost your website security and performance.
DreamHost allows you to upgrade the PHP version easily via the control panel. The steps are quite easy and straight-forward. You just need to follow the steps below:
- Login to DreamHost Panel
- Navigate to the Manage Domains page
- Click “Edit” under the ‘Web Hosting’ column
- the ‘Web Options’ section, select the PHP version
- Scroll down and click the “Change settings“
You can check or uncheck Automatically upgrade PHP. This option only upgrades PHP if the version you’re running is outdated. For example; if you’re currently running PHP 7.3 and a new 7.4 version has been released, your website will automatically upgrade the version to 7.4 at the latest.
Update PHP Using .htaccess File:
Besides the ability to update the PHP version using the DreamHost panel, you can also upgrade it using the htaccess file in your public_html directory.
Simply add the following two lines in your .htaccess file which forces PHP to use PHP 7.2:
AddHandler fcgid-script .php FCGIWrapper "/dh/cgi-system/php72.cgi" .php
If this causes any problems, then remove the lines to switch back to your previous settings. This was a quick way to update the PHP version using the htaccess file. You can access the file using FTP or the given File Manager.
Which PHP Model To Choose?
Several studies show that PHP 7.2 offers a 20–30% speed improvement over PHP 7.0 and a 250-300% speed development over PHP 5.6.
Each PHP model gives two options: FastCGI and CGI. Typically you should pick out FastCGI as this gives quicker overall performance for maximum web sites.
If your web site’s PHP version is presently set to CGI, you can have at one point encountered overall performance issues with FastCGI which brought on the exchange to CGI.
To Wrap Up:
Using the steps mentioned above will help you easily upgrade your website PHP version. There might be a small risk of an error or difficulty after a PHP version upgrade. For that, you will need to make sure that all codes and plugins are compatible with PHP 7 latest versions.
You can always tweak these settings in the DreamHost panel. You can upgrade or downgrade PHP versions at any time shall you’ve experienced any incompatibility issues.
That was it all about how to update the PHP version on DreamHost hosting. Let us know in the comments below shall you require assistance or if you’ve got any inquiries.