Disable unnecessary and unused PHP versions (FPM pools) - Rocketeers app

  [ Rocketeers ](/)   

[Login](https://rocketeersapp.com/login) 

 On this page

 Knowledge
---------

Disable unnecessary and unused PHP versions (FPM pools)
=======================================================

### [\#Hosting](https://rocketeersapp.com/knowledge/hosting)

Hosting your application optimally means you need to take care of the valuable server resources. PHP FPM can keep memory occupied even when not actively used.

 Published by [Mark van Eijk](https://rocketeersapp.com/author/mark-van-eijk) on August 24, 2022 · 1 minute read

1. [Stop unused PHP versions (FPM pools)](#content-stop-unused-php-versions-fpm-pools)
2. [Prevent PHP versions from starting on boot](#content-prevent-php-versions-from-starting-on-boot)

When running PHP applications it's a common mistake to forget to turn off unused PHP versions. This mostly happens when you install a new PHP version and forget to uninstall or disable the previous PHP versions.

It is no problem to keep multiple PHP versions installed on your server. But it could be a problem to keep it running on your server. Likely this happens when using PHP FPM, which has a default www pool per PHP version that isn't turned off when it's not in use anymore.

So it could be running forerver and keeps precious server memory occupied.

[\#](#content-stop-unused-php-versions-fpm-pools "Permalink")Stop unused PHP versions (FPM pools)
-------------------------------------------------------------------------------------------------

Stopping the processes for a PHP FPM pool is easy, using this command for your unneeded PHP version (e.g. 7.4):

 ```
sudo service php7.4-fpm stop

```

[\#](#content-prevent-php-versions-from-starting-on-boot "Permalink")Prevent PHP versions from starting on boot
---------------------------------------------------------------------------------------------------------------

To prevent the PHP version from starting when you reboot your server, disable the service all together:

 ```
sudo systemctl disable php7.4-fpm

```

> Using [Rocketeers](/) you won't have this problem. When changing PHP versions, Rocketeers will detect which sites and applications are running which versions and will disable all unused versions on your server.

### Subscribe to our newsletter

Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!

  Fill in your email address to receive updates  Subscribe 

#### More in [\#Hosting](https://rocketeersapp.com/knowledge/hosting)

- [How to get top processes with highest memory usage](https://rocketeersapp.com/knowledge/top-processes-memory)
- [How to get top processes with highest CPU usage](https://rocketeersapp.com/knowledge/top-processes-cpu)
- [How to add Swap Space on Ubuntu servers](https://rocketeersapp.com/knowledge/add-swap-space-on-ubuntu)
- [Reclaim disk space on Ubuntu server](https://rocketeersapp.com/knowledge/reclaim-diskspace-on-ubuntu)
- [How to check Ubuntu version](https://rocketeersapp.com/knowledge/ubuntu-version)
- [Zero downtime deployments using PHP-FPM and nginx](https://rocketeersapp.com/knowledge/zero-downtime-php-deployments)

 [View all 16 articles →](https://rocketeersapp.com/knowledge/hosting)
