Guides tagged “php-fpm”
Step-by-step MdmHost guides about php-fpm, sorted A-Z.
18 guides
Change the PHP version and PHP settings per domain in Plesk
Change the PHP version for one domain in Plesk and edit its php.ini values, including memory_limit, upload_max_filesize and max_execution_time.
Configuring PHP-FPM process manager settings for specific RAM constraints
Calculate safe PHP-FPM process manager values from real memory use, then set pm.max_children and related pool limits so PHP stops exhausting RAM on your Linux VPS.
DirectAdmin: switch PHP versions per domain
Set the PHP version for one domain in DirectAdmin and edit that domain's php.ini limits, then verify the change with phpinfo and PHP-FPM.
Enable and tune PHP-FPM in cPanel
Turn on PHP-FPM per domain in WHM, size the pool with Max Children and Max Requests to fit your RAM, and fix "max_children reached" warnings.
Fix 502 Bad Gateway in Nginx
A 502 Bad Gateway means Nginx could not get a valid answer from PHP-FPM or your app. Read the error log, then check the backend service, socket path, permissions and ports.
Fix PHP "Allowed memory size exhausted" fatal error
PHP stops a script when it tries to allocate more memory than memory_limit allows. Find the script that hit the limit, raise the limit in the right place, and fix the cause.
How to migrate a website from Apache to Nginx
Move a site from Apache to Nginx with low downtime - convert virtual hosts and.htaccess rewrites, set up PHP-FPM, reuse SSL certificates, test on a spare port, then switch.
Install a LEMP stack by hand (Nginx, MariaDB, PHP-FPM) on Ubuntu or AlmaLinux
Build a fast LEMP server: install Nginx, MariaDB and PHP-FPM on Ubuntu 24.04 or AlmaLinux 9, write a server block for PHP apps, secure it and add Let's Encrypt SSL.
Install multiple PHP versions on Ubuntu and Debian
Add Ondřej Surý's PHP repository, install PHP 8.2, 8.3 and 8.4 side by side with PHP-FPM, and switch the command-line PHP version with update-alternatives.
Install multiple PHP versions on Ubuntu with the ondrej PPA
Add the ondrej/php PPA on Ubuntu, install PHP 7.4 to 8.4 side by side with FPM, choose the CLI default, assign versions per site in Apache or Nginx, and keep them updated.
Install PHP 8.x on AlmaLinux and Rocky Linux with Remi
Enable EPEL and the Remi repository on AlmaLinux or Rocky Linux 8 and 9, choose a PHP module stream, install PHP-FPM with common extensions, and run extra PHP versions side by side.
Manage multiple PHP versions on Ubuntu with PHP-FPM
Install several PHP-FPM versions on one Ubuntu server, set the CLI default, and point each Nginx site at the PHP version it needs.
Run PHP and WordPress with Caddy and PHP-FPM
Serve PHP sites and WordPress from Caddy using the php_fastcgi directive and PHP-FPM, with working permalinks, larger upload limits and wp-config.php kept private.
Run PHP-FPM with Apache using proxy_fcgi and mpm_event
Move Apache from mod_php and the prefork MPM to PHP-FPM with mpm_event and proxy_fcgi. Use less memory, serve more visitors and pick a PHP version per virtual host.
Switch Apache MPM to event in cPanel
Compare prefork, worker and event, switch Apache to the event MPM in EasyApache 4, move sites to PHP-FPM first and tune MaxRequestWorkers for your VPS.
Tune PHP-FPM pools (pm.max_children) for your RAM
Size PHP-FPM to your server's memory. Choose between dynamic, ondemand and static, calculate pm.max_children from real per-process memory, set pm.max_requests, and act on the max_children warning.
Upgrade PHP to a newer version on your VPS
Upgrade a site from PHP 8.1 to 8.3 or 8.4 safely. Install the new PHP-FPM and matching extensions, carry over php.ini changes, switch Nginx or Apache, test, and remove the old version.
Use a different PHP version per website in Nginx
Run each Nginx site on its own PHP version by pointing its server block at a different PHP-FPM socket, give each site a separate pool, and confirm the version without leaving phpinfo exposed.
Browse by topic
- Getting startedYour first hour with a new server: access, logins and basics.69 guides
- cPanelFiles, databases, email, domains and every cPanel tool, step by step.37 guides
- WHM & resellingWHM, packages, reseller accounts, WHMReseller and running a hosting brand.49 guides
- WordPressInstall, secure, speed up, migrate and fix WordPress sites.40 guides
- Email & webmailMailboxes, webmail, forwarders, spam filters and email delivery.37 guides
- DomainsRegistering, transferring and managing domains and nameservers.20 guides
- SSL certificatesFree AutoSSL, Let's Encrypt, paid certificates and HTTPS.19 guides
- CloudLinuxCloudLinux setup and use: LVE limits, CloudLinux Manager, CageFS and PHP/Node.js selectors.31 guides
- LiteSpeedLiteSpeed Web Server, LSCache and the LiteSpeed Cache plugin: install, settings and tuning.30 guides
- Imunify360Malware scanning, firewall and proactive defence with Imunify360.23 guides
- SoftaculousInstall, update, clone and back up apps with Softaculous.23 guides
- WP SquaredcPanel's WordPress platform: sites, plugins, staging and backups.9 guides
- SitePadBuild and publish websites with the SitePad builder.9 guides
- SitejetDesign, edit and publish sites with the Sitejet builder.9 guides
- WHMResellerAlpha and master resellers with WHMReseller: install, setup and use.12 guides
- VirtFusionInstall, set up and manage VirtFusion: hypervisors, packages, servers and WHMCS integration.7 guides
- VirtualizorManage your VPS with Virtualizor: power, OS reinstall, VNC, IPs and backups.30 guides
- PleskWebsites, email, databases and settings in the Plesk panel.52 guides
- DirectAdminUsers, domains, email and reseller tools in DirectAdmin.40 guides
- WHMCSBilling, automation, products and client management with WHMCS.51 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.106 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.115 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.34 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.52 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.64 guides
- Billing & accountInvoices, renewals, the client area and your account.9 guides
- TroubleshootingWhen something is not working: checks and fixes.68 guides
- Linux VPSSSH, packages, services and everyday Linux administration.70 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.58 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.58 guides
Still stuck?
Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.
