🇩🇪 DE 🇬🇧 EN
NexoraHost / Docs home
Popular searches:Minecraft won't startCreate Minecraft serverFiveM txAdminInstall WordPressSet up subdomainVPS GermanySSL errorOpen port 25565Discord bot hostingDNS troubleshooting

PHP Versions and Configuration

Quick answer: Wrong PHP version can crash WordPress or shops. In Plesk PHP settings choose the right version (usually 8.1+).

PHP is the scripting language behind most websites and CMS like WordPress, Joomla or Drupal. This overview shows you the current PHP versions, their differences and how to configure them on your server.

Note: Detailed installation guides can be found in the articles in the left navigation.

Current PHP Versions

Version Status End of Life Recommendation
PHP 8.3 Latest stable version December 2027 Recommended for new projects
PHP 8.2 Stable December 2026 Good choice for existing projects
PHP 8.1 Security updates only December 2025 Still usable, plan upgrade
PHP 8.0 End of Life November 2023 Do not use anymore
PHP 7.4 End of Life November 2022 Do not use – security risk

Why is the right PHP version important?

Switching PHP Versions

On VPS/Root Server (Ubuntu/Debian)

# Show available PHP versions
sudo apt search php | grep -E "^php[0-9]+\.[0-9]+"

# Install new version (example: PHP 8.3)
sudo apt install php8.3 php8.3-cli php8.3-fpm php8.3-mysql php8.3-xml php8.3-mbstring php8.3-curl php8.3-zip -y

# Disable old version
sudo a2dismod php8.1  # For Apache
sudo a2enmod php8.3

# Restart web server
sudo systemctl restart apache2  # Apache
sudo systemctl restart nginx    # Nginx (with PHP-FPM)

On Webspace (Plesk)

  1. Log in to Plesk
  2. Go to Websites & Domains → PHP Settings
  3. Select the desired PHP version from the dropdown menu
  4. Click OK
  5. The change takes effect immediately

Important PHP Configuration Values (php.ini)

Setting Recommended Value Meaning
memory_limit 128M – 256M Maximum RAM per PHP process. For WordPress with many plugins, 256M recommended
max_execution_time 30 – 120 Maximum execution time in seconds. Increase for large uploads or imports
upload_max_filesize 16M – 128M Maximum file size for uploads. Increase for large media uploads
post_max_size Slightly higher than upload_max_filesize Maximum size of POST data. Must be larger than upload_max_filesize
max_input_vars 1000 – 5000 Number of allowed input variables. Increase for large menus or page builders
display_errors On (Development) / Off (Production) Display errors directly. Always Off on live servers

PHP-FPM – The Performance Booster

PHP-FPM (FastCGI Process Manager) processes PHP requests significantly faster than the old mod_php. Instead of starting a new process for each request, FPM keeps a pool of running processes ready.

# Install PHP-FPM
sudo apt install php8.3-fpm -y

# Adjust pool configuration
sudo nano /etc/php/8.3/fpm/pool.d/www.conf

# Important settings:
pm = dynamic
pm.max_children = 20
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 8
pm.max_requests = 500

# Restart after changes
sudo systemctl restart php8.3-fpm

Enforce PHP Version for Specific Website

Apache (via .htaccess)

# Set PHP 8.3 via .htaccess
AddHandler application/x-httpd-php83 .php

Nginx (via server block)

location ~ \.php$ {
    fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
}

Common Problems

Website shows white page after PHP update:

WordPress recommends outdated PHP version:

Detailed installation and configuration guides can be found in the articles in the left navigation.

Related guides

Order webspace: nexorahost.com

NexoraHost

Webspace & websites

SSD hosting with free SSL, email mailboxes & Plesk panel.

nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime