Skip to main content

Hosting for a website with PHP

· 3 min read
Customer Care Engineer

2-07-hosting-php

PHP is a programming language needed mainly for web development. PHP runs many popular frameworks and CMS, such as the popular WordPress. Therefore, choosing the right hosting for a PHP website is important for optimal performance. Our article will explain how to make this choice.

PHP version

The first thing to consider when choosing and setting up PHP hosting is the version of PHP installed on your server. This is directly related to the number of PHP functions available to your server. For new sites, these are usually the latest versions.

Let's imagine that the site was created a long time ago and you want to move it to another hosting provider. Then you need to find out what version of PHP it was written for and it is better to install it on the server.

You may think that the new version is the best and that you should use it. But it is not. New versions often remove features that were previously available.

The FASTPANEL control panel is installed on kodu.cloud servers by default. In it you can select PHP version starting from 5.3 up to the latest stable PHP version released. At the time of writing, this is version 8.3.

As soon as a stable version of PHP is released, it will appear in FASTPANEL. Newer, but not officially released versions will appear in FASTPANEL when their testing is complete. Thus, you can always choose the current and stable version of PHP.

PHP Modes

There are many modes of PHP: suEXEC, CGI, FastCGI, Apache MPM Prefork, PHP-FPM, and others.

On kodu.cloud servers with FASTPANEL installed, you will have access to preconfigured popular mappings for sites written in PHP.

Nginx + Apache + MPM ITK. This is the easiest web server mode for the user. There is .htaccess support here, but resource consumption can be high. You cannot use a version of PHP that is different from the standard operating system version.

Nginx + PHP-FPM. This mode works faster. Here you can already change the PHP version to the necessary one. But since there is no Apache in the bundle, htaccess files will not be processed.

Nginx + Apache + CGI. This is the slowest mode of operation and is considered deprecated, but may be necessary if the code base of your website is very old.

Nginx + Apache + FastCGI. This is a more productive and modern version of CGI. Unlike CGI, this mode does not launch a separate process for each script. Therefore, resources are used more optimally. Here you can change PHP versions without losing the ability to process htaccess.

Nginx + PHP-FPM and Nginx + Apache + FastCGI are the optimal bundles for today. You can also contact our technical support team to find out which mode works best for you.

PHP modules

In some cases, additional modules are needed for a website to work. For example, if the website uses sqlite, redis, PostgreSQL, or something else.

At kodu.cloud you can install the PHP modules you need. In FASTPANEL you can select and install popular PHP modules in one click.

If FASTPANEL does not have the module you need, you can always contact our technical support and we will connect it.

PHP Parameters

In FASTPANEL you can customize the parameters required for PHP to work. For example, a limit on the size of uploaded files, script execution time, or the memory allocated for script execution.

CMS

If you need Wordpress, it can be installed literally at the click of a button. To install another CMS, write to technical support and we will help with the installation.

Outcome

A competent choice of hosting and optimal PHP configuration will directly affect the stability of your site. And kodu.cloud technical support specialists are always happy to help you.